Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

from typing import Any, Optional, Union, Tuple | |
import torch | |
from torch import nn | |
from transformers.activations import ACT2FN | |
from transformers.models.deberta.modeling_deberta import ( | |
DebertaPreTrainedModel, | |
DebertaModel, | |
) | |
from transformers.models.deberta_v2.modeling_deberta_v2 import ( |
# install DSPy: pip install dspy | |
import dspy | |
# Ollam is now compatible with OpenAI APIs | |
# | |
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call. | |
# If you do not include this you will get an error. | |
# | |
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete. | |
# At least with mistral. |