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 The writing phase: the model produces the reply one token at a time. Read more 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 The unit of text a model reads and writes: roughly a short word or a piece of a longer one., 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 The small guessing model used in speculative decoding. Read more that is the verify length (7 here), not 1.
Adopted
no (A valid experiment that did not beat the best score by more than the noise.)