Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Update hf.py

arnavsinghvi118fdabe655dde
diff --git a/dsp/modules/hf.py b/dsp/modules/hf.py
index d775d48da..57f57d259 100644
--- a/dsp/modules/hf.py
+++ b/dsp/modules/hf.py
@@ -72,7 +72,7 @@ class HFModel(LM):
from transformers import AutoConfig, AutoModelForCausalLM, AutoModelForSeq2SeqLM, AutoTokenizer
except ImportError as exc:
raise ModuleNotFoundError(
- "You need to install Hugging Face transformers (with torch dependencies) library to use HF models.",
+ "You need to install Hugging Face transformers (with torch dependencies - pip install transformers[torch]) library to use HF models.",
) from exc
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
try: