Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ model_path = 'sail/Sailor-7B-Chat'
|
|
| 8 |
|
| 9 |
# Loading the tokenizer and model from Hugging Face's model hub.
|
| 10 |
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
|
| 11 |
-
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True)
|
| 12 |
|
| 13 |
# using CUDA for an optimal experience
|
| 14 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
| 8 |
|
| 9 |
# Loading the tokenizer and model from Hugging Face's model hub.
|
| 10 |
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
|
| 11 |
+
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True, torch_dtype=torch.bfloat16)
|
| 12 |
|
| 13 |
# using CUDA for an optimal experience
|
| 14 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|