Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -313,7 +313,7 @@ class Phi3MiniEducationalLLM(Runnable):
|
|
| 313 |
# Load model with memory-efficient settings
|
| 314 |
self.model = AutoModelForCausalLM.from_pretrained(
|
| 315 |
model_path,
|
| 316 |
-
|
| 317 |
device_map="auto", # Let it handle device placement
|
| 318 |
trust_remote_code=True,
|
| 319 |
low_cpu_mem_usage=True, # Essential for memory efficiency
|
|
|
|
| 313 |
# Load model with memory-efficient settings
|
| 314 |
self.model = AutoModelForCausalLM.from_pretrained(
|
| 315 |
model_path,
|
| 316 |
+
torch_dtype=torch.float16, # Use float16 to reduce memory usage
|
| 317 |
device_map="auto", # Let it handle device placement
|
| 318 |
trust_remote_code=True,
|
| 319 |
low_cpu_mem_usage=True, # Essential for memory efficiency
|