Verba/Rapida

Experiments #28

`MLX_SDPA_D512_MIN_KL=1000000000` on mlx-vlm + MTP (row 27's timing-free step found MLX's fused D = 512...

done

What was tested

`MLX_SDPA_D512_MIN_KL=1000000000` on mlx-vlm + MTP (row 27's timing-free step found MLX's fused D = 512 SDPA kernel 5.8x slower than the unfused path at 8k keys, 1.49 against 0.26 ms; 5 full-attention layers): paired against `vlm_optiq_mtp` on the 50 sessions

Model and setup

gemma-4-26b-a4b OptiQ-4bit + MTP assistant

Expected gain

+15 to +30% decode (**guess**: about 6 ms of a ~21 ms step)

Where the idea came from

row 27

Outcome

done 2026-10-29: stopped at 127 of 300 rows, +0.6% (not scored); the variable moves only 1-token queries and MTP verifies 7 , so row 30 replaces it (`docs/experiments/2026-10-29-mac-d512-attention/`)

Lesson

a kernel fix measured on a 1-token microbench must be re-measured at the query length the engine really sends; with a that is the verify length (7 here), not 1.

Adopted

no ()

Want to see what these experiments produced? Lesto, the Gemma 4 inference engine for Apple silicon Macs, is on lestoengine.com

Made by Federico Andrioli, @fedeandri on X A research lab's own measurements, generated from its files. Data built