-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[Frontend] Vendor exported templates to vllm.tools
#18094
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
base: main
Are you sure you want to change the base?
[Frontend] Vendor exported templates to vllm.tools
#18094
Conversation
Signed-off-by: Aaron Pham <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run 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 either: Add 🚀 |
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Aaron Pham <[email protected]>
Signed-off-by: Aaron Pham <[email protected]>
I have actually moved a bunch of chat templates to |
I plan to move some of the tools items in here as well, and chat_templates should be one of them imo |
ig that the purpose of I would prefer explicitly set this rather than doing this automatically, because it would lead to unexpected behaviour imo |
Only |
so how would we use this feature? vllm serve <model> --chat-templates deepseek_vl_2 |
Looking at your example in the PR description:
What would you think about cleaning up the UX a bit by changing the naming schemes a bit where possible? In this case, it would be really nice if the command was It would also be nice to have a way to list the available templates, though that can be a different PR. |
Yeah I think we can cleanup the naming here. Initially I was thinking (very much inspired by nix): --chat-template hermes # alpaca | deepseek_r1 | etc.
--chat-template tool/hermes # with tool_call for hermes, tool/deepseek
--chat-template hf:org/new_model#tool_call_template.jinja <-- this can live in the HF model repo
--chat-template github:vllm-project/vllm/main#path/to/template.jinja <-- TODO, maybe by default all of the template that is known to us will be the "official" supported ones. Then model maker can probably also hosted their own to reduce the maintainability from our side
This is included in the CLI description actually, though I think I can also add this to the EngineArgs docstring so it shows up in the docs |
|
Perhaps this is also a solution: |
This PR vendors all exported tool calling / chat templates from
examples
tovllm/tools
such that end users will now don't have to clone the repo down to use the templatesThe format is as follows:
Previous functionalities are still preserved, if users want to use custom templates path.
Signed-off-by: Aaron Pham [email protected]