Spaces:
Build error
Build error
maybe this will fix the stuck on restart?
Browse files
app.py
CHANGED
@@ -114,16 +114,17 @@ class GaiaAgent:
|
|
114 |
# Initialize the LLM
|
115 |
print("Loading LLM...")
|
116 |
llm = HuggingFacePipeline.from_model_id(
|
117 |
-
model_id="
|
118 |
task="text-generation",
|
119 |
pipeline_kwargs={
|
120 |
"max_new_tokens": 512,
|
121 |
"top_k": 50,
|
122 |
"temperature": 0.1,
|
123 |
"do_sample": False,
|
124 |
-
"torch_dtype":
|
125 |
"device_map": "auto",
|
126 |
},
|
|
|
127 |
)
|
128 |
print("LLM loaded.")
|
129 |
|
|
|
114 |
# Initialize the LLM
|
115 |
print("Loading LLM...")
|
116 |
llm = HuggingFacePipeline.from_model_id(
|
117 |
+
model_id="microsoft/Phi-3-mini-4k-instruct",
|
118 |
task="text-generation",
|
119 |
pipeline_kwargs={
|
120 |
"max_new_tokens": 512,
|
121 |
"top_k": 50,
|
122 |
"temperature": 0.1,
|
123 |
"do_sample": False,
|
124 |
+
"torch_dtype": "auto", # Let transformers figure out the best dtype
|
125 |
"device_map": "auto",
|
126 |
},
|
127 |
+
trust_remote_code=True, # Phi-3 requires this
|
128 |
)
|
129 |
print("LLM loaded.")
|
130 |
|