-
Notifications
You must be signed in to change notification settings - Fork 775
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
default chat template #1049
Comments
Hi there 👋 Default chat templates in transformers (and transformers.js) have been deprecated (see huggingface/transformers#30346). Since then, we require users to specify the chat template in their models. For the model you are referring to, I do think it's best to make a PR adding the correct chat template. |
Is there an api in the pipeline instance to query whether a chat template is available? many transformers.js do not have it. |
There are a few ways you could do this:
|
Thanks!🙏 |
No worries :) Feel free to close the issue if that solves your use-case 👍 |
Feature request
When an text-generation model configuration does not have a
tokernizer.chat_template
(like https://huggingface.co/onnx-community/moondream2.text_model-ONNX/blob/main/tokenizer_config.json), provide a default implementation. Otherwise, trying to send aChat
in the pipeline fails withMotivation
The
text-generation
pipeline supports a "chat interface" but most published models are lacking thechat_template
entry.See https://huggingface.co/onnx-community/Qwen2.5-Coder-0.5B-Instruct/blob/main/tokenizer_config.json#L198
Your contribution
I could probably produce a PR but I'd like to know whether I'm missing something here.
The text was updated successfully, but these errors were encountered: