-
Notifications
You must be signed in to change notification settings - Fork 10.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
Add Command R chat template #6650
Conversation
We're missing test case for this template. Please follow the full procedure from this article to add a new template. |
Thanks for submitting this, eagerly awaiting it's approval!! |
…tion to trim whitespaces
Chat template test for command-R is now added. |
Works for me! Had to drop my context to 2k on my RTX 4090 to get it working in IQ_4_XS quant. |
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.
LGTM. Thank you!
The new template is also added to wiki: https://github.com/ggerganov/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template
* Add chat template for command-r model series * Fix indentation * Add chat template test for command-r models and update the implementation to trim whitespaces * Remove debug print
Added the chat template for c4ai-command-r-v01 and c4ai-command-r-plus in
llama_chat_apply_template_internal
so that we can use--chat-template command-r
option when running command-r models using llama.cpp's openai api server.The command-r chat template follows this format: <BOS_TOKEN><|START_OF_TURN_TOKEN|><|SYSTEM_TOKEN|>{system}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|USER_TOKEN|>{prompt}<|END_OF_TURN_TOKEN|><|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>{response}