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
Add a `_default_reasoning_effort` knob and remove the dead `_initial_effort` line
Summary
Users who cannot pass chat_template_kwargs (LM Studio and similar UIs) have no working way to change the default reasoning effort. A user in peculiar-ragdoll/Qwen-Sharp-Chat-Templates#3 (same code as here) edited {%- set _initial_effort = 'medium' %} to 'xhigh' and saw no effect. That is expected: _effort_raw falls back to the literal 'medium' two lines above, and the if/elif/else that follows always overwrites _initial_effort, so that line is dead code.
Changes
chat_template.jinja: one knob,{%- set _default_reasoning_effort = 'medium' %}, with a one-line Jinja comment, used as the fallback for_effort_raw. The dead_initial_effort = 'medium'line is removed (theelsebranch still sets'medium'). Setting the knob to'none'defaults to non-thinking mode; an explicitreasoning_effortkwarg still overrides the knob. Rendering with no kwargs is byte-identical to before.chat_template_oneline.txt: regenerated withscripts/minify_jinja.py(the comment is stripped there, as all comments are).scripts/test_v22.py: new test 24c renders a patched copy of the template with the knob set to'xhigh'and'none', checks the stock default injects nothing, and checks an explicit kwarg still wins.README.md: a short "Editing defaults without kwargs" list in the reasoning-effort section, naming the three top-of-file defaults (_default_reasoning_effort,enable_thinking,_tool_format— the last one is what #79 already tells LM Studio MLX users to edit).
The {#- … #} comment form is accepted by minja (comment_tok regex allows the - trim marker) as well as Jinja2, so llama.cpp / LM Studio / oMLX / vLLM all parse it.
Verification
python3 scripts/test_v22.py → 101/101, and again with QWEN_TEMPLATE_FILE=chat_template_oneline.txt → 101/101; python3 scripts/test_v21.py → 9/9; python3 scripts/fuzz_template.py --cases 300 → clean.
Merged. Putting _default_reasoning_effort right at the top makes it way simpler for LM Studio users who just want to tweak the default without messing with the mapping block.