Spaces:
Sleeping
Sleeping
Update agents/research_agent.py
Browse files- agents/research_agent.py +1 -1
agents/research_agent.py
CHANGED
|
@@ -13,7 +13,7 @@ class ResearchAgent:
|
|
| 13 |
model_name = getattr(settings, "HF_MODEL_RESEARCH", "google/flan-t5-large")
|
| 14 |
|
| 15 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 16 |
-
self.model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
| 17 |
|
| 18 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 19 |
self.model.to(self.device)
|
|
|
|
| 13 |
model_name = getattr(settings, "HF_MODEL_RESEARCH", "google/flan-t5-large")
|
| 14 |
|
| 15 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 16 |
+
self.model = AutoModelForSeq2SeqLM.from_pretrained(model_name, torch_dtype=torch.float16)
|
| 17 |
|
| 18 |
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 19 |
self.model.to(self.device)
|