Sync chat template with meta-models/Muse-Glimmer-30B (fixes duplicate reasoning effort)

#1
by Jiminator - opened
RadixArk org

This repo ships a stale copy of the Muse Glimmer chat template (7,175 bytes,
md5 6dba2759). Upstream fixed it in
meta-models/Muse-Glimmer-30B#35;
the current template is 9,992 bytes, md5 216c1d8e. This copies it verbatim.

Why this matters

The stale template appends its own reasoning directive unconditionally. If the
caller's system prompt already specifies one, the model receives two contradictory
instructions and the appended one wins:

system prompt stale template renders current template renders
Reasoning effort: low. Reasoning effort: low. + Reasoning strength: high. Reasoning strength: low.
Reasoning strength: low. Reasoning strength: low. + Reasoning strength: high. Reasoning strength: low.
(none) Reasoning strength: high. identical

The current template normalises "Reasoning effort" to "Reasoning strength" across
casings and only appends when the system prompt has no directive of its own.

Measured impact

Same prompt, same weights, greedy, on Muse-Glimmer-q4km-gs128-MLX via mlx-lm on
an M5 Pro, system prompt asking for low reasoning effort:

stale template current template
reasoning characters 160 102
total generated 225 167
wall clock 7.5 s 3.0 s
answer correct correct

So a user asking for low effort gets 57% more reasoning and 2.5x the latency for
an identical answer. It only manifests when the system prompt mentions reasoning
effort, which is why a default render is byte-identical and this went unnoticed.

Verification

No inference-code change is needed for the new template: serving
meta-models/Muse-Glimmer-30B (which already carries it) on stock upstream SGLang
passes the full tool-call suite 5/5 and splits reasoning correctly. The delta
between the two templates is mostly a minified-to-pretty-printed reformat plus the
one conditional above; none of the channel markers SGLang parses changed.

Jiminator changed pull request status to merged

Sign up or log in to comment