Rithankoushik commited on
Commit
f2a8c76
·
verified ·
1 Parent(s): 107813b

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +6 -7
inference.py CHANGED
@@ -18,14 +18,13 @@ def load_model_and_tokenizer():
18
  MODEL_REPO,
19
  trust_remote_code=True,
20
  )
21
-
22
  model = AutoModelForCausalLM.from_pretrained(
23
- MODEL_REPO,
24
- trust_remote_code=True,
25
- torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
26
- device_map="auto",
27
- torch_dtype=torch.bfloat16
28
- )
29
 
30
  return tokenizer, model
31
 
 
18
  MODEL_REPO,
19
  trust_remote_code=True,
20
  )
 
21
  model = AutoModelForCausalLM.from_pretrained(
22
+ MODEL_REPO,
23
+ trust_remote_code=True,
24
+ torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
25
+ device_map="auto"
26
+ )
27
+
28
 
29
  return tokenizer, model
30