-
Notifications
You must be signed in to change notification settings - Fork 967
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
Models with multiple chat templates #1336
Comments
Any suggestions on how to approach this? It has been merged in llama.cpp a while now, and many GGUFs already have the new metadata. I suppose adding f.ex. a chat_template_name parameter and applying the chosen template (if found - should also output which templates are available (from tokenizer.chat_templates list) I guess) would be the initial step. For server this gets more complicated, it would probably make sense to allow the caller to choose a template, and then also have an endpoint to see which templates are available? Finally, how would you go about adding support for additional parameters to the template, like |
@CISC do you mind posting a gguf that uses this right now. Yeah I think we can do even more simple and not introduce any new parameters just use the existing The chat formats will be accessible through the metadata not sure if we need to add anything new there but we should add an option to change chat format after initialization (I believe this has already been requested before). |
@CISC good point, let's prefix these dynamically loaded chat templates with |
@abetlen That seems reasonable, I'm thinking registering |
WIP changes worth paying attention to: huggingface/transformers#30621 |
Another related PR is this one huggingface/transformers#31429 which could be nice to replicate here, however requires us to differentiate from specifically selecting |
Not an issue yet, but will need to be handled once this is implemented based on recent transformers changes.
Also note the kwargs change in the same PR which will be used by f.ex. C4AI Command R models (new chat template is not merged yet) to pass along
tools
anddocuments
, while we already supporttools
, it might be worthwhile to support other things.The text was updated successfully, but these errors were encountered: