docs: 27B KL against the exact reference and the prefill work

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
This commit is contained in:
claudeandClaude Opus 5.5 committed 2026-10-24 06:02:28 +02:00
1 parent c571fa36b3
commit 8f2fd45750
1 file changed
+24 -1
+24 -1
View File
@@ -542,7 +542,30 @@ DFlash2 drafter** (device time a token 78 / 71 ms). With the fast kernels the dr
departs from plain decoding at a near-tie (byte 246 of 256 tokens): the M = 8 verify and the M = 1
GEMV round differently; with the exact kernels the two were identical.
Probes in the scratch directory, not in the tree: `m2bench.cpp` (decode GEMV variants on synthetic
**Accuracy (KL).** libref cannot run a 27B forward on this host in reasonable time, so the
reference is the SYCL engine with `XE2_EXACT=1` (every kernel in its exact form; each exact form
matched libref bit for bit wherever checked), recorded over a 3-document, 250-position mini corpus
in 64-token chunks (the model's DeltaNet chunk). The fast set against it: **KLD mean 0.0035-0.0037,
median ~0.0025, p99 ~0.021, top-1 95.6-97.2%, PPL ratio 0.995-0.998** (the model's own quantisation
error against bf16 is 0.0211 per its README). The fast set's KL is dominated by the fp8 activation
quantiser in front of every linear re-rounding small upstream differences; moving the prefill GEMM
from bf16 to fp16 activations took it 0.0041 -> 0.0035.
**Prefill (1792 tokens).** 26.3 s (68 tok/s) -> **17.0 s (105 tok/s)**:
- gdn_chunk_scan chain-parallel (a work-group of 256 a (head, 32 value columns), every phase's
independent chains spread, still bit-identical): 11.2 -> 4.6 s
- m2xfp4 GEMM fp16 (weight exact in fp16 after its column's e_max, activation fp16(a / R)) on a new
local-memory-tiled XMX kernel (128 x 128 tiles, 32 x 64 a sub-group, ~30 TFLOPS against the
card's ~98 fp16 DPAS peak, measured): 6.4 -> 3.7 s
- givens_dense_quant as batched XMX GEMMs for rows >= 17: 2.07 -> 0.70 s
- tried and dropped: a chunk-parallel kkt_solve (exact but slower, 1.44 -> 2.14 s).
Remaining prefill (profiled): chunk scan 4.6 s, GEMMs 3.7, attention 2.7 (head_dim 256, the
lane-per-key kernel), kkt 1.4, the rest ~2.4. A 27B prefill at 1200 tok/s needs ~65 TFLOPS of
GEMM alone, two thirds of this card's DPAS peak.
Probes in the scratch directory, not in the tree: `gemm.cpp` (XMX GEMM tilings), `peak.cpp`
(DPAS peak), `scan.cpp` (the chunk scan's phases), `m2bench.cpp` (decode GEMV variants on synthetic
m2xfp4 data), `chain.cpp` (the ordered-sum floor), `jmap.cpp` (joint_matrix_apply coordinates on a
packed B -- lost the device; not used).