Repository navigation
Render selected chat templates without blanket turn rewrites - #698
Conversation
|
SOURCE EVIDENCE: runtime LIVE EVIDENCE: real local quantized Osaurus UI, 12B QAT JANG_4M: eight user turns cover supported Off→On→Off→On thinking, tools absent/offered/called/absent, actual image+calculator, grounded text after image, exact text and identical-image/text replay, and process restart. Correct answers/natural stops/settled UI throughout. A separate restored-history emulation using the genuine transcript cut after its completed tool result also answers the next user correctly; this is not timed-cancellation proof. Eight ordinary turns plus one emulation pass their bounded correctness rows. Decode rates35.815–45.443 tokens/s are observations, not a speed comparison. Same-control restart restores1515/1627 input tokens from disk (3.362s load-inclusive TTFT); tool continuations report1305/1458 and2369/2595. Actual topology8KV+40rotating, pagedRAMoff,diskL2on,TurboQuantLayers0. Missing per-turn cache counts remain missing. Effective sampler follows bundle temperature1/top_k64/top_p0.95, no penalty override and sampler_was_changed=false; existing output limit16384, natural stops. FAILED/OPEN: E4B QAT JANG_4M first calculator turn succeeds at73.535/72.913 decode tokens/s. The following user turn gives the correct answer but includes unnecessary/malformed calls and an empty-output recovery; tool-quality score1/2 native turns, answer correctness2/2. It is retained as failed rather than counted from its final answer. The initial prompt preceding those calls is byte-identical under old runtime/current patch/pinned Google canonical rendering; no claim that this PR fixes that model/output/parser issue. Further canonical exporter work is isolated in jjang-ai/jangq#46, still draft. A subsequent API diagnostic also yielded malformed quoting and is not a quality pass. No full-family/quant certification, exact12BMXFP load claim, all-media-cache claim or M2GPU prevention claim. CI: both Linux SwiftPM and four container builds pass; macOS/CUDA queued. Lint requests1,024-file global formatting;31Tokenizer.swift formatting hunks are outside this PR's changed lines, other changed files absent. No global reformat/admin/gate change. Consumer all8CI checks pass in41170650897. Current source and native scope are frozen; prior unrelated acceptance remains retained. No tag, release, model upload or workflow retry. Receipt identities (private contents retained locally; no screenshots uploaded):
|
The tokenizer automatically rewrote selected templates so tool-result turns stayed open regardless of the following role. This can remove a valid close before a new user message and changes bundle/explicit-override templates without their owner's instruction.
Compile the selected template unchanged. Remove the blanket rewrite/cache, keep legacy-spelling diagnostics, and retain the deprecated identity
repairedentry point for source compatibility. Bundle/export corrections remain explicit and separate: jjang-ai/jangq#45 synchronizes the canonical next-role closure correction into both template locations.Five focused Swift Testing cases pass in an actual-source CPU control, after failing with seven issues against the original implementation. Coverage includes both old condition spellings, a rendered explicit tool-result/user boundary, unrelated formats, repeated calls and the tokenizer call site. Existing actual-template render controls: 192 renders, zero render errors; 128 Swift/Python byte comparisons agree. All32 corrected tool-result→user boundaries close; the original runtime rewrite leaves all32 open. These are render/source controls, not model-quality proof.
Draft pending the affected native Gemma proof and consumer pin. Prior unrelated model/kernel/cache/UI qualification is retained. No quantization, sampler, thinking-setting, GPU/cache policy, release tag or publication changes. The reported repeated reasoning markers are not declared causally resolved by these controls. Reference osaurus-ai/osaurus#3237. No screenshots or private evidence included.
CI at
e9ccbbd08dce79f6625c800db61624d25069c76b, run 41170320304: both Linux SwiftPM and four Linux container builds pass; macOS/CUDA are queued. Lint requests formatting changes across 1,024 files; 31 hunks in Tokenizer.swift are outside this PR’s call-site/comment change, and the other three changed files are absent from its diff. No repository-wide reformat or gate change is included. CPU controls load no model and measure no inference speed.