Spaces:
Runtime error
Runtime error
Update model.py
Browse files
model.py
CHANGED
@@ -14,7 +14,8 @@ if torch.cuda.is_available():
|
|
14 |
model = AutoModelForCausalLM.from_pretrained(
|
15 |
model_id,
|
16 |
load_in_4bit=True,
|
17 |
-
torch_dtype=torch.float16
|
|
|
18 |
)
|
19 |
else:
|
20 |
model = AutoModelForCausalLM.from_pretrained(
|
|
|
14 |
model = AutoModelForCausalLM.from_pretrained(
|
15 |
model_id,
|
16 |
load_in_4bit=True,
|
17 |
+
torch_dtype=torch.float16,
|
18 |
+
device_map='auto'
|
19 |
)
|
20 |
else:
|
21 |
model = AutoModelForCausalLM.from_pretrained(
|