dreamerdeo commited on
Commit
3673d00
1 Parent(s): 9934a4c

Update app.py

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