Instructions to use froggeric/Qwen-Fixed-Chat-Templates with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use froggeric/Qwen-Fixed-Chat-Templates with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Qwen-Fixed-Chat-Templates froggeric/Qwen-Fixed-Chat-Templates
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
Fix: inline-quoted </think> in assistant history swallows half the message as reasoning
Problem
When a history assistant message has no separate reasoning_content, the template splits content on the first </think>-like tag found anywhere — including one the assistant merely quoted (e.g. a conversation about chat templates, or code containing the literal tag). Everything before the quoted tag is silently reclassified as reasoning and stripped from history under default settings.
Note the naive guard (require content to start with <think>) is wrong: the generation prompt pre-fills <think> , so legitimate output contains no opening tag — it looks like reasoning... </think> answer.
Fix
Only treat a closing tag as a reasoning boundary when it is preceded by a newline (matching real model output, which emits </think> on its own line) or at the very start of content (empty-reasoning edge). An inline-quoted `</think>` mid-sentence no longer matches. The split token includes the leading newline so an earlier inline mention cannot hijack the split point. Degradation is graceful: a missed match leaves reasoning as visible content instead of eating the answer.
Each fix in this series is an independent PR based on current main (v20); they touch overlapping regions of the same file, so merging one may require the others to be rebased — happy to update them.
Hey @Moore2877 ! Nevermind about rebasing—I went ahead and manually resolved the merge conflicts and integrated your excellent fixes directly into the new v21 release on main. Thank you so much for this incredible series of PRs! Closing this as the code is now officially merged.