added response_template

#1
by nico-martin HF Staff - opened
ONNX Community org

This PR adds support for the response_template in tokenizer_config.json. A response template tells the tokenizer how to parse the model's raw output into a structured assistant message (reasoning_content, content, tool_calls), so tokenizer.parse_response() and chat pipelines return parsed messages instead of raw text. See https://huggingface.co/docs/transformers/en/chat_response_parsing

Template
This is the existing lfm-thinking template, copied unchanged from onnx-community/LFM2-2.6B-ONNX. This repo is an ONNX export of LiquidAI/LFM2.5-24B-A2B with the same chat template and output format: <think>…</think> reasoning and <|tool_call_start|>[…]<|tool_call_end|> tool calls. The original model has no response_template of its own.

The template describes the checkpoint's output format. It does not mean that every response contains every region, and it does not guarantee tool-use quality.

nico-martin changed pull request status to open
Xenova changed pull request status to merged

Sign up or log in to comment