Views
No views yet
yunmorning/broken-model.tokenizer_config.jsonchat_templateconfig.json, generation_config.json, model weights, vocabulary files) are identical to the original.tokenizer_config.json in the original repository was missing the chat_template field entirely.chat_template is a Jinja2 template that an inference server uses to convert an OpenAI-style messages array:1[
2 {"role": "system", "content": "You are a helpful assistant."},
3 {"role": "user", "content": "What is 2 + 2?"}
4]<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
What is 2 + 2?<|im_end|>
<|im_start|>assistant/chat/completions API server (vLLM, TGI, FriendliAI Engine, etc.) either raises a KeyError / TemplateNotFound error at request time, or falls back to a generic template that produces token sequences the model was never trained to handle — resulting in garbage output or a hard failure.chat_template value was taken verbatim from the canonical Qwen/Qwen3-8B release on Hugging Face. This is the correct template for the ChatML format Qwen3 was trained with, including support for tool calls and the optional enable_thinking reasoning mode.| File | Field | Before | After |
|---|---|---|---|
tokenizer_config.json | chat_template | (absent) | Qwen3-8B canonical ChatML Jinja2 template |
1from transformers import AutoTokenizer
2
3tok = AutoTokenizer.from_pretrained("<this-repo>")
4messages = [{"role": "user", "content": "Hello"}]
5prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
6# <|im_start|>user
7# Hello<|im_end|>
8# <|im_start|>assistant
9print(prompt)reasoning_effort Has No Effectreasoning_effort is an OpenAI API extension for models with budget-controlled extended thinking — where the depth of the model's internal reasoning chain is regulated at the server level (e.g., o1, o3, Claude 3.7 Sonnet extended thinking).chat_templateenable_thinking variable inside chat_template. Since chat_template was absent, the server could never render the thinking-enabled prompt format at all. Even if reasoning_effort were correctly mapped, thinking would remain off.reasoning_effort to enable_thinkingreasoning_effort does not automatically activate thinking. The inference server must explicitly read reasoning_effort from the incoming request and pass enable_thinking=True/False as a template variable when rendering the prompt. Without this mapping, the parameter is silently ignored.enable_thinking: true/false). The reasoning_effort values "low", "medium", "high" are meaningless unless the model was post-trained with reasoning budget forcing — a technique where target thinking length is conditioned on during RLVR/GRPO training so the model can produce calibrated reasoning depth at inference time. Qwen3-8B does not have this training.reasoning_effort Functional| Step | Where | What |
|---|---|---|
| 1 | tokenizer_config.json | Restore chat_template (done in this fix — prerequisite for all below) |
| 2 | Inference server | Map reasoning_effort != "none" → pass enable_thinking=True to template renderer; reasoning_effort = "none" or absent → enable_thinking=False |
| 3 | Inference server | Register Qwen3 model type as "thinking-capable" so the server knows to apply this mapping |
| 4 | Model post-training (for true effort gradation) | Retrain with reasoning budget forcing so "low" / "medium" / "high" produce meaningfully different thinking-chain lengths |