Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OpenChat, Alpaca, Vicuna chat templates #6397
Add OpenChat, Alpaca, Vicuna chat templates #6397
Changes from 9 commits
d19df2c
0d24c6a
f6104b9
e0f9d9d
e423aa1
5305d68
c708544
ce48a6e
f1a3b12
a4986dd
d297225
9165380
1eebfc9
cfcbc7a
48850cf
021c6f5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpaca template and deepseek template both look similar at the first glance, but the main different is that alpaca template only used for instruction-response (one turn) and not multiple turns like modern chat template.
deepseek extends the notion of instruction-response into multi-turn by placing
<|EOT|>
token between each turn, so the formatted chat should look like:So what missing here is that
<|EOT|>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The chat above is produced by python code + jinja template, it doesn't seem to have
"\n\n"
at the end of each message, so I think the"\n\n"
should be replaced by"\n"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the python script! Included the Jinja output of OpenChat and DeepSeek below. And as you mentioned, the other two fail due to not having templates in
config_tokenizers.json
.Will add
<|EOT|>
for DeepSeek when I have moment tomorrow.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me, just a quick note is that
<|begin▁of▁sentence|>
is not needed, because BOS is always added on server