Commit 475799a
fix(tokenizer): respect add_bos_token=false for Qwen3.6 (R7 regression fix)
The R1 BOS fix (commit 12e4d94) force-enabled BOS for Qwen3.6 family
via <|endoftext|> presence detection in vocab. This ignored the GGUF
metadata flag tokenizer.ggml.add_bos_token=false (set on both
Qwen3.6-27B and 35B-A3B) and broke chat-mode generation: 35B-A3B
IQ4_XS quantum prompt regressed deterministically from 149 tok EOS
to 94 tok rep loop.
Bisect (2026-04-26):
baseline 0829285 → 149 EOS
R1 12e4d94 → 94 rep ← regression starts here
HEAD c378f81 → 94 rep
+ this fix → 149 EOS ← restored
Root cause: Qwen3.6 chat template is self-contained
(<|im_start|>user\n…<|im_start|>assistant\n) and prepending BOS
breaks coherent generation. Verified via direct GGUF metadata read:
both 35B-A3B-IQ4_XS and 27B-Q4_K_M declare add_bos_token=false.
Fix: drop the auto-enable path; the qwen36_bos_override fallback
that follows now only fires when add_bos was set by an earlier
explicit path (e.g. the future -bos CLI flag).
Tier benchmark doc updated: 35B-A3B IQ4_XS row reverts to Tier 2
(149 EOS quantum) post-R7. SmolLM2-135M poem rep loop verified to
exist on baseline too — outdated 4-25 measurement, current
behavior is the true value.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c378f81 commit 475799a
2 files changed
Lines changed: 15 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
375 | 368 | | |
376 | 369 | | |
377 | 370 | | |
| |||
0 commit comments