r/LocalLLaMA • u/returnity • 12h ago
Resources Improved Qwen3.8-Flash Chat Template (w/ Sharp Template terse option)
https://huggingface.co/nazeshinjite/Flash-Next-Chat-TemplatesI've been maintaining my own chat template for Qwen3.8-Flash-Next since it released, and after a discussion in another thread I decided to share it. I made a repo with my v1.4 template, the original Unsloth fixed stock template, and now a "Sharp" terseness mode version (based on /u/peculiar-ragdoll's original). On top of Unsloth's improved template I fixed the requests that still fail or render badly, and imported the relevant features/improvements from froggerics, as well as several of my own:
- Inline tags like <|think_low|> set the effort level for clients that can't send template kwargs.
- Repeated tool failures get escalating "diagnose first, then change course" notes.
- Tool arguments passed as a JSON string render instead of killing the request.
- Old turns no longer replay an empty <think></think> block.
- A stray </think> with no opening tag gets split out instead of leaking into the answer.
- Effort values like max, minimal and none no longer throw.
Normal thinking-on history renders byte-for-byte what Unsloth's template renders, so the KV cache is reused and nothing changes when things are going well.
For the Sharp version, I ported 27B Sharp's terseness block directly. This is what makes Tiel/Dirk/other models w/ the Sharp template respond less verbosely. It's appended after your system prompt, never replacing it. I kept Qwen's xhigh default instead of Sharp's medium. Terseness is a terse chat-template kwarg, on by default; {"terse": false} renders the v1.4 template normally, so you can A/B it on one server with no reload.
Quick test: Flash-Next UD-Q5_K_XL on llama.cpp, xhigh effort, temp 1.0 / top-p 0.95 / top-k 20, 8 everyday prompts (explanations, advice, a coding request, a vague "can you help with my project?"):
| Answer tokens | Reasoning tokens | Wall time |
|---|---|---|
| Thinking on (16 pairs) | −40% (shorter in 13/16) | −8% (mixed) |
| Thinking off (8 pairs) | −61% (shorter in 7/8) | n/a |
Note: I personally leave the terseness setting off, as I found it does reduce accuracy somewhat, and just use a medium effort or switch to Swift-1.5-Flash-Next if I need a quicker response. However, I know a lot of people love Tiel/Dirk/Sharp, so since I'd already put up the repo, I figured I'd offer that option too. Any feedback or improvement suggestions are welcomed!
EDIT: Updated to v1.5 with a fix that I think will fix that occasional weird "empty conversation" glitch that sometimes happens pre-tool call when the response intends going to go straight into a tool call, rather than saying something. I think its due to the template dropping the initial <|im_start|> special token.
3
u/No_Algae1753 12h ago
Gonna try that out and compare it to frogerric template
1
u/returnity 11h ago edited 10h ago
Please let me know. I included his (applicable) fixes in mine when I built it, which was before he updated to v22.5 with Flash compatibility, so mine is basically a superset of his.
2
u/leonbollerup 2h ago
Morning,
The horde of AI's worked thru the night.. 4700+ tests run (still things to fix).. i decided to just have claude dump everything here: https://github.com/leonbollerup/qwen-asgard-jinja
The tests was run against QFN by Claude Opus 5.5, verified by Fable and Astra.
Configuration was handeld by "skyclaw" (our own sysops ai)
So.. hopefully.. this is the best of all worlds..
Edit:
Take whatever is usefull, throw it away, join the repo.. whatever you do with this is up to you :)
7
u/leonbollerup 12h ago
Will test directly.. I use a combination of froggerics and chromics.. along with my own fixes - we use it for a business model offered to customers
Will share then we can compare notes