Skip to content

Commit

Permalink
Merge pull request #5507 from piamo/main
Browse files Browse the repository at this point in the history
Add deepseek-v2.5 template
  • Loading branch information
hiyouga authored Dec 30, 2024
2 parents 40805b0 + ee059c3 commit 91467ed
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 @@ -618,6 +618,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 91467ed

Please sign in to comment.