Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,9 +10,10 @@ def load_model():
|
|
| 10 |
# Modified model loading without 8-bit quantization
|
| 11 |
model = AutoModelForCausalLM.from_pretrained(
|
| 12 |
MODEL_NAME,
|
| 13 |
-
torch_dtype=torch.
|
| 14 |
device_map="auto",
|
| 15 |
trust_remote_code=True,
|
|
|
|
| 16 |
# Removed load_in_8bit parameter
|
| 17 |
)
|
| 18 |
return model, tokenizer
|
|
|
|
| 10 |
# Modified model loading without 8-bit quantization
|
| 11 |
model = AutoModelForCausalLM.from_pretrained(
|
| 12 |
MODEL_NAME,
|
| 13 |
+
torch_dtype=torch.float16, # Use float32 instead of float16 for better compatibility
|
| 14 |
device_map="auto",
|
| 15 |
trust_remote_code=True,
|
| 16 |
+
load_in_8bit=True
|
| 17 |
# Removed load_in_8bit parameter
|
| 18 |
)
|
| 19 |
return model, tokenizer
|