HELIX
Metal prefill kernel for Mamba-2 hybrids
State-space models compute a sequential recurrence that defeats most mobile compilers. HELIX reassociates it into a chunked associative scan, so the work lands on Apple's matrix hardware instead of a serial loop, and keeps the carried state in threadgroup memory instead of spilling it to device memory on every chunk. It drops into llama.cpp behind one interception point and declines any shape it cannot serve, so it can never be a regression.
Read the detail- 2.57x
- over upstream fp32, L=512
- 7.45x
- over the single-pass kernel
- 3
- shapes upstream declines