alexkueck commited on
Commit
52f3750
1 Parent(s): 5c64f09

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -87,10 +87,11 @@ def load_tokenizer_and_model(base_model,load_8bit=False):
87
  load_in_8bit=load_8bit,
88
  torch_dtype=torch.float16,
89
  device_map="auto",
 
90
  )
91
  else:
92
  model = AutoModelForCausalLM.from_pretrained(
93
- base_model, device_map={"": device}, low_cpu_mem_usage=True
94
  )
95
 
96
  #if not load_8bit:
 
87
  load_in_8bit=load_8bit,
88
  torch_dtype=torch.float16,
89
  device_map="auto",
90
+ trust_remote_code=True
91
  )
92
  else:
93
  model = AutoModelForCausalLM.from_pretrained(
94
+ base_model, device_map={"": device}, low_cpu_mem_usage=True, trust_remote_code=True
95
  )
96
 
97
  #if not load_8bit: