Skip to content

Commit

Permalink
Merge pull request #3925 from Yimi81/feat-fix-yi-template
Browse files Browse the repository at this point in the history
fix yi template
  • Loading branch information
hiyouga authored May 27, 2024
2 parents c1fdf81 + dc07413 commit 5091248
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/llamafactory/data/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,7 @@ def get_template_and_fix_tokenizer(
_register_template(
name="yi",
format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
format_system=StringFormatter(slots=["<|im_start|>system\n{{content}}<|im_end|>\n"]),
format_separator=EmptyFormatter(slots=["\n"]),
stop_words=["<|im_end|>"],
replace_eos=True,
Expand Down

0 comments on commit 5091248

Please sign in to comment.