Esperimenti #176a
Automated search over Lesto's own Metal kernel variants (from Flint's Zig + Metal engine, 125.8 tok/s on an...
done
Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.
Cosa è stato provato
Automated search over Lesto's own Metal kernel variants (from Flint's Zig + Metal engine, 125.8 How many tokens the model writes each second once it has started. on an M3 Ultra, tuned by "QD-guided local search": a round-robin of quality-diversity algorithms such as MAP-Elites, arXiv 1504.04909, then stepwise hill climbing; x.com/rachpradhan/status/2123587415189364936, reported; `docs/_inbox/2026-11-20-flint-zig-metal-engine.md`). A harness builds each variant of one kernel's compile-time parameters (rows per threadgroup, simdgroups, tile, unroll, K-split, vector width), rejects any variant whose output is not bit-identical to the Keeping a model loaded on a machine so it can answer requests over the network. kernel's (each output keeps its K order and float accumulators, as row 109's Mixture of experts: a model made of many specialist sub-networks where only a few run per token. Approfondisci tiles did, so the search stays lossless), and times the survivors with row 175da's method: wall slopes between 8 and 32 calls a batch, interleaved, The middle value when results are sorted: half the requests were faster, half slower. over 21 pairs, on the served shapes and Lesto's own MLX. The search keeps a MAP-Elites archive binned by threadgroup memory and simdgroups a threadgroup, then hill-climbs from each elite. First target: the 3-row verify's MoE expert kernels, the largest category (row 175d: 7,952 us a round at 8k against a 6,225 us one-row floor). Step 1: the harness on that kernel, its archive and best variant against the served one; then the best variant served behind a switch, 150 of 150 identical, and a pair. It must also hold on general text, not only the coaching sessions (Federico, 2026-11-20)
Modello e configurazione
the verify's MoE expert kernels
Guadagno atteso
up to about +2% The writing phase: the model produces the reply one token at a time. Approfondisci (guess: a quarter of the 1.7 ms excess)
Da dove viene l'idea
Flint engine post (coordinator 2026-11-20)
Esito
done 2026-11-20 18:47 (engine-rows): step 1 clears its line; 858 of 858 variants bit-identical, the joint picks confirmed at gate/up -8.35 us [-11.38, -7.02] and down -15.76 us [-16.60, -14.85] a call in their worse regimes, 24.12 us against 3.2 (about 724 us a round, inferred); DD is the slowest option everywhere; the served row is row 176s (`2026-11-20-mac-r176a-kernel-search/README.md` § Result, row 176a step 1)
Lezione
an exhaustive, bit-identical search over the verify MoE kernels' launch parameters finds 24 us a call (about 3% of a round, inferred) that hand tuning missed: the served down kernel's one-simdgroup-a-slot layout is the costly choice, and the expected lever, reading a shared expert's weights once, is the slowest option at every point, so measure a reuse trick's own overhead before counting its saved bytes.
Adottato
no (a diagnostic; its served row is queued as row 176s).