Minimal Fix for yunmorning/broken-model
This repository provides a structural fix for the yunmorning/broken-model, addressing critical metadata mismatches that prevent standard inference.
๐ Problem
The original model failed to function with the FriendliAI v1/chat/completions endpoint. When queried via a Python wrapper, it triggered the following error:
no configured chat prompt template; use non-chat endpoint instead
๐ Analysis
- Architecture Mismatch: While the human-maintained README originally cited
meta-llama/Meta-Llama-3.1-8B, the machine-maintainedconfig.jsonandtokenizer_config.jsoncorrectly identify a Qwen3 architecture. - Base Model Identification: Further investigation confirms the true base model is Qwen/Qwen3-8B.
- Root Cause: The local
tokenizer_config.jsonwas missing thechat_templatekey, which is required for the Chat Completions API to format messages into the model's expected internal prompt structure.
๐ฉน Fix
To resolve these issues while maintaining a clean repository structure:
- Metadata Alignment: Updated
README.mdYAML front matter to reflect the correctbase_model(Qwen3). - Template Implementation: Decided to separate the large (~4KB) Jinja template into a standalone file for better maintainability and readability.
- New File Added:
chat_template.jinja. This file contains the pretty-printed Jinja2 logic sourced from the official Qwen3 reference.
๐ Usage
With chat_template.jinja present in the repository root, modern inference engines will automatically detect and use the correct formatting for Chat completions.
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("robnav/fai_bm_fix2")
# The template is now automatically loaded from chat_template.jinja
- Downloads last month
- 1
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support