Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ print("CPU threads:", torch.get_num_threads())
|
|
13 |
|
14 |
|
15 |
if torch_device == "cuda":
|
16 |
-
model = AutoModelForCausalLM.from_pretrained(model_id,
|
17 |
else:
|
18 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
19 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
|
13 |
|
14 |
|
15 |
if torch_device == "cuda":
|
16 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, load_in_4bit=True, device_map="auto")
|
17 |
else:
|
18 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
19 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|