Support passing additional params to apply_chat_template by albertvillanova · Pull Request #1902 · huggingface/smolagents (original) (raw)
Support passing additional params to tokenizer.apply_chat_template in:
- VLLMModel
- TransformersModel
by using the apply_chat_template_kwargs param at model instantiation.
Previuosly done for MLXModel in:
Context
As requested by @sergiopaniego, a use case requires passing enable_thinking=False to apply_chat_template.
model = TransformersModel( model_id="Qwen/Qwen3-1.7B", apply_chat_template_kwargs={"enable_thinking": False}, )
CC: @sergiopaniego