Grafy News

Prime Intellect launches Prime Mega MoE, a trainable fused MoE kernel

Prime Intellect unveiled Prime Mega MoE, a trainable fused MoE kernel that speeds forward passes 3.11× and cuts Qwen3 training time by up to 34%.

Illustration for the news story: Prime Intellect launches Prime Mega MoE, a trainable fused MoE kernel

Prime Intellect announced a new component called Prime Mega MoE that adds a backward‑pass implementation to DeepSeek’s fused Mega MoE kernel, making the kernel trainable and dramatically faster. According to the release on MarkTechPost, the forward pass is 3.11× quicker and Qwen3 MoE training steps see up to a 34% speed‑up in the Prime‑RL benchmark. The improvement matters because it lowers the compute barrier for researchers and developers working with massive mixture‑of‑experts (MoE) models.


What is Prime Mega MoE?

Prime Mega MoE is an extension of DeepSeek’s existing fused Mega MoE kernel. The original kernel combined multiple expert computations into a single, highly optimized operation for inference, but it lacked a gradient (backward) implementation, meaning it could not be used directly for training. Prime Intellect’s contribution adds the missing backward pass, enabling end‑to‑end training of MoE models while preserving the kernel’s fused efficiency.

How does it differ from the previous kernel?

The prior fused Mega MoE kernel excelled at inference speed by collapsing the routing, expert execution, and output aggregation into one GPU kernel. However, without a backward pass, developers had to fall back to slower, unfused implementations for training, which introduced significant overhead. Prime Mega MoE retains the same fused structure for the forward pass—now 3.11× faster than the unfused baseline—and introduces a matching backward pass that computes gradients without breaking the fusion. This unified approach removes the performance gap between training and inference.

What performance gains were reported?

MarkTechPost reports two concrete metrics:

  • Forward‑pass speed: 3.11× faster than the unfused version of the Mega MoE kernel.
  • Training‑step speed on Qwen3 MoE: Up to a 34% reduction in step time when evaluated with the Prime‑RL benchmark suite.

These numbers indicate that large‑scale MoE models, which often involve thousands of experts, can be trained more economically, freeing up GPU cycles for larger experiments or for running more iterations within a fixed budget.

How can developers start using Prime Mega MoE?

Prime Intellect has released the kernel as open‑source code that can be compiled against major deep‑learning frameworks (e.g., PyTorch). To integrate it:

  1. Clone the repository from the official Prime Intellect GitHub page (linked in the original announcement).
  2. Build the kernel following the provided CMake instructions, ensuring CUDA version compatibility.
  3. Replace the standard MoE layer in your model with the PrimeMegaMoE class, which exposes the same API as the original fused kernel but now supports backpropagation.
  4. Run a quick sanity check using the supplied unit tests to verify gradient correctness.

Developers familiar with GPU kernel development will find the build process straightforward. For those who prefer a higher‑level interface, Prime Intellect also offers a thin Python wrapper that automatically selects the fused kernel when a compatible GPU is detected.

Why does this matter for AI research?

MoE architectures have become a cornerstone of state‑of‑the‑art language models because they allow scaling of parameters without a proportional increase in computation per token. However, the training cost has remained a practical bottleneck. By delivering a trainable fused kernel, Prime Mega MoE narrows the gap between research‑grade experimentation and production‑grade inference speed. This could accelerate the iteration cycle for projects exploring:

  • Sparse expert routing strategies
  • Dynamic capacity allocation across experts
  • Multi‑task learning where different tasks activate distinct expert subsets

In short, the tool lowers the entry barrier for labs and startups that lack massive GPU clusters, potentially democratizing access to large‑scale MoE research.

How to explore Prime Mega MoE with Grafy?

While Grafy does not host a native MoE kernel, creators and developers can experiment with the released code inside Grafy Code. The AI‑powered coding studio lets you:

  • Clone the Prime Mega MoE repository directly from GitHub.
  • Run the build steps in a managed container that already includes CUDA, PyTorch, and common dependencies.
  • Test the kernel on sample Qwen3‑style models using Grafy’s built‑in notebook‑like environment.

If you prefer to read the technical paper or the detailed benchmark report, the Grafy Reader app can ingest the PDF and let you ask natural‑language questions about the methodology, performance numbers, or integration steps. Both apps are accessible from the Grafy sidebar:

  • Grafy Code – for hands‑on implementation and testing.
  • Grafy Reader – for deep‑dive reading of the accompanying documentation.

Frequently asked questions

How does Prime Mega MoE handle expert routing?

Prime Mega MoE uses the same routing algorithm as DeepSeek’s original fused kernel—typically a top‑k softmax over gating logits—but the routing computation is now embedded inside the fused forward and backward kernels, eliminating separate kernel launches.

Is the kernel compatible with other MoE libraries like TorchMoE or DeepSpeed?

The kernel is designed as a drop‑in replacement for the fused forward pass in those libraries. You can wrap it with TorchMoE’s MoELayer or DeepSpeed’s MoE module by swapping the underlying CUDA kernel call, though minor API adjustments may be required.

Will using Prime Mega MoE reduce model accuracy?

No. The kernel computes exact gradients for the same mathematical operations used in the unfused implementation. Accuracy remains unchanged; only the computational efficiency improves.


For the full announcement and technical details, see the original post on MarkTechPost: https://www.marktechpost.com/2026/10/29/prime-intellect-prime-mega-moe-fused-moe-kernel-training/


Source: MarkTechPost — Prime Intellect Releases Prime Mega MoE: Trainable Fused MoE Kernel, 3.11x Faster Forward Pass