cloneQ commited on
Commit
d2dc021
·
verified ·
1 Parent(s): 4c65cb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -184,8 +184,9 @@ def load_model():
184
  # model = (AutoModelForCausalLM.from_pretrained(
185
  # model_name_or_path,
186
  # trust_remote_code=True).to(torch.bfloat16).cuda())
187
- model = AutoModelForCausalLM.from_pretrained(model_name_or_path, map_location=torch.device('cpu'),trust_remote_code=True)
188
- model.to_bettertransformer()
 
189
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path,
190
  trust_remote_code=True)
191
  return model, tokenizer
 
184
  # model = (AutoModelForCausalLM.from_pretrained(
185
  # model_name_or_path,
186
  # trust_remote_code=True).to(torch.bfloat16).cuda())
187
+ model = AutoModelForCausalLM.from_pretrained(
188
+ model_name_or_path,
189
+ trust_remote_code=True).to(torch.float32)
190
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path,
191
  trust_remote_code=True)
192
  return model, tokenizer