b70-optimization-lab

Gemma 4 26B Q8: Grouped Reordered-Q8 Multi-Token MoE Negative

Date: 2026-06-27

Status: valid strict-gate loss. Do not promote or submit.

Patch snapshot:

Important patch-scope note: this patch is a snapshot against the local dirty Gemma llama.cpp research stack, not a minimal upstream patch. The experiment itself is the default-off flag LLAMA_SYCL_MUL_MAT_ID_MULTI_TOKEN_GROUPED_Q8_0_REORDER=1, which adds a reordered-Q8 counterpart to the grouped multi-token MoE path.

Intent

The route profile showed verifier decode batches typically have small token counts and duplicate expert hits across tokens. The hypothesis was that a grouped reordered-Q8 path could compute each duplicate expert once per row and scatter results back to [row, expert_slot, token], avoiding repeated expert weight reads in the VDR2 reordered path.

Validation

Run:

Strict realistic gate:

Result:

Current strict record at the time:

Outcome

Valid loss, roughly -7.1% versus the current strict record. The likely cause is that the grouped reordered path adds duplicate-route scans, branch/scatter work, and register pressure that outweigh the saved duplicate expert reads for the actual n_tokens<=3 verifier shape.

Do not retry this exact grouped reordered-Q8 duplicate-expert approach without new profiling evidence. If revisiting this area, measure kernel occupancy and register pressure first, and compare against the direct VDR2 per-slot path in a source-level microbench before spending another strict-gate run.