Files
Strata/engine/include
Niko1221 97509d1877 hy4-flash: a CPU expert row is the same float as the GPU row of the same expert, bit for bit
Which experts of a token run on the CPU and which on the GPU depends on timing (CPU split auto), and the two arithmetics
differed in the last bits (8 lane partials without fused multiply-add and libm's exp on the CPU; 32 lane partials with fused
multiply-adds, an xor butterfly and the CUDA exp on the GPU). The model is sensitive enough that this moved the logits from
run to run with CPU experts on (KL 1e-3 to 3e-2 between two identical runs), while CPU experts off was bit-identical.

The CPU row kernels (scalar, AVX2, VNNI tiers) now follow the GPU decode kernels' reduction contract (own_decode.hpp), and the
SwiGLU exponential is one shared function (own/swiglu_math.hpp, host and device give the same bits) used by the CPU expert
glue and by the GPU decode quantiser. New test hy4_flash_cpu_gpu_rows_parity: the CPU tiers against own::mmvq on the GPU for
Q4_K / Q6_K / Q8_0 (217k outputs), the rule-E quantiser, the exponential over a dense sweep and the clamped SwiGLU image.
cpu_experts_test compares tiers with the production silu.

Measured on an A40 (sm_86), chat-advice and json-raw, 64 rows each: before, two runs with CPU experts on differ (KL 0.00145 and
0.0221) and differ from CPU off; after, the dumps are byte-identical run to run and CPU on equals CPU off.
2026-12-01 09:57:25 +01:00
..