Qwen3.8-Flash-Next chat templates

Three Jinja chat templates for Qwen3.8-Flash-Next, for use with llama.cpp:

File What it is
Sharp-naze-chat_template_v1.4.jinja Recommended. My v1.4 plus the terseness block from Sharp, toggleable
nazeshinjite-chat_template_v1.4.jinja My v1.4, built on Unsloth's template
Unsloth-chat_template_embedded.jinja The template embedded in Unsloth's GGUFs, extracted unchanged (sha256 12827f24…)
llama-server -m <model>.gguf --jinja --chat-template-file Sharp-naze-chat_template_v1.4.jinja

Sharp variant

This is v1.4 plus the terseness block from Sharp v22.5.0. The block is appended after your own system prompt and tells the model to skip preamble, restating the question and filler, while keeping every step, caveat and uncertainty it needs. Its first line follows the thinking mode, as in Sharp. Nothing else from Sharp is taken: the default effort stays xhigh.

Terseness is on by default. To turn it off, send "chat_template_kwargs": {"terse": false} per request, or start the server with --chat-template-kwargs '{"terse":false}'. With it off, the template renders exactly what v1.4 renders. Consider turning it off for coding harnesses that grade a strict edit format: on another Qwen fine-tune, Sharp cut aider edit-format compliance from 77% to 46%.

The Sharp variant was checked in jinja2 on 158 assertions. With terseness off it is byte-identical to v1.4; with it on, the block appears once, inside the first system turn, and the rest of the prompt is unchanged.

My changes in v1.4

Fix What it does
F1 Assistant turns in the history no longer replay a blank <think></think> block, which works around the empty-think poisoning problem. A <think>…</think> block inside the content is moved into the reasoning. Think-off turns keep the blank block, so each request still shares its prompt prefix with the previous one. If a reply contains a visible </think> with no opening tag, it is split into reasoning and answer instead of being shown verbatim.
F2 Effort values never raise: high, max, ultracode and extreme become xhigh; minimal becomes low; none and off disable thinking.
F3 Tool arguments passed as a JSON string render instead of failing the request.
F4 Escalates after repeated tool failures. The first failure gets a "diagnose first" note and later ones a "change course" directive. The detector was tuned on 248 real agent tool results: 100% recall, 88% precision.
F5 The tool instructions add two rules: parameter values are literal content only, and a failed call must not be resent unchanged.
F6 Reasoning is also read from reasoning (vLLM / Responses API) and thinking (Anthropic) message fields.
F7 Inline effort tags such as <|think_off|>, <|think_low|> or <|think_xhigh|> in a message set the effort level; the last tag in the conversation wins, and tags are stripped before rendering. This is useful for clients that cannot send template kwargs.

On normal think-on history, v1.4 renders byte-for-byte the same prompt as Unsloth's template. That was verified on 16/16 cases in jinja2 and 5/5 through llama.cpp's /apply-template. The fixes change behaviour only in the cases above. A system message in the middle of a conversation still raises an error, as it does in Unsloth's template.

Unsloth's changes to the stock Qwen template

Unsloth changed the stock template once, on 2026-08-26 with their first upload. As of 2026-10-16 it has not changed since. Every change targets a request that used to fail:

  • Developer role and merged system messages. A leading run of system and developer messages is merged into one system block. Stock rejects developer, and also rejects a second system message.
  • reasoning_effort: high maps to xhigh. Stock accepts only xhigh, medium and low.
  • No "No user query found" error. Conversations without a user turn now render.
  • Clearer tool-call errors. A tool call with no name raises a readable error. So do JSON-string arguments, which still fail the request, but with a readable message instead of a TypeError.

Generation prompts, think rendering and tool-call markup are identical to stock.

Credit: Unsloth for the base template. F1, F4, F6 and F7 adapt ideas from froggeric/Qwen-Fixed-Chat-Templates. The terseness block is from peculiar-ragdoll/Qwen-Sharp-Chat-Templates (Apache-2.0).

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 nazeshinjite/Flash-Next-Chat-Templates

Finetuned
(80)
this model

Collection including nazeshinjite/Flash-Next-Chat-Templates