Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def load_model_norm():
|
|
50 |
# For example: revision="main"
|
51 |
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,device_map="auto", trust_remote_code=True,revision="gptq-4bit-128g-actorder_True")
|
52 |
# Switch to CPU inference
|
53 |
-
model.
|
54 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
55 |
|
56 |
return model, tokenizer
|
|
|
50 |
# For example: revision="main"
|
51 |
model = AutoModelForCausalLM.from_pretrained(model_name_or_path,device_map="auto", trust_remote_code=True,revision="gptq-4bit-128g-actorder_True")
|
52 |
# Switch to CPU inference
|
53 |
+
model.to("cuda")
|
54 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
55 |
|
56 |
return model, tokenizer
|