indiejoseph commited on
Commit
adb03e2
·
verified ·
1 Parent(s): b13ba7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,9 +24,9 @@ if not torch.cuda.is_available():
24
 
25
  if torch.cuda.is_available():
26
  model_id = "hon9kon9ize/CantoneseLLMChat-v1.0-7B"
27
- model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
28
  model = torch.compile(model)
29
- tokenizer = AutoTokenizer.from_pretrained(model_id)
30
  tokenizer.use_default_system_prompt = False
31
 
32
 
 
24
 
25
  if torch.cuda.is_available():
26
  model_id = "hon9kon9ize/CantoneseLLMChat-v1.0-7B"
27
+ model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
28
  model = torch.compile(model)
29
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
30
  tokenizer.use_default_system_prompt = False
31
 
32