Qwen-Sharp-Chat-Templates

froggeric's Qwen-Fixed-Chat-Templates v21.3, with a terseness system prompt spliced in. Model-agnostic: it names no model, so it drops into any Qwen3.5 or Qwen3.6 build without claiming to be something it isn't.

This is the template used by Dagger-Qwen3.6-27B and Nail-Qwen3.6-35B-A3B, published separately because the template is the portable part — the thing worth reusing is not tied to either model.

What it changes

Eleven inserted lines. Everything else is byte-identical to upstream v21.3.

{%- set _terse %}
Answer directly, after thinking. Lead with the answer, then only what it needs to be correct and usable.
Never: open with preamble or pleasantries; restate the question; add filler transitions; hedge with niceties; or repeat a point you've already made.
Always: keep essential steps, caveats, uncertainties, and specifics — never drop correctness or a needed warning for brevity. Keep the final answer lean. Use the least structure that conveys it (plain prose when short; lists or code only when they earn their place). If genuinely uncertain, say so and explain why — never omit uncertainty for the sake of brevity.
If a user request is genuinely ambiguous, ask a sharp question, don't guess.
{%- endset %}
{%- if not _sc %}
    {%- set _sc = _terse | trim %}
{%- else %}
    {%- set _sc = (_sc | trim) ~ '\n\n' ~ (_terse | trim) %}
{%- endif %}

Note the else branch: your own system prompt is kept, and the terseness block is appended after it. Nothing you pass in is replaced.

What it does, measured

Both rows below are the same weights with only the template swapped, so the difference is the prompt and nothing else. Measured on ThinkingCap-Qwen3.6-27B, MLX 6-bit, temp 1.0, n=3 seeds.

stock template Sharp template change
Claw-Eval, answer component 59.3 66.7 +7.4%
Claw-Eval, overall 55.0 58.8 +3.8%
Claw-Eval answer tokens 5393 2217 -59%
MMLU-Pro tokens per correct answer 1601 1248 -22%

Green is better in both directions: accuracy up, tokens down. Accuracy changes are absolute differences in score, token changes are relative.

Roughly: the same answers, in a bit over half the words. The accuracy column moves up rather than down, which is the part that matters — terseness that costs correctness is just truncation.

These figures come from one 27B model on two benchmarks. They are evidence that the prompt does something, not a promise of a specific number on your model.

Use

MLX / transformers — drop chat_template.jinja into the model directory.

hf download peculiar-ragdoll/Qwen-Sharp-Chat-Templates chat_template.jinja \
  --local-dir /path/to/your-model

GGUF — rewrite the embedded template without requantizing:

pip install gguf
gguf-new-metadata \
  --chat-template-config chat_template.jinja \
  input.gguf output.gguf

tokenizer_config.json — use chat_template_oneline.txt, the minified single-line form. It renders identically to the full template (verified by scripts/verify_template.py).

What it doesn't do

  • It is not a fine-tune, despite the base_model_relation: finetune tag — that is the closest vocabulary HuggingFace offers for "derived from," and it exists so this repo is linked from froggeric's. No weights are involved. It changes what the model is asked for, not what it knows.
  • It does not fix thinking retention by itself — that comes from froggeric's upstream template, which this builds on. If you splice only the terseness block into a stock Qwen template, you get the brevity and not the retention.
  • It is not tuned per model. Every model responds a little differently to a terseness instruction; measure yours. The numbers above are from a 27B; a 4B may need firmer wording.
  • The benchmarks are Qwen3.6. The template covers 3.5 and 3.6 alike — upstream unified them into one file in v17 — but every figure in the table was measured on a 3.6 model.

Credits

Everything structural here is froggeric's work — the retention fix, the tool-calling handling, the whole template. This repo adds a system prompt and nothing else. scripts/minify_jinja.py is froggeric's, with one patch: it now preserves newlines inside {% set %}…{% endset %} blocks, which upstream's template doesn't contain and this one does.

Apache-2.0, matching upstream.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for peculiar-ragdoll/Qwen-Sharp-Chat-Templates

Finetuned
(3)
this model