MLX gated-delta Training Speedup: Testing the PR #1217 VJP Kernel

Nihongi-studier12387 · reddit · 2026-08-14

A developer noticed that when training gated-delta layers for Qwen 3.5 in the MLX framework, the linear attention mechanism disables the fused kernel. This causes training to fall back to a Python loop, severely slowing down iteration and consuming excessive memory due to autograd state retention.

By swapping to the gated-delta VJP (Vector-Jacobian Product) kernel introduced in PR #1217, performance improved significantly:

The author calls for community testing to see if the VJP path drifts across different shapes or context lengths, and discusses the possibility of merging it upstream.

Original post →

More from coding & agent

coding & agent channel →