Vitrous commited on
Commit
6ef9b66
·
verified ·
1 Parent(s): d2c9447

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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.cpu()
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