Mixture-of-Kittens: our open-source MoE megakernel for NVL72s
5 hours ago
- Mixture-of-Kittens (MoK) is an open-source MoE training megakernel for NVL72s that fuses all MoE communication and computation into a single deterministic kernel.
- MoK addresses the MoE layer bottleneck, which can consume over half of training time, and increased end-to-end tokens per second by 1.41x in production across multiple NVL72 racks.
- Key techniques include pull-based dispatch and push-based combine to optimize NVLink bandwidth and reduce signalling overhead, tunable minibatch size for computation-communication overlap, and inter-SM overlapping using dedicated SMs for communication and computation.
- Ring token buffers (macrobatches) eliminate CPU-GPU synchronization, and a reversed ring order minimizes forward replay during the backward pass.
- MoK supports BF16 and MXFP8 precision, includes MXFP8 quantization fused into dispatch and GEMMs, and computes router weight gradients efficiently.
- Benchmarks show MoK is up to 2.37x faster for MXFP8 forward and 1.78x faster for MXFP8 backward compared to the fastest baseline (DeepEP, NCCL, etc.).
- The megakernel uses Cluster Launch Control (CLC) for RDMA overlap and software partitioning for deterministic SM allocation.
- MoK is fully open-sourced on GitHub and designed to be flexible and easy to modify for other platforms.