artificialguybr commited on
Commit
b9b48c5
1 Parent(s): 3091bb1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -3,8 +3,10 @@ import re
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
 
5
  model_name_or_path = "teknium/OpenHermes-2-Mistral-7B"
 
6
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
7
  device_map="auto",
 
8
  trust_remote_code=False,
9
  load_in_4bit=True,
10
  revision="main")
 
3
  from transformers import AutoModelForCausalLM, AutoTokenizer
4
 
5
  model_name_or_path = "teknium/OpenHermes-2-Mistral-7B"
6
+ dtype = torch.bfloat16
7
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
8
  device_map="auto",
9
+ torch_dtype=dtype,
10
  trust_remote_code=False,
11
  load_in_4bit=True,
12
  revision="main")