alexkueck commited on
Commit
25b34f4
·
1 Parent(s): a0747c9

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -59,12 +59,13 @@ def load_tokenizer_and_model(base_model, load_8bit=False):
59
  device = "cuda"
60
  else:
61
  device = "cpu"
62
-
63
 
64
  tokenizer = AutoTokenizer.from_pretrained(base_model, use_fast = True, use_auth_token=True)
65
  if device == "cuda":
66
  model = AutoModelForCausalLM.from_pretrained(
67
  base_model,
 
68
  load_in_8bit=load_8bit,
69
  torch_dtype=torch.float16,
70
  device_map="auto",
 
59
  device = "cuda"
60
  else:
61
  device = "cpu"
62
+
63
 
64
  tokenizer = AutoTokenizer.from_pretrained(base_model, use_fast = True, use_auth_token=True)
65
  if device == "cuda":
66
  model = AutoModelForCausalLM.from_pretrained(
67
  base_model,
68
+ trust_remote_code=True,
69
  load_in_8bit=load_8bit,
70
  torch_dtype=torch.float16,
71
  device_map="auto",