Commit Graph
419 Commits
Author SHA1 Message Date
pascallinxweilerandClaude Opus 5.5 5d59701b82 libxe2: m2xfp4 verify GEMM reads e_max itself and stores y when K is not split
The register form spent ~60 us a call in launches around it: e_max over the weight's exponents, a
finalize over the partials, and an activation prepass on 8 work-groups. A lane now reads its
column's exponents for e_max, an unsplit launch stores y with its factors directly, and the
prepass runs a work-group a (row, 2048 columns). N=34816 463 -> 400 us, N=5120 K=17408 249 ->
207, N=16384 247 -> 216, N=5120 K=25600 373 -> 303. Same arithmetic: 185/185 model cases, worst
rel_l2 1.46e-3 as before. Tried and slower: the activation staged in local memory a split at a time
(96 KiB a work-group starves occupancy: 1585 us) or a step at a time behind a barrier (506 us).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 14:51:18 +02:00
pascallinxweilerandClaude Opus 5.5 b605debcdb libxe2: givens_dense_quant on register DPAS for rows <= 16 -- 64 -> 24 us a decode/verify call
At a verify's 8 rows the float-pair form ran 80 work-groups (n=5120, two parts), each walking its
rows in turn. A (part, group)'s rotation is now one small GEMM on dpas_f16: the rows' inputs
fp16(x / D) in local memory as A columns, a lane's B column its output's row of T, T read once for
every row; then libref's quantiser. The prefill form's arithmetic (fp16 activation, f32 sums), held
to the same tolerance: 400/400 live oracle issues agree (rel at most 4.5e-3, p99 4e-4). Per
speculative round 18.5 -> ~5.5 ms. XE2_GIVENS_PAIR=1 keeps the float-pair form (rel 0).

Also: the BetterBench row for b0e34c6 (decode 28.9, prefill 131.3 @2000) and the round's notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 14:27:06 +02:00
pascallinxweilerandClaude Opus 5.5 b0e34c6324 libxe2: m2xfp4 verify GEMM on register DPAS -- no local-memory round trip
SPV_INTEL_subgroup_matrix_multiply_accumulate gives DPAS on operands in registers (dpas_f16 in
xe2_common.h; libxe2's link enables the extension). Its B operand is a lane's column as dwords of
fp16 pairs, which is what a lane decodes from its codes, so the 2 <= M <= 16 m2xfp4 GEMM no longer
writes the decoded weights to local memory and reads them back as a joint_matrix tile; the
activation is transposed once so a lane's A column is one 16-byte load. 15-20% a call at M = 8
(N=34816 K=5120 518 -> 463 us, N=5120 K=17408 312 -> 249 us). Same products: rel_l2 at most
1.46e-3 as before (185/185 model cases). XE2_M2_JM=1 keeps the local-memory form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 13:56:02 +02:00
pascallinxweilerandClaude Opus 5.5 84732432c0 libxe2: gdn recurrent update with typed operands and coalesced state rows -- 700 -> 285 us a verify call
The register kernel read every element through the dtype-switching accessors, so a row's 128
state loads did not issue together, and a lane stored its own row 512 bytes from its neighbours.
It is now templated on the staged q/k/v type and, for an f32 state with contiguous rows, moves a
work-group's 16 rows through local memory in coalesced lines. The anchor replay's decays are
taken one token a lane. At the speculative verify (8 tokens): the 8-token pass 408 -> 101 us, the
replay 222 -> 110 us; 48 calls a round, 32.7 -> ~13 ms. Bit-identical to libref (fixture 90/90 at
rel_l2 0, 400/400 live oracle issues).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 12:42:02 +02:00
pascallinxweilerandClaude Opus 5.5 c943bc65e3 libxe2: rmsnorm_quant_fp8 with 16-byte loads for bf16 rows -- 112 -> 44 us a call
Half the norm's time was its per-element loads of x, the residual and the gain. bf16 rows (gain
bf16 or f32) now load and store 8 values at a time and a 128-group's codes go out 8 bytes a lane;
the arithmetic and the ordered sum are the general form's. Bit-identical to libref (kbench rel_l2
0; 408/408 live oracle issues). 128 calls a speculative round: 17 -> 6.5 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 12:01:34 +02:00
pascallinxweilerandClaude Opus 5.5 8abcee5d35 libxe2: 8-row bf16 GEMMs and the E4M3 logits head on XMX
At M <= 8 the bf16 GEMV re-read the activation for every column; it now stages 8 rows in local
memory and runs bf16 DPAS against the weight, K split to fill the card: N=96 164 -> 20 us. The
joined E4M3 head decodes its codes by bits into a packed fp16 tile and runs fp16 DPAS, a scale
block's sum scaled per column in f32: 9.7 -> 3.5 ms at M = 8, and 3.9 -> 3.4 ms at M = 1, so decode
takes it too. Held to the gemm tolerance (rel_l2 1.6e-3, as before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 12:01:34 +02:00
pascallinxweilerandClaude Opus 5.5 ad3b17a70d libxe2: the speculative round's selection ops -- w2a8 head on int8 DPAS, dflash_select a sub-group a sequence, row_topk in two stages
The DFlash2 drafter's 2-bit vocabulary head (N=248320) forms each group's integer sum on int8 DPAS
(8 x 32 by 32 x 16), the u2 codes unpacked straight into the packed B tile; a lane owns a column
and adds libref's group terms in order: 24.0 -> 4.2 ms a round, bit-identical to the libref-checked
sub-group form on 63 live calls. dflash_select scores the 16 candidates in parallel lanes, each in
libref's order, lane 0 taking the first strict maximum: 11.6 -> 0.5 ms. row_topk takes each of 128
chunks' top R, then the top R of the winners: 3.2 -> 0.95 ms. Both exact against libref (fixture,
engine oracle).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 12:01:34 +02:00
pascallinxweilerandClaude Opus 5.5 f49aee84f0 libxe2: attention value rows 16 bytes at a time at head_dim 256 -- 2.72 -> 0.88 s a 27B prefill
The lane-per-key attention read bf16 value rows with 16-byte loads only at head_dim 128; at 256
(Qwen3.8's full attention, 16 dims a lane) every element went through the generic loader. Two
16-byte loads a lane now. rad-kbench 138/138 on the fixture and 33/33 on the 27B (worst rel_l2
1.5e-4). SYCL_PROGRESS records the first 27B BetterBench run (5720a95): decode median 19.1 tok/s,
prefill 113.4 tok/s at 2000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 06:28:35 +02:00
pascallinxweilerandClaude Opus 5.5 68db6023fd 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
2026-10-24 06:02:28 +02:00
pascallinxweilerandClaude Opus 5.5 5720a958e4 libxe2: givens_dense_quant on XMX for prefill rows -- 2.07 -> 0.70 s over a 1792-token prefill
For 17 or more rows the rotation is a batch of GEMMs, one a (part, 128-column group): the input
fp16(x / D) per part, the f16 rotation as B, a batched form of the tiled fp16 XMX kernel
(xmx_f16_batched) into f32, then libref's quantiser a (row, part, group). The input rounded once
to fp16 where libref sums in double: a fast kernel. KL against the exact reference: mean 0.0037,
top-1 97.2% (0.0035 / 95.6% before: within the noise of 250 positions). Up to 16 rows the float-pair
kernel stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 05:55:19 +02:00
pascallinxweilerandClaude Opus 5.5 57f02bc12d libxe2: a local-memory-tiled fp16 XMX GEMM for the m2xfp4 prefill -- 27B prefill 91 -> 105 tok/s
xmx_f16_tiled: a 128 x 128 work-group tile, 4 x 2 sub-groups of 32 x 64 (16 accumulators, the
large register file), K in steps of 32 with A and a VNNI B staged in local memory, double
buffered, each sub-group's A tiles loaded once a K16 step; the accumulators stored straight to an
f32 scratch and scaled into y by a second kernel (a generic store in the epilogue spilled them and
ran 3x slower than the old tiling). ~30 TFLOPS on the 27B's prefill shapes in a standalone probe
against ~18 / ~11 for the previous per-sub-group tiling (the card's measured fp16 DPAS peak: ~98).
gemm_nt_q over a 1792-token prefill 6.4 -> 3.7 s. KL against the exact reference unchanged (mean
0.0035, top-1 95.6%): the same products.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 05:49:41 +02:00
pascallinxweilerandClaude Opus 5.5 e0bfeb54f8 libxe2: chain-parallel gdn_chunk_scan and an fp16 m2xfp4 prefill -- 27B prefill 68 -> 91 tok/s
- gdn_chunk_scan for head_k = 128, chunk 64: a work-group of 256 a (sequence, head, block of 32
  value columns), the chunk's k, q (rows padded), the block's slices of v, S, W, V' and the sA rows
  in local memory (~124 KB); every phase of a chunk is thousands of independent chains -- W[j][e],
  V'[i][e], R[i][j], O[i][e], S[d][e] -- each one work-item's, in libref's order, A staged in local
  memory, the decays e^{g_i - g_j} (libref's double exp) once a call. Still bit-identical (rel_l2 0,
  the 27B's geometry, 1..32 rows and multi-chunk). 233 -> 96 ms a call at 1792 tokens.
- m2xfp4 at M >= 17 now fp16 on XMX: the weight times 2^(127 - e_max(n)), exact in fp16; the
  activation fp16(a * a_scale / R_m); y = acc * R_m * 2^(e_max - 127) in a new scaled fp16 XMX
  kernel (xmx_f16_scaled). fp16's 2^-11 step instead of bf16's 2^-8.

KL on the 27B against an XE2_EXACT=1 reference (every kernel exact, each matched to libref bit for
bit; 250 positions, full vocabulary): mean 0.0041 -> 0.0035, p99 0.027 -> 0.021, top-1 96.8% ->
95.6%, PPL ratio 0.998. The fast set's KL is dominated by the model's own fp8 activation quantiser
re-rounding small upstream differences.

27B prefill of 1792 tokens: 26.3 -> 19.7 s (68 -> 91 tok/s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 05:33:08 +02:00
pascallinxweilerandClaude Opus 5.5 0376adeb92 docs: the 27B bring-up and its first fast kernels in SYCL_PROGRESS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 04:43:34 +02:00
pascallinxweilerandClaude Opus 5.5 47af275664 libxe2: the gated delta net's recurrence with its state in registers -- still bit-identical
For head_k = 128 each lane keeps its value column's 128 state values in registers (the 256-entry
register file, grf_size<256>), k and q spread over the sub-group and read by compile-time
broadcasts; every chain over d is libref's, in order. rad-kbench on the 27B's geometry (48 heads,
128 x 128, anchor form, q_len 1..16): rel_l2 0. gdn_conv_recurrent_update 243 -> 173 us a call in
plain decode, ~1000 -> 651 us at the verify width. XE2_GDN_SLM=1 keeps the local-memory form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 04:43:11 +02:00
pascallinxweilerandClaude Opus 5.5 55a350f0c6 libxe2: the DFlash2 path fast -- exact draft head, DPAS verify GEMV, parallel rerank
- gemm_nt_q over the zero-point grids at M <= 16 (the drafter's 2-bit vocabulary head, N=248320):
  a sub-group a column, the group sums exact integers in f32, libref's group terms added in group
  order through lane broadcasts -- bit-identical to the exact kernel on the live head (checked in
  the engine: 0 differing bytes of 3.5 MB, every round). 252 ms -> well under 1 ms a call.
- m2xfp4 at 2 <= M <= 16 (the verify width) on XMX: a lane a column decodes its codes a 64-byte line
  at a time into its sub-group's VNNI slice of local memory (subnormal-bit fp16 pairs times
  (1 + k/4) * 2^(e - e_max + 14)), eight K16 DPAS a step against the permuted fp16 activation,
  K split for narrow N, partials added in order. On the vector ALUs M = 8 cost five times M = 1;
  gate_up at M = 8 1159 -> ~490 us. rad-kbench on the 27B: 50/50, rel_l2 ~8.5e-4 (tol 4e-2).
- logit_rerank: a work-group a row, a sub-group a candidate along K, libref's double sum as a float
  pair (two-product, two-sum, a fixed lane tree), libref's selection; 136 ms -> negligible a call.
- the gated delta net's gate, beta and decay (libref's double exp / log1p) once a (token, head)
  in a prepass instead of once a column block; still bit-identical (10/10 at rel_l2 0).
- profile_decode.sh: KEEP=DIR keeps the per-geometry tables.

27B on the B65, greedy: 12.1 tok/s plain, 13.2 tok/s with the drafter (device time a token
217 -> 76 ms under speculation). The drafter's text now departs from plain decoding at a
near-tie (byte 246 of 256 tokens): the verify forward runs the M = 8 DPAS path and plain decoding
the M = 1 GEMV, whose roundings differ (~1e-3); with the exact kernels the two were identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 04:37:16 +02:00
pascallinxweilerandClaude Opus 5.5 07cdc546a3 libxe2: fast decode kernels for Qwen3.8-27B-PARO-M2XFP4 -- 0.1 -> 12.1 tok/s on the B65
- m2xfp4 GEMV (M <= 16): e2m1 decoded to fp16 by bits alone ((mag << 9) | sign << 15 is exactly
  e2m1 * 2^-14; the card keeps fp16 subnormals), K permuted (u, u + 4) inside each 8 so a code
  pair is one shift and mask, the activation as fp16(a * a_scale / R * 2^14) in that order, half2
  subgroup and group sums, f32 across groups; four columns a sub-group at decode. The scalar
  form was ALU-bound (~10 ops a weight, 80 ms a token); this one runs at 415-525 GB/s on the
  27B's shapes in a standalone probe. rad-kbench against libref on the container: rel_l2 ~5e-5 to
  ~3e-3, tolerance 4e-2.
- m2xfp4 prefill (M >= 17): the weight decoded to bf16 (exact) and the activation to
  bf16(e4m3 * scale), then the bf16 XMX GEMM per part.
- givens_dense_quant: a sub-group an output, the rotation row read coalesced, libref's double sum
  as a float pair (two-product and two-sum, ~48 bits); the double form stays for XE2_EXACT=1.
  146 -> 5.4 ms a token.
- the joined fp8 head (logits_gemm, M <= 16): E4M3 to fp16 by bits ((b & 0x7F) << 7 is E4M3 *
  2^-8), bytes (0, 2), (1, 3) as half pairs; an i8 head or a narrow scale block element by element.
  43 -> 3.9 ms.
- gated delta net, still bit-identical to libref: the decode step split over 16-column blocks
  (384 work-groups, not 48) with the gated norm in a second kernel and the anchor replay its own
  launch (block 0 rewrites the factors other blocks read); the chunked scan and the kkt solve
  work-group parallel; persistent staging (workspace slots) instead of a malloc and a wait a call.
- rmsnorm_quant_fp8: the row in local memory, loads issued before stores, the ordered sum fed by
  sub-group broadcasts -- still libref's chain (a probe puts that chain's floor at ~32 us for 5120).
- round_dt converts the float dtypes directly.

rad-kbench: 1410/1410 on the fixture; the 27B container's M <= 32 bands 77/77. Decode (greedy, no
speculation) 12.1 tok/s, coherent text; with the DFlash2 drafter 5.3 tok/s and the same text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 03:22:48 +02:00
pascallinxweilerandClaude Opus 5.5 4921641578 libxe2: every op Qwen3.8-27B-PARO-M2XFP4 needs, correctness first -- the 27B serves on the B65
Kernels, each libref's arithmetic in libref's order:
- gemm_nt_q at m2xfp4 (xe2_gemm_m2.cpp) with libref's m2 layout hooks, and givens_dense_quant
  (xe2_givens.cpp, the rotation in double as libref's)
- the gated delta net (xe2_gdn.cpp): gdn_conv_prep, gdn_conv_update, gdn_kkt_solve, gdn_chunk_scan,
  gdn_recurrent_update (per-candidate and anchor state forms), gdn_gated_rmsnorm,
  gdn_conv_recurrent_update; each work-item one iteration of libref's parallel loop, the
  per-(sequence, head) workspaces in a shared device workspace (xe2_common: workspace())
- rope's multi-component modes (mrope, imrope, axial) and rope_table
- logits_gemm over an fp8 128x128 joined head, gemm_nt_bias with its epilogue
- mul, sigmoid, scatter_rows, layernorm, grid_embed, attn_dense (the vision tower)
- dflash_conv and logit_rerank (plain and joined head) for the DFlash2 drafter

libref's gemm_m2 gains the parts (pb1/pb2) every other ParoQuant grid and libr4d's mx_parts
already define -- weight rows [0, e1), [e1, e2), [e2, N) read activation copies 0, 1, 2 side by
side -- since this model's fused projections are rotated per piece and the oracle declined them;
its shape hook widens a and a_scale by the part count. Both m2 arms now take the stored
codes-then-meta blob as the engine describes it, u8 [N, K], beside the shape hook's rank-1 form
(libref refused the engine's launch; only libr4d had been run on it).

rad-kbench on the fixture: every new row at rel_l2 0 (90 gdn/givens cases, 108 rope, 80
elementwise, 20 attn_dense, the drafter's and the heads'). On the B65 the model starts with every
op on the card and answers "The capital of France is" -> " Paris.\nThe capital of Germany is
Berlin.\nThe capital of Italy is" (greedy), at 0.1 tok/s: the correctness-first kernels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-24 00:30:40 +02:00
pascallinxweilerandClaude Opus 5.5 f98b4070cd docs: Qwen3.8-27B-DFLASH2-PARO-M2XFP4 is the model from now on; its SYCL op gap and plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 23:31:22 +02:00
pascallinxweilerandClaude Opus 5.5 6174d5ee5c tests: kbench_m2xfp4 only in a HIP build -- it loads libr4d
The test from the m2xfp merge names --kernels libref:libr4d; a CPU-only or SYCL build has no
libr4d, so the replay loaded nothing and failed in 0.02 s. Guarded on RAD_HIP_FOUND as the tree's
other libr4d tests are. ctest -LE 'gpu|oot' after the merge: 84/89, the five known failures
(images_test and videos_test: no FFmpeg; glm5next, gbnf_shard2, quant_ggml: CPU budget).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 23:30:24 +02:00
pascallinxweilerandClaude Opus 5.5 6fbe59b7b0 Merge hugypufy/radiance m2xfp: M2XFP4 weights (upstream PR #203)
The M2XFP4 encoding (e2m1 codes, e8m0 per-32 scales, a u8 per-subgroup metadata plane, learned
Givens rotations): libref and libavx kernels, libr4d HIP kernels, the packer and the tests, as on
the branch (8 commits on 9eaf10d, radiance 1.11.0). Taken for Qwen3.8-27B-DFLASH2-PARO-M2XFP4,
the container used for testing and optimisation from now on; merged without conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 23:09:18 +02:00
pascallinxweilerandClaude Opus 5.5 e74e5b2413 sycl: profile_decode.sh reports calls and us a call; the BetterBench runs recorded
The decode profile now prints calls a step and the time a call for every op, from the same two
differenced runs. SYCL_PROGRESS records the a869226 run that was missing from the table and the
b07da2a run: decode 51.8 / 41.4 tok/s (median / 1% low), prefill 1575.6 tok/s @2000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 23:01:05 +02:00
pascallinxweilerandClaude Opus 5.5 b07da2a121 libxe2: the long-K decode GEMV splits K two ways in the work-group -- decode 55 -> 57 tok/s
At M = 1 a GEMV is N / 2 sub-groups: for down_proj (N=2048, K=6144) that is a tenth of the card's
threads, each walking K alone. With K >= 4096 the work-group's sub-groups now take two halves of K
for the same columns and add the halves in order through local memory (deterministic, one kernel).
Per shape, cold: 59.7 -> 52.2 us; 4-16 ways no better, and splitting the K=2048 shapes slowed them,
so they keep one.

rad-kbench 361/361 and 350/350; KL mean 6.0e-4; greedy against libref 7/8 (the eighth a near-tie).
Decode 57.3 tok/s at a short context, 51.4 after a 1797-token prompt.

SYCL_PROGRESS records the per-shape times, the variants dropped, and what was taken from reading
GRIMOIRE (ideas only: it is GPL-3.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 22:13:39 +02:00
pascallinxweilerandClaude Opus 5.5 10455f2e1a sycl: rad_memcpy_ranges_async reads its range list on the device, as the contract says
The SYCL backend read the list on the host at the call. device.h says the kernel reads it when it
runs, so it may live in device memory or be written by earlier work on the stream; rad-kbench's
timer keeps it on the card, and --bench / --timing-only segfaulted in calibration. The prefix is
now one copy and the ranges one kernel after it (a work-group a range, 4-byte words, as the HIP
card's aql_copy_ranges), so a range over the prefix still lands last. device_test_sycl passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 21:38:30 +02:00
pascallinxweilerandClaude Opus 5.5 7a58b31c80 libxe2: the decode GEMV takes two output columns a sub-group -- gemm_nt 9.1 -> 8.5 ms a step
At M = 1 a sub-group now streams two weight rows at once; the band of 2..16 rows keeps one column a
sub-group. The accumulators are sized by the band at compile time, since four columns at sixteen
rows spilled and ran slower than one. Measured at a 1.8k context: one column 9.1 ms of gemm_nt a
step, two 8.5 (~465 GB/s against the ~600 GB/s a plain read kernel reaches on the card, measured
with incompressible data), four 10.9.

rad-kbench 361/361 and 350/350; KL against libref mean 6.0e-4, p99 2.9e-3, top-1 98.4%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 21:09:38 +02:00
pascallinxweilerandClaude Opus 5.5 580d438d2b libxe2: attention scores a key a lane with 16-byte loads -- decode 32 -> 55 tok/s
Each sub-group now takes sixteen keys a step, one a lane: the lane scores its key in full against
the query in local memory, one max and one sum update the flash state, and the value rows are added
with each key's weight taken from its lane. bf16 cache rows are read 16 bytes at a time, and each
row's own visible span is split evenly 32 ways on the device instead of the context limit (which
left most partitions empty at a short context).

rad-kbench 138/138 and 132/132; KL against libref mean 5.7e-4, p99 3.1e-3, top-1 98.6%.
MiniCPM5-2B on the B65: decode 55 tok/s at a short context and 49 tok/s after a 1797-token prompt
(was 32 and 30); that prompt's prefill 1.62 s, 1109 tok/s (was 4.61 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 20:58:52 +02:00
pascallinxweilerandClaude Opus 5.5 f5614a03bb libxe2: the norm and the fp8 quantisers 3-4x faster at decode, still bit-identical to libref
At one row a work-group, rmsnorm_quant_fp8 took 108 us and gated_quant_fp8 84 us a call (26% and 10%
of a decode step at a 1.8k context). The ordered sum of squares now reads its squares eight at a
time and adds them in the same order; quant_group computes a group's values once into registers and
writes out_bf16 itself; gated_quant_fp8 spreads a row's independent groups over ceil(groups/16)
work-groups. rad-kbench: 208/208 and 206/206 at rel_l2 0.

scripts/sycl/profile_decode.sh isolates decode steps' per-op device time (two profiled runs of the
same request, 1 and 1 + STEPS tokens, differenced). Decode at 1.8k context: 34.8 -> 26.6 ms of
device time a step; the two ops 9.1 -> 3.7 and 3.5 -> 0.9 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 20:47:13 +02:00
pascallinxweilerandClaude Opus 5.5 880c218375 libxe2: split-KV attention -- a kv head's keys read once for its query heads, decode across the card
The long-context decode profile was 70% attention: one work-group a (row, head) left most of the
card idle at one row and read each kv head eight times. xe2_attn_paged now splits a row's keys into
partitions of 32 or more across work-groups, each work-group a (row, kv head, partition) whose
sub-groups are the kv head's query heads, the partial softmax states merged from 64 MiB of scratch
(the scratch hook); prefill-sized row counts take one partition and write directly.

rad-kbench 138/138 and 132/132, KL against libref mean 5.8e-4, p99 3.2e-3, top-1 98.5%. Decode
after a 1797-token prompt 16.2 -> 29.8 tok/s; short-context decode 32 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 20:42:38 +02:00
pascallinxweilerandClaude Opus 5.5 355dc1b112 libxe2: Phase 4 step 2 -- bf16 XMX GEMM for prefill and a one-pass paged attention
xe2_gemm_nt_xmx / xe2_logits_gemm_xmx (M >= 17, bf16): joint_matrix M8 N16 K16 with use::b loaded
column-major straight from the [N, K] weight, eight sub-groups a work-group on one 64-column slice
so a B tile is in cache for all of them; tail rows go to the GEMV and shapes the tiles cannot read
to the exact kernel. xe2_attn_paged: one pass with an online softmax, keys over eight sub-groups,
head_dim over lanes, libref's masks, windows, ragged batches and fp8 descales. Both keep their
exact twins under XE2_EXACT=1.

rad-kbench: fixture 499/499, MiniCPM5-2B 482/482 (worst rel_l2 1.7e-4). KL against the libref
reference over 1914 positions: mean 5.8e-4, p99 3.2e-3, top-1 98.7% -- inside the bound.
Prefill of a 1795-token prompt: 4.57 s, 393 tok/s (was ~17); decode 33.2 tok/s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 20:34:02 +02:00
pascallinxweilerandClaude Opus 5.5 a869226800 libxe2: Phase 4 step 1 -- a bandwidth-bound decode GEMV and an ordered sum from local memory
The profile of a MiniCPM5-2B decode step on the B65 (232.8 ms) was 79% gemm_nt, reading its
weights at 62 GB/s, and 13% the norms' serial sum of squares.

- xe2_gemm_nt_gemv / xe2_logits_gemm_gemv (priority 10, M <= 16, bf16): a sub-group an output
  column, 16-byte coalesced weight loads, a tree reduction. Not libref's order: rad-kbench passes
  them at the gemm tolerance (fixture 361/361, MiniCPM5 180/180, worst rel_l2 1.6e-4), and
  XE2_EXACT=1 sends every launch to the exact kernel for bisecting.
- The norms form their squares in parallel into local memory and add them in index order: still
  bit-identical to libref.

Decode 4.2 -> 35.5 tok/s. Against a libref-only host build, over 1914 positions of the repo's docs
with every position through the GEMV: KL mean 5.9e-4, p99 3.5e-3, top-1 98.5% -- libavx's own
distance from libref is 5.7e-4 / 3.0e-3 / 98.6%. The exact path scores KL 0, top-1 100%.

docs/SYCL_PROGRESS.md: the profile, the KL bound (D13), and the user's decision to use the bf16
container for Milestone B instead of the fp8 one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 19:48:40 +02:00
pascallinxweilerandClaude Opus 5.5 43d84111c2 libxe2: the DSpark drafter's ops -- speculative decoding on the B65, greedy-identical
Every op MiniCPM5-2B bf16's DSpark drafter issues now has a libxe2 row, each libref's arithmetic in
libref's order: gemm_nt_q over fp8a8 block-scaled codes (quant_dot per output, the scale grids
worked out on the host as make_scales does), gemm_nt_q_gated with the gated fp8 epilogue, the w2a8
vocabulary head (gemm_zp; b_scale in libref's joined planes form through a copy of libref's layout
hook, so both libraries ask for the same stored bytes, its planes found on the device),
quant_act_i8, silu_mul, row_topk and dflash_select.

rad-kbench: MiniCPM5-2B 191/191 at rel_l2 0. The fixture found the gated GEMM refusing a 27B
geometry its row accepted (it held the whole N-wide row in local memory); it now keeps the n gated
values and declares N <= 57344. The engine oracle with speculation on: 1500/1500 issues
bit-identical, the w2a8 head included. Greedy with speculation on matches libref's greedy without
it on all eight prompts.

Install and oot: a SYCL build installs librad_sycl.so and libxe2.so, its executables find the
backend through $ORIGIN/../lib, and tests/oot_plugins.sh rebuilds libxe2 out of tree with icpx when
RAD_OOT_ICPX is set; it passes in build-sycl.

scripts/sycl/bench_report.sh: the report's screenshot is a JPEG, rendered with fonts (this host has
none, and the first post had no text). docs/SYCL_PROGRESS.md: the first quick benchmark (4.2 tok/s
decode, 17.3 tok/s prefill at 2000 tokens), Milestone B part 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 19:31:29 +02:00
pascallinxweilerandClaude Opus 5.5 874f8d28b1 libxe2: strided cast and libref's sigmoid -- MiniCPM5-2B serves on the B65, greedy-identical
Serving MiniCPM5-2B bf16 on the Arc Pro B65 found two things rad-kbench's dense operands did not:

- cast is handed the q slice of the fused qkv row (2048 of every 2560 elements) and refused it,
  stopping the first step by name. It now walks any strides in libref's offlin order.
- gated_quant_fp8 took sigmoid with an f32 exp, within rad-kbench's tolerance but not libref's
  double exp: now and then an ulp in silu moved the bf16 narrowing and one E4M3 code, in some of
  the 42 layers, enough to flip a greedy near-tie tokens later. The engine's own op oracle
  (RADIANCE_OP_ORACLE='*', which runs libref on the operands the device kernel was handed) found
  it: 9 of 600 issues before, 600 of 600 bit-identical after, over a 26-token prefill.

With both, a greedy run on the B65 matches a libref-only host server token for token on all eight
prompts of scripts/sycl/greedy_compare.py (64 tokens each), and the top-5 logprobs agree exactly
over 96 decode steps. /v1/chat/completions answers coherently, reasoning split out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 16:49:14 +02:00
pascallinxweilerandClaude Opus 5.5 94923fbb53 libxe2: the thirteen sampler ops
Each is libref's arithmetic on the card. The serial stages (penalties, DRY, the n-gram ban, top-p,
min-p, typical, XTC, the pick) run libref's loops unchanged, one work-item a row, so their sums keep
libref's order. Temperature and the grammar mask are one work-item an element. argmax, top-k and
logprobs scan the vocabulary with one work-group a row, reducing a 64-bit key -- the value's
order-preserving bits above the complemented index -- so the largest value wins and ties go to the
lower id, libref's rule; top-k is libref's topk_next k times, and a greedy row takes no rounds.
DRY's per-token map is replaced by a first-occurrence scan that computes the same maxima.

rad-kbench against libref: the whole fixture with libxe2 first, 1101/1101; MiniCPM5-2B's sampler
cases 56/56, all at rel_l2 0. With this, every op MiniCPM5-2B bf16 issues with speculation off has
a device row in libxe2 (13 model ops, 13 sampler ops).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 16:21:22 +02:00
pascallinxweilerandClaude Opus 5.5 bcd4ddc91b libxe2: kv_store and attn_paged, correctness first
The paged cache in libref's and libr4d's layout. attn_paged runs one work-group a (query row, head)
in libref's order: each key's dot summed over d serially by its lane, the max over the group, then
weights by chunk in local memory with the sum and every acc[d] accumulated in key order, exp in
double. Scores are recomputed rather than kept, since 131072 keys of them do not fit local memory.
Masks, sliding windows, ragged batches and fp8 descales are libref's. kv_store skips a slot past
the cache instead of refusing the launch, which would need the host to read device memory.

rad-kbench against libref: fixture 178/178, MiniCPM5-2B 160/160 (rel_l2 0).

docs/SYCL_PROGRESS.md: the HIP build compiles (785/785 targets for gfx1201 in the ROCm 10.1
container) at the commit holding every core-side change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 16:12:32 +02:00
pascallinxweilerandClaude Opus 5.5 c52f76c33e libxe2: gemm_nt and logits_gemm, correctness first
One work-item an output, f32 over ascending k from zero with no fused multiply-add: libref's
gemm_plain order, so MiniCPM5-2B's projections and its 130560-row head agree with the reference
exactly. Slow on purpose; the XMX kernels of Phase 4 are checked against this and libref. The rows
take float weights only (a dtype constraint); a quantised weight is gemm_nt_q's.

rad-kbench against libref: fixture 276/276, MiniCPM5-2B 164/164 (rel_l2 0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 16:09:17 +02:00
pascallinxweilerandClaude Opus 5.5 fca4cbe3b5 libxe2: rope, embed_lookup, gather_rows, cast
rope builds its frequency ladder on the host per launch exactly as libref's rope_freqs does (a
double pow, then YaRN or llama3 from rad_yarn.h) and takes cos and sin of the f32 angle in double on
the card, as libref does; positions reach 131072 at MiniCPM5's context. neox and gptj with one
position component; the row says so with a mode constraint and the launch refuses anything else by
name.

The gathers write a zero row for an index outside the table, libr4d's rule: libref instead checks
every index on the host before running, which a launch cannot do without waiting on its stream.

rad-kbench against libref: fixture 127/127 and MiniCPM5-2B 94/94, rel_l2 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 16:05:59 +02:00
pascallinxweilerandClaude Opus 5.5 b2cdcb4420 libxe2: rmsnorm, rmsnorm_quant_fp8, quant_act_fp8, gated_quant_fp8
One work-group a row; a quantisation group a sub-group. The arithmetic is libref's step for step,
and two things made it so on the card:

- Device code is generated at link time (AOT), so the flags that shape it now go to the link as
  well as the compile: -ffp-contract=off, -ffp-model=precise, and -foffload-fp32-prec-div/-sqrt.
  Without correctly rounded division a group's scale amax * (1/448) came out one ulp off, and
  bf16 inputs sit exactly on E4M3 rounding ties often enough that 1780 of 524288 codes moved
  (a standalone host/device comparison showed it; with the flags, none).
- The sum of squares is libref's ascending f32 sum, by one work-item. A tree reduction moved
  normed values across bf16 ties on MiniCPM5-2B's real weights and failed rmsnorm_quant_fp8 at
  M=1 (rel 7.7e-3 against its 4e-3 tolerance).

rad-kbench against libref: the fixture 228/228 and MiniCPM5-2B's container 140/140, worst rel_l2
1e-7, inside guarded allocations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 16:02:58 +02:00
pascallinxweilerandClaude Opus 5.5 41a3c32a65 libxe2: the Intel kernel library's skeleton, and its first op, add
libxe2 is a kernel plugin like any other, built by rad_add_plugin from the icpx sub-build into the
build tree's $RADIANCE_HOME. It declares no schemas (every op it serves is libref's vocabulary), only
device rows, written with designated initialisers. xe2_common.h holds what every kernel needs: the
launch's queue (rad_sycl.h), row views over padded operands, refusals that name the geometry, and
libref's own dtype conversions so results round where the reference's do.

add passes rad-kbench against libref at tolerance zero, on the recorded fixture (30 cases) and on
MiniCPM5-2B's container (20 cases), inside guarded allocations. In a SYCL build the kbench replays
run libxe2 on the card, so they are labelled sycl there, as they are gpu in a HIP build.

scripts/sycl/notify.sh posts to the Discord webhook when the port needs the user.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 15:55:39 +02:00
pascallinxweilerandClaude Opus 5.5 370a906c70 device: the SYCL backend -- Intel GPUs through oneAPI over Level Zero
A fourth DeviceBackend, in librad_sycl.so: in-order sycl::queues on one context, events as
barriers, copies and fills on the queue, gates as a spin kernel on a pinned flag, and the core's
advance and weight-table kernels as SYCL twins of their .hip files. RadStreams are RadSyclStreams
(abi/rad_sycl.h). Pinned host memory is page-aligned memory registered for device copies, since
O_DIRECT cannot read into SYCL's malloc_host pages; event timing is opt-in (RADIANCE_SYCL_TIMING=1)
because profiling queues cost ~20 us of host time a submission.

The SYCL code is its own CMake project, sycl/, configured with icpx through ExternalProject, so the
engine and every host plugin stay on the main compiler: a SYCL build's host code is the default
build's. RAD_SYCL (default OFF), build.sh --sycl, the sycl presets; HIP and SYCL in one build are
refused at configure.

On the SYCL backend --tp > 1 and ops resolved only to host kernels stop the start, since the Intel
backend runs on one card and never puts an op on the CPU. A SYCL build that sees no GPU warns that
it runs on the CPU and names the missing oneAPI environment.

device_test runs on the Arc Pro B65 as device_test_sycl (label sycl): 36 cases pass, 12 skip
(elastic memory, not provided; host-backend-only cases). Host tests hide Level Zero GPUs with
ONEAPI_DEVICE_SELECTOR. The host tier is the baseline's in both the default and the SYCL build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 15:38:42 +02:00
pascallinxweilerandClaude Opus 5.5 a3dc47b79a abi: rad_sycl.h -- what a RadStream is under the SYCL backend
A SYCL kernel library has no hipLaunchKernel for the engine to serve, so under the SYCL backend a
RadStream points to a RadSyclStream: a magic, its own version, and the engine's in-order
sycl::queue. rad_sycl_queue() hands a plugin the queue or null for any other stream. The struct is
versioned by RAD_SYCL_STREAM_VERSION rather than RAD_ABI_VERSION, since no shape an existing plugin
compiles against changes; rad_abi.h and rad_types.h say so.

The layout tests cover it: strict C11 in abi_c_test.c, and its rows in abi_layout_rows.h, where a
struct the frozen table predates is allowed without a version bump.

docs/SYCL_PROGRESS.md: D6 revised. Building everything with icpx fails in libavx (_pdep_u64 without
-mbmi2, which GCC accepts and clang refuses), so the main build stays GCC and only SYCL code is
built by icpx, as shared libraries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 15:38:42 +02:00
pascallinxweilerandClaude Opus 5.5 ec4dbb6464 sycl: Phase 1 -- docs/SYCL_PORTING.md: where the core meets HIP, the op set, the design
The core's HIP use is already behind the DeviceBackend vtable except three core kernels (advance,
wtab, xprefetch), the engine's interposed hipLaunchKernel that plugins launch through, and build
switches; each site is listed with file and line. The minimal set for MiniCPM5-2B is measured with
--debug-graph on the test suite's synthetic llama containers (13 model ops, 13 sampler ops; fp8 adds
gemm_nt_q / gemm_nt_q_gated), since no MiniCPM5 container is in the model library.

The design: a fourth DeviceBackend over SYCL, a RadSyclStream hand-off for plugins with its own
version instead of an ABI bump, libxe2 AOT for bmg-g31, and on that backend a fatal error where the
planner would otherwise put a weighted op on the CPU.

scripts/sycl/op_inventory.sh generates the 238-op appendix: libref's schemas through rad-schemas,
libr4d's 407 rows parsed from source by r4d_rows.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 15:38:42 +02:00
pascallinxweilerandClaude Opus 5.5 c25f610fda sycl: Phase 0 of the Intel backend -- the B65's limits and XMX types, the host baseline
scripts/sycl/probe.sh builds and runs two probes on the Arc Pro B65 (Level Zero, xe driver): the
device's limits and joint_matrix combinations, and an ESIMD DPAS check of E4M3 / E5M2 against bf16
and s8 controls in the same harness. bf16, fp16, s8 and tf32 XMX are exact; fp8 DPAS compiles for
bmg-g31 but returns garbage, so fp8 weights are widened to bf16 in-register (exact for E4M3).

docs/SYCL_PROGRESS.md is the resume log: device tables, the host baseline (82/88 of -LE 'gpu|oot';
the six failures are FFmpeg-less builds and CPU-time budgets on this VM), BetterBench setup, the
model library survey and the open blockers (no MiniCPM5 container in the library, no ROCm here).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
2026-10-23 15:38:42 +02:00
hugypufy f59dfa8bcd docs: post-reboot device map — HIP 0/1/2/3 = 03/27/2c/50 (50:00 usable again); W6600 not exposed 2026-10-23 13:10:40 +01:00
hugypufy 6ae8136d3d recipe: PARO M2XFP4 with the standard MTP head (graft of mtp.* from bf16; blk.64 rtn ahead of the trunk m2xfp4 imports); container packs 20.03 GB and serves at MTP depth 3 2026-10-23 12:25:59 +01:00
hugypufy 29869dd70e docs: correct device map — 3 usable R9700s (0/1/2); 50:00 runtime-invisible, off-limits 2026-10-23 12:25:59 +01:00
hugypufy 5b055a9f38 REMAINING.md: final results — SEED1 wins (KL 0.02107, GSM8K 94.0%); KL flags, hip4 quirk, resume notes 2026-10-23 12:25:59 +01:00
hugypufy bc7e4cbf46 soak harness persisted 2026-10-23 12:25:59 +01:00
hugypufy f415103cc5 packer: verify rule-quantized drafter planes (plain transform) and fused row-joins (ffn_gate_up, ssm_inz) — containers proven byte-exact; FT results: SEED1 KL 0.02107 (-39% vs RTN), GSM8K 94.0%, results dashboard 2026-10-23 12:25:59 +01:00
hugypufy 836c2a11e1 night tooling persisted (chain2 with --draft, lanes, gsm8k/conc harnesses, watchdog, dashboard); runbook: all three FTs complete, eval-chain resume steps 2026-10-23 12:25:59 +01:00
hugypufy ea0908596b M2XFP4 (MXFP4v2): quantiser, gfx1201 WMMA kernels, host rows, df2 wiring, .rad packer (Import::ParoM2), stability fixes (counters-in-scratch x3, aql publish fences), kbench rows, runbook (REMAINING.md) 2026-10-23 12:25:59 +01:00
Deadcode 9eaf10da6e radiance 1.11.0
New models:
- GLM-5.3-Flash reads pictures: its vision tower and processor (--image-tokens sets the budget),
  with decode kernels for a few rows and the DSA indexer split over the ranks
- Sage-A1.5 (fp8 and MXFP4) with its vision tower and a DFlash2 drafter
- Unlimited-OCR (bf16)
- Gemma 4 31B with z-lab's DFlash and RedHatAI's DFlash2 drafters; at four cards its all-reduces
  are fused with the junctions, overlapped with the compute and sent compressed
- Ornith-1.5-35B-A3B w4a8 compose files

Speed:
- Block drafters (DFlash, DFlash2) accept their drafts on the card, and the next step is issued
  ahead
- The four-rank all-reduce is faster for every --tp 4 model
- qwen35_w8a8: the norms and SiLU write the int8 linears' operands directly
- --attn-prefill-fp8 off|qk|pv|both: fp8 QK and PV legs for the h256 prefill attention (about +20%
  prefill on a 221K-token prompt for the 27B MXFP4 at TP2); lossy, off by default

Features:
- Control vectors: --control-vector off|on|disabled (disabled by default), a per-request switch,
  and the published Qwen3.8-Flash-Next refusal-direction vector (its license is in NOTICE)
- Krea 2: the `rebalance` request field, as ComfyUI's ConditioningKrea2Rebalance
- Cards with a small PCI BAR run, with kernel arguments kept in host memory
- Dashboard: live acceptance figures; statsdump rotates its file at a size cap
- KV caches every rank holds whole (GLM-5.3's latent and index caches) take one host-tier slot

Fixes:
- Long conversations taking turns no longer fall back to an early snapshot: a host-tier restore
  makes room as memory pressure does and waits a step for the previous turn's release (two
  conversations of 142K and 147K tokens sent back to back: 31.3 s per turn before, 2.8 s now)
- Kernels before Linux 6.16 (amdgpu below 3.64) no longer hang at startup: virtual memory
  management is turned off there, with a warning
- Gemma 4 dense scales its token embeddings as Hugging Face does (bf16), which changes its output
- The four-rank all-reduce fences prefill-sized messages, for a rare divergence after a fresh start
- GLM-5.3: every refusal names the setting and the reason; its template keeps string content
- Several pictures in one request no longer refuse processors that take one image at a time

Changes: Plugin ABI 26: out-of-tree plugins must be rebuilt. The environment switches the PRs
added are fixed rules or flags now (R4D_ATTN_FP8 is --attn-prefill-fp8).
2026-10-23 11:57:52 +02:00