Vitrous commited on
Commit
4f9ba28
·
verified ·
1 Parent(s): 6624e83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -47,7 +47,8 @@ def load_model_norm():
47
  # To use a different branch, change revision
48
  # For example: revision="main"
49
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,device_map="auto", trust_remote_code=True,revision="gptq-4bit-128g-actorder_True")
50
-
 
51
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
52
 
53
  return model, tokenizer
 
47
  # To use a different branch, change revision
48
  # For example: revision="main"
49
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,device_map="auto", trust_remote_code=True,revision="gptq-4bit-128g-actorder_True")
50
+ # Switch to CPU inference
51
+ model.cpu()
52
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
53
 
54
  return model, tokenizer