Research / The B70 notebook

A faster kernel is only half the story.

How Q8_0 weight reordering led from faster decode to a second-prompt regression, memory-pressure handling, and vocabulary alignment fixes.

HistoricalBY KATO / PMZFX6 MIN READEDITED
Evidence & scope

Historical llama.cpp/SYCL contributions, April–June 2026. Six commits are corroborated in retained upstream ancestry at 9d77fa172. PR pages were checked where available on September 10, 2026. This article does not claim a new benchmark or require manual patching of current builds.

Start with the layout

A kernel’s input layout is part of its implementation contract. Rearranging quantized weights can make a decode path more efficient, but every other consumer of those weights must still interpret them correctly.

PR #21527 added Q8_0 reorder optimization for the SYCL backend. The retained commit 0988accf8 is dated April 7, 2026. The historical PR title describes a roughly threefold token-generation improvement on its tested cases; this site does not turn that title into a general B70 speedup claim. A controlled chart would need the original paired results, model settings, and matching builds.

The engineering story continues after the first fast run. A layout change needs validation across execution paths, repeated requests, memory pressure, and shapes that do not align with the kernel’s assumptions.

Why the second prompt mattered

Decode and prompt processing did not use the same dequantization path. Once decode reordered the Q8_0 weights, later prompt processing needed to understand the rearrangement. The missing reorder-aware Q8_0 path caused corrupt output on subsequent prompts.

PR #21638 corrected that path and addressed an allocation failure when device memory was full. Its retained commit b1be68e8c is dated April 16, 2026; the GitHub page also identifies it as merged. These were correctness and failure-handling repairs around the optimization.

The practical test-design lesson is broader: reuse the same loaded instance for multiple requests. A process that exits after one successful answer cannot expose every state-dependent problem. A performance harness and a chat application’s lifecycle can exercise different behavior.

An edge case in vocabulary size

The vocabulary-alignment assertion belongs to PR #22035, commit 788fcbc5d, dated April 20, 2026. An older contribution summary grouped it under the wrong PR; the source record and patch identity keep these fixes separate.

Shape coverage matters because a frequently used model may satisfy an alignment assumption that another valid model does not. Include edge shapes and model-specific dimensions in regression cases. Passing one model should not silently become a claim about every vocabulary.

Beyond the Q8 path

Three further contributions in the retained history address different constraints:

Contribution Retained commit date Engineering focus
#21597 May 14, 2026 Level Zero allocation path for multi-GPU host-memory exhaustion
#21580 May 22, 2026 BF16 support in the DMMV decode path
#21700 June 15, 2026 Native subgroup sizing for K-quant DMMV

These are historical upstream contributions. The dates above label commit records, not a blanket claim about all merge metadata or current installed behavior. The old contribution page’s pending labels for the last two changes are inconsistent with the retained ancestry.

The allocator work also shows why a GPU-memory screenshot alone cannot explain total system behavior. Host RAM and device memory need separate observations. See the dual-GPU guide for the diagnostic distinction.

What to carry into your own tests

Treat optimization and correctness as a joint result. Keep a before/after configuration record, a numerical or application reference, and repeat-request coverage. Add memory pressure and nonstandard shapes deliberately; they are conditions that a friendly demonstration can avoid by accident.

Do not assume a historical workaround belongs in a current launch command. Check whether your selected revision already contains the change, and reproduce the symptom before attributing it to an old bug. The source link is a way to understand the fix and its scope.

The benchmark notebook follows the same standard: the April build is labeled dirty, missing patch provenance remains visible, and the measured figures retain their original dates. An honest limitation makes a result more useful to the next engineer.

Published . Editorial review 2026-09-10; test dates are stated separately. Suggest a reproducible correction ↗