Cursor Open-Sources Mixture-of-Kittens (MoK): A Deterministic MoE Training Megakernel for GB300 NVL72 Racks
Cursor Research's open-sourcing of Mixture-of-Kittens (MoK), a deterministic Mixture-of-Experts (MoE) training megakernel, delivers up to a 2.37x speedup over existing public baselines, fundamentally reshaping the economics and accessibility of training large-scale sparse AI models on NVIDIA GB300 NVL72 racks.
✨ This content was summarized and interpreted by AI; it may contain errors — please verify accuracy with the original sources. Learn more
Listen to this story

Cursor Research's open-sourcing of Mixture-of-Kittens (MoK), a deterministic Mixture-of-Experts (MoE) training megakernel, delivers up to a 2.37x speedup over existing public baselines, fundamentally reshaping the economics and accessibility of training large-scale sparse AI models on NVIDIA GB300 NVL72 racks. This significant performance leap stems from MoK's unique ability to fuse all MoE-specific communication and computation into a single, fully deterministic kernel, effectively eliminating CPU-GPU synchronization overheads that plague traditional distributed training paradigms. Designed to power Cursor's advanced Composer models, MoK's release democratizes a critical piece of infrastructure, promising to accelerate the development of next-generation AI.
The core innovation of MoK lies in its "megakernel" approach, which integrates complex distributed operations – namely, the all-to-all communication inherent in MoE routing and the subsequent expert computation – into a single, optimized GPU kernel. This fusion directly tackles a long-standing bottleneck in MoE training, where communication overhead can consume a staggering 40% to 50% of total execution time, especially as the number of experts increases. By overlapping computation and inter-GPU networking at a fine-grained, configurable granularity, MoK drastically reduces communication latency and kernel launch overhead, thereby boosting GPU utilization and overall throughput. Crucially, MoK achieves full determinism, a feature vital for debugging, reproducibility, and ensuring numerical stability in large-scale distributed training environments, particularly when employing low-precision formats like BF16 and MXFP8. Non-determinism, often a consequence of coarse-grained overlaps and varying expert selections, can introduce numerical instability, making reliable model development challenging.
This development matters immensely for the AI industry and its users. For researchers and developers, MoK's open-source nature and substantial speed gains translate directly into faster iteration cycles, reduced computational costs, and expanded opportunities for experimentation with more complex MoE architectures. Historically, the complexity and resource demands of training MoE models have confined this advanced technique to a select few with deep infrastructure expertise. MoK lowers this barrier, making efficient MoE training more accessible and potentially fostering a wave of innovation in open-source LLMs that can compete with or even surpass proprietary models. The 2.37x speedup means that labs can achieve the same training outcomes significantly faster or train much larger, more capable models within the same time and budget constraints.
MoE models themselves are a paradigm shift in scaling AI, particularly for large language models. Unlike dense models where every parameter is activated for every input, MoE architectures employ a gating network to dynamically route tokens to a sparse subset of specialized "expert" networks. This conditional computation allows for models with trillions of parameters to be trained and inferred with a computational cost comparable to much smaller dense models, offering superior efficiency and specialization. For example, a 1.6 trillion-parameter sparse Switch Transformer achieved parity with a 600 billion-parameter dense model five times faster. Prominent open-source models like DeepSeek V3 and Mixtral, and even rumored architectures in OpenAI's GPT-4, leverage MoE to deliver high performance at reduced inference costs. However, MoE models present their own set of challenges, including complex distributed training, load imbalance among experts, memory fragmentation, and the aforementioned communication bottlenecks.
MoK directly addresses these critical challenges, particularly the communication bottleneck. Existing solutions, such as those within DeepSpeed-MoE, NVIDIA's NeMo Automodel, or other frameworks like FastMoE and OpenMoE, offer various forms of parallelism and optimizations. However, many struggle with the granularity mismatch between token-level communication and tile-level computation, leading to "pipeline bubbles" and inefficient resource utilization. MoK's fully fused megakernel, built from first principles for the NVIDIA GB300 NVL72, represents a highly specialized solution to this problem. The GB300 NVL72 itself is a formidable exascale computing platform, integrating 72 NVIDIA Blackwell GPUs and 36 Grace CPUs in a liquid-cooled rack, offering 130 TB/s of low-latency NVLink bandwidth. Its design is purpose-built for trillion-parameter LLM inference and training, boasting 10x greater performance for MoE architectures compared to previous generations. MoK's optimization for such a powerful and specific hardware configuration underscores a trend towards highly co-designed software and hardware stacks for frontier AI.
Looking ahead, MoK's open-sourcing will likely accelerate the broader adoption of MoE models, pushing the boundaries of what's possible in AI. The increased efficiency and reproducibility it offers could enable the development of even larger and more specialized models, particularly in domains like natural language processing and computer vision, where MoE's conditional computation excels. This move by Cursor not only solidifies its position as a contributor to the open AI ecosystem but also puts pressure on other major players to refine their own MoE training solutions, potentially leading to a new generation of even more optimized frameworks and hardware. The ability to train trillion-parameter models more affordably and reliably means that the next wave of AI capabilities could be more broadly distributed, fostering a vibrant, competitive landscape where innovation is driven by collective effort rather than proprietary silos.