-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Frontend] Add Command-R and Llama-3 chat template #10496
base: main
Are you sure you want to change the base?
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
cc @K-Mistele |
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.
One final note, might be good to have the chat templates for command-r named consistently, e.g. command_r_tool_chat_template
, command_r_rag_chat_template
, comand_r_default_chat_template
or something.
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.
I don't understand why this is necessary. Llama 3's chat template is already included in the model's tokenizer_config.json
and this omits functionality like tool calls. What is the use case for this?
Sure, I'll standardize the template names. Honestly, in terms of usefulness, Llama-3 isn't something I particularly care about—it's just that it was mentioned in the issue, so I tried adding it. Should I remove it? |
b714721
to
a403868
Compare
This pull request has merge conflicts that must be resolved before it can be |
a403868
to
2b0879b
Compare
Signed-off-by: Clay <[email protected]>
Hi @K-Mistele , just following up on this PR. Please let me know if any further changes are needed or if there's anything else I can do to help. Thanks! |
This PR adds several chat templates in Jinja format.
The added templates are:
examples/rag_chat_template_command_r.jinja
examples/template_command_r.jinja
examples/template_llama3.jinja
examples/tool_chat_template_command_r.jinja
I noticed there are a feature request issue #9904 about adding chat template and I think I can help (I am researching how to use jinja to format my chat history processing recently). I have always wanted to contribute to the vLLM project, and I hope this PR can be a meaningful addition.
If the maintainers think these templates are unnecessary or beyond the project's scope, I am open to feedback and will happily adjust or close the PR as needed.
FIX #9904
Added: My Command-R chat template is based on CohereForAI/c4ai-command-r-08-2024