Views
No views yet
yunmorning/broken-model, created as part of an engineering debugging exercise.chat_template to tokenizer_config.jsontokenizer_config.json had no chat_template field./chat/completions:
OpenAI-compatible inference servers receive requests as a list of {role, content} message objects. Before any token is fed to the model, the server must serialize this list into a flat string using the model's chat template. This serialization step is handled by HuggingFace's tokenizer.apply_chat_template(), which reads the chat_template field from tokenizer_config.json.apply_chat_template() raises a TemplateError immediately — the request never reaches the model weights. The failure is pre-inference and 100% reproducible on every request.chat_template from the official Qwen/Qwen3-8B repository. The template implements:<|im_start|>{role}\n{content}<|im_end|>\nenable_thinking=False → injects <think>\n\n</think>\n\n after <|im_start|>assistant\n to suppress reasoning tokens<tool_call> / <tool_response> tagsbase_model in README.mdbase_model: meta-llama/Meta-Llama-3.1-8Bbase_model: Qwen/Qwen3-8B| File | Field | Value | Notes |
|---|---|---|---|
config.json | intermediate_size | 12288 | Verified via parameter count: total_size (16,381,470,720 bytes) / 2 (bfloat16) = 8.191B params. With intermediate_size=12288 the computed total is ~8.191B (matches); with 22016 it would be ~12.5B (does not match). |
config.json | max_position_embeddings | 40960 | Matches the standard context length configuration for Qwen3-8B. |
tokenizer_config.json | model_max_length | 131072 | Larger than max_position_embeddings, but this does not directly break inference and is sometimes seen in extended-context variants. |
config.json | rope_scaling | null | Consistent with the default context configuration. |
model.safetensors.index.json | Cross-shard weights | Layers 7, 17, and 27 span multiple shards | Looked consistent with normal safetensors sharding behavior. |
generation_config.json | temperature, top_k, top_p | 0.6 / 20 / 0.95 | Matches the official Qwen3 recommended sampling settings. |