Views
No views yet
yunmorning/broken-model.config.json declaresarchitectures: ["Qwen3ForCausalLM"]
model_type: "qwen3"Qwen/Qwen3-8B.README.md declared base_model: meta-llama/Meta-Llama-3.1-8B, which does not match any other file in the repositorytokenizer_config.json: added missing chat_template/chat/completions request comes in as a structured messages array, but a causal LLM only consumes a single token sequence. The chat template bridges the two by rendering the messages into the role-marked format the model was trained on. For Qwen3 this is <|im_start|>{role}\n{content}<|im_end|>\n, terminated by <|im_start|>assistant\n to cue generation.tokenizer.apply_chat_template(messages, …) on every request. With the field absent the call raises and the request fails before any forward pass.chat_template was the only field missing in tokenizer_config.json (5,374 B vs 9,732 B in the official Qwen3-8B). Its value was copied verbatim from Qwen/Qwen3-8B.validate_fix.py and ran it to validate. It loads the patched tokenizer and calls apply_chat_template() on a conversation1tokenizer = AutoTokenizer.from_pretrained("./broken-model-fixed")
2messages = [
3 {"role": "system", "content": "You are a helpful assistant."},
4 {"role": "user", "content": "What is 2 + 2?"},
5]
6prompt = tokenizer.apply_chat_template(
7 messages, tokenize=False, add_generation_prompt=True,
8)<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
What is 2 + 2?<|im_end|>
<|im_start|>assistantREADME.md: corrected base_model fieldbase_model from meta-llama/Meta-Llama-3.1-8B to Qwen/Qwen3-8B to match the actual architecture declared in config.json and the weight structure in the safetensors files.