Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -183,7 +183,7 @@ def on_btn_click():
|
|
| 183 |
def load_model():
|
| 184 |
model = (AutoModelForCausalLM.from_pretrained(
|
| 185 |
model_name_or_path,
|
| 186 |
-
trust_remote_code=True).to(torch.
|
| 187 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path,
|
| 188 |
trust_remote_code=True)
|
| 189 |
return model, tokenizer
|
|
|
|
| 183 |
def load_model():
|
| 184 |
model = (AutoModelForCausalLM.from_pretrained(
|
| 185 |
model_name_or_path,
|
| 186 |
+
trust_remote_code=True).to(torch.bfloat16).cuda())
|
| 187 |
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path,
|
| 188 |
trust_remote_code=True)
|
| 189 |
return model, tokenizer
|