Moonshot AI открыла код MoonEP — библиотеки для обучения MoE-модели Kimi K3
Moonshot AI 29 июля 2026 года открыла под лицензией MIT исходники MoonEP — библиотеки экспертного параллелизма для обучения MoE-моделей. Она гарантирует каждому GPU-рангу ровно S×K токенов независимо от перекоса роутинга и убирает главный тормоз распределённого обучения. По данным компании, MoonEP дала прирост масштабируемости Kimi K3 в 2,5 раза.
AI-processed from MarkTechPost; edited by Hamidun News
MoonshotAI open-sourced MoonEP on July 29, 2026 — a library for expert parallelism for distributed training of MoE models — under the MIT license. MoonEP delivers exactly S×K tokens to every compute rank regardless of routing skew, and it became one of the technologies that accelerated the scaling of the Kimi K3 model by 2.5 times.
Why expert parallelism is needed
In MoE models, the router sends each token to several best experts (top-K), which physically live on different GPU ranks. The problem is that routers are almost never balanced: some experts get many times more tokens than others. The MoonEP repository measures the skew with the metric max_vio = max_e(T_e/T̄) − 1, where zero means perfect balance.
The costs of imbalance are structural, not random. The latency of a collective operation is determined by the slowest participant, so the "hot" rank sets the time for the entire iteration. Worse, the number of tokens per rank changes at every step — dynamic shapes fragment GPU memory and force host synchronization at every layer.
How MoonEP works
MoonEP introduces a strict invariant: every rank receives exactly S×K tokens, where S is the input tokens per rank and K is the number of top-K experts per token. The library achieves this by scheduling online a small number of redundant (duplicate) experts directly from the router's current outputs; duplicates are prefetched before the main computation, and on the backward pass their gradients are reduced back to the "home" ranks. The design rests on three properties: perfect balance, online scheduling with near-zero overhead, and zero-copy with static buffer shapes.
"Every rank gets exactly S×K tokens, no matter how skewed the routing is," the
MoonEP repository description states.
Key facts about the release:
- Date — July 29, 2026, as part of Kimi K3 Open Day
- License — MIT
- Alongside MoonEP, AgentEnv and (earlier) FlashKDA were open-sourced — three infrastructure codebases
- Kimi K3 — a 2.8 trillion-parameter MoE model, native vision, 1 million token context
- The scheduler is written in CUTLASS CuTe DSL, setup.py pins nvidia-cutlass-dsl==4.4.2
- For training, B=E/R is set; for inference, the README recommends B=3–4
Why this matters to engineers
MoonEP removes the main bottleneck of distributed MoE training — rank desynchronization caused by uneven routing. Thanks to statically known buffer shapes and a zero-copy approach (tokens are written directly into positions grouped by expert), the library eliminates step-by-step host synchronization at every layer. According to MoonshotAI, it was precisely this set of techniques that delivered the claimed 2.5x scalability gain on the 2.8 trillion-parameter model.
What this means
Open-sourcing the infrastructure layer, not just the model weights, lowers the barrier to entry for training ultra-large MoE models: teams outside top labs get a ready-made expert balancing mechanism under the permissive MIT license.
Frequently asked questions
What is MoonEP?
MoonEP is an expert parallelism library from MoonshotAI for distributed training and inference of MoE models. Its main guarantee is exactly S×K tokens per rank regardless of routing skew.
Under what license is MoonEP released?
MoonEP is distributed under the MIT license — one of the most permissive licenses, allowing commercial use and modification of the source code.
Which release is MoonEP's launch tied to?
MoonEP was published as part of Kimi K3 Open Day together with the Kimi K3 model weights, a technical report, and two more codebases — AgentEnv and FlashKDA.
Need AI working inside your business — not just in your newsfeed?
I build production AI for companies — custom CRM, internal tools, autonomous agents, workflow automation. Owned by you, shaped to your process, no per-seat tax. Built by Zhemal Khamidun, CPO of AlpinaGPT (AI platform, 6,000+ users).
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.