fix baichuan templates

Former-commit-id: f48a49e835b32f3991cfad8874c7b9c78953809f
This commit is contained in:
hiyouga
2023-09-07 18:54:14 +08:00
parent ed89e29bcc
commit eae7b331d3
9 changed files with 53 additions and 87 deletions

View File

@@ -54,7 +54,7 @@ def run_sft(
# Keyword arguments for `model.generate`
gen_kwargs = generating_args.to_dict()
gen_kwargs["eos_token_id"] = list(set([tokenizer.eos_token_id] + tokenizer.additional_special_tokens_ids))
gen_kwargs["eos_token_id"] = [tokenizer.eos_token_id] + tokenizer.additional_special_tokens_ids
gen_kwargs["pad_token_id"] = tokenizer.pad_token_id
gen_kwargs["logits_processor"] = get_logits_processor()