Skip to content

Commit

Permalink
Add deepseek-v2.5 template
Browse files Browse the repository at this point in the history
  • Loading branch information
huangpan.foo committed Sep 21, 2024
1 parent af8dfb5 commit ee059c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/llamafactory/data/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,14 @@ def get_template_and_fix_tokenizer(tokenizer: "PreTrainedTokenizer", data_args:
)


_register_template(
name="deepseek_v2.5",
format_user=StringFormatter(slots=["<|User|>{{content}}<|Assistant|>"]),
format_system=StringFormatter(slots=["{{content}}"]),
format_prefix=EmptyFormatter(slots=[{"bos_token"}]),
)


_register_template(
name="deepseekcoder",
format_user=StringFormatter(slots=["### Instruction:\n{{content}}\n### Response:"]),
Expand Down

0 comments on commit ee059c3

Please sign in to comment.