Repository navigation
Open
Description
TRL recognizes a model by comparing its chat template, character for character, with a copy stored in trl/chat_templates/. Some widely used checkpoints ship a chat template that TRL has never stored, so add_response_schema rejects them, and GRPOTrainer with tools fails at init when the tokenizer does not provide its own response template. #7908 fixed this for LFM2.5 checkpoints; other families are affected too.
Reproduction
from transformers import AutoTokenizer
from trl import add_response_schema
tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-5.3-Flash")
add_response_schema(tokenizer)ValueError: Unrecognized chat template, failed to add response schema. Please manually set the response schema on the tokenizer or processor. See the Transformers [docs](https://huggingface.co/docs/transformers/main/en/chat_response_parsing#response-parsing) for more details on response parsing.
Tested with TRL main and transformers 5.21.0.
Progress
I'm handling all the remaining items below myself: please don't open PRs for them, and ping me here if you need one of them sooner.
- Recognize the GLM-5.3-Flash chat template for tool calling #7957
- Recognize the GLM-4.7 and GLM-5 chat templates for tool calling #7958
- Recognize the Qwen3-Coder chat templates for tool calling #7964
- Parse Qwen3-Thinking-2507 tool calls #7968
- Parse Qwen2.5 base tool calls #7972
- Add a tiny Qwen3-Coder model #8449 and Load the tiny Qwen3-Coder model in the Qwen3-Coder tool-call test #8515
tiny-Qwen3MoeForCausalLM-Coder - Add a tiny Qwen3-Coder-Next model #8544 and Load the tiny Qwen3-Coder-Next model in the Qwen3-Coder-Next tool-call test #8545
tiny-Qwen3NextForCausalLM-Coder-Next - Support tool calling for the Laguna chat templates #8511 Laguna (
poolside/Laguna-XS.2,Laguna-M.1,Laguna-XS-2.1,Laguna-S-2.1) - Inkling (
thinkingmachines/Inkling,Inkling-Small) - MiniCPM (
openbmb/MiniCPM-V-4.7-35B-A3B,MiniCPM-V-4.7-1B,MiniCPM-V-4.6,MiniCPM-o-4_5,MiniCPM5-2B,MiniCPM5-1B) - MiniMax-M2 and M3 (
MiniMaxAI/MiniMax-M2,MiniMax-M2.5,MiniMax-M2.7,MiniMax-M3,MiniMax-M3.1-Flash) - Hy3 (
tencent/Hy3,Hy3-preview) - Qwen3-Omni (
Qwen/Qwen3-Omni-30B-A3B-Instruct,Qwen3-Omni-30B-A3B-Thinking) - Granite 4.1 (
ibm-granite/granite-4.1-3b) - Kimi K2 (
moonshotai/Kimi-K2-Instruct,Kimi-K2.5,Kimi-K2.6,Kimi-K2.7-Code) - Nemotron (
nvidia/NVIDIA-Nemotron-Nano-9B-v2,NVIDIA-Nemotron-3.5-Super-VL-120B-A12B-BF16,Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16) - Ministral 3 (
mistralai/Ministral-3-14B-Instruct-2512,Ministral-3-14B-Reasoning-2512,Ministral-3-8B-Instruct-2512) - Qwen2.5-Math (
Qwen/Qwen2.5-Math-1.5B-Instruct) - Qwen3-VL Thinking (
Qwen/Qwen3-VL-8B-Thinking,Qwen3-VL-235B-A22B-Thinking) - Step-3.5 (
stepfun-ai/Step-3.5-Flash) - Apertus (
swiss-ai/Apertus-8B-Instruct-2509) - ERNIE 4.5 (
baidu/ERNIE-4.5-21B-A3B-Thinking) - OLMo 3 Instruct (
allenai/Olmo-3-7B-Instruct), after Support assistant-only loss for the OLMo 3 Instruct chat templates #8474
Metadata
Metadata
Assignees
Labels
No labels
Activity
albertvillanova commentedon Nov 18, 2026
Reopening for the two tiny-model follow-ups from the #7957 and #7964 reviews. The GLM-5.3-Flash one is done: the GLM think-prefill test now loads
tiny-Glm5NextForConditionalGeneration. Qwen3-Coder and Qwen3-Coder-Next need separate tiny models, because Qwen3-Coder-Next uses a different architecture (Qwen3NextForCausalLM).