alexkueck commited on
Commit
a2e2b64
·
1 Parent(s): 34574f9

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -62,14 +62,14 @@ def load_tokenizer_and_model(base_model, load_8bit=False):
62
  device = "cpu"
63
 
64
 
65
- tokenizer = AutoTokenizer.from_pretrained(base_model, use_fast = True, use_auth_token=True)
66
  if device == "cuda":
67
  model = AutoModelForCausalLM.from_pretrained(
68
  base_model,
69
  load_in_8bit=load_8bit,
70
  torch_dtype=torch.float16,
71
  device_map="auto",
72
- use_auth_token=True
73
  )
74
  else:
75
  model = AutoModelForCausalLM.from_pretrained(
 
62
  device = "cpu"
63
 
64
 
65
+ tokenizer = AutoTokenizer.from_pretrained(base_model, use_fast = True, use_auth_token=True, bos_token='<|startoftext|>', eos_token='<|endoftext|>', pad_token='<|pad|>')
66
  if device == "cuda":
67
  model = AutoModelForCausalLM.from_pretrained(
68
  base_model,
69
  load_in_8bit=load_8bit,
70
  torch_dtype=torch.float16,
71
  device_map="auto",
72
+ use_auth_token=True,
73
  )
74
  else:
75
  model = AutoModelForCausalLM.from_pretrained(