Explore the research collection
2 entries · Follow this search
- Tool
Dist-MoE: Speed-of-Light Distributed Mixture-of-Experts Forward and Backward Kernels
A library of fused communication-and-compute kernels for expert-parallel (EP) MoE on NVIDIA SM100+ (Blackwell) GPUs. The caller supplies top-k expert IDs and scores (routing itself is out of scope); a reusable context owns symmetric, peer-addressable HBM dispatch/combine buffers (NVLink) and executes dispatch → grouped expert GEMM (W13 → SwiGLU → W2) → combine as one ordered operation, with forward and backward (FPROP/DGRAD/WGRAD) kernels throughout. Precision/pipeline matrix: BF16 "standard" (training + inference); MXFP8 E4M3 in Staged (separate W13 and SwiGLU/W2 kernels) or Mega (both projections fused into one chunk-pipelined kernel with chunk-local readiness) pipelines (training + inference); NVFP4 in Staged or Mega, inference only, prepared weights. Kernels are CuTe/CUTLASS-DSL; validated stack is Linux ARM64, PyTorch 2.14 + CUDA 13.0, NCCL 2.30.7; no CPU fallback. Two mechanisms distinguish it from DeepEP (dispatch/combine comms only, no fused expert compute), MegaBlocks, DeepSeek's Mega MoE/DeepGEMM (fused forward only, no fused training backward), ByteDance Comet/Flux (no CUDA graphs on the dynamic-routing path, no packing policy), and Cursor's Mixture-of-Kittens (MoK): (1) dynamic activation packing — a planner packs saved forward state from all layers sharing an activation slot into one bounded buffer instead of reserving a per-layer budget, and it works during CUDA-graph replay; (2) dynamic, capacity-driven recompute — when the slot budget is exhausted the planner keeps mandatory layer inputs and rebuilds the remaining intermediates in backward, decided by device predicates so the host launches one fixed, graph-stable sequence (soft limit; scratch overflow without VMM host-backed overflow is a hard error). Also: full CUDA-graph support and non-strict make_fx (full torch.compile/strict export explicitly NOT supported), fused post-expert RMSNorm + score weighting + top-k reduction, clamped SwiGLU, in-place WGRAD accumulation into standard parameter.grad, and no shared-expert branch required — routed-only execution, -1 expert ID disables a route (MoK's reviewed API, by contrast, requires shared-expert weights). TorchTitan integration: a DistMoeTransform swaps stock RoutedExperts for the Dist-MoE backend in place (same GroupedLinear parameter layout, so FSDP/optimizer/checkpoint ownership is unchanged; requires mixed_precision_param="bfloat16"), plus a rank-wide DistMoeRuntime.Config (scratch/activation-slot capacity factors, VMM factor, pipeline-parallel slot policy); verified 671B DeepSeek-V3 recipes ship in torchtitan_recipes, MXFP8 Mega fused inference is wired for RL generators, and NVFP4 inference is in the library but not yet exposed by TorchTitan. Benchmarks — ALL Meta-reported, GB300 NVL72, no independent replication: "useful" throughput counts only real GEMM FLOPs (fwd = 6·T·K·D·F per GPU; bwd = 2× fwd), excluding padding and replay work, divided by whole-layer iteration time (median of five 30-iteration CUDA-graph windows, slowest rank; comm/quantization/padding time stays in the denominator). Headline MoK comparison (both implementations given one BF16 shared expert, D=7,168, 384 experts, top-6, 2,048 tokens/GPU, CUDA graphs on): up to 1.40× over MoK — specifically the synthetic ten-layer packing training workload under per-layer routing imbalance (MXFP8, EP64), where Dist-MoE packed all ten layers' saved state at capacity factor 2.5 with zero capacity-induced recompute (peak allocation 49.73 GiB vs MoK 48.37 GiB); Meta notes the experiment does not isolate how much of the gain is avoided recompute alone. MoK was chosen as baseline because Cursor's published single-layer NVL72 results lead the other OSS stacks (DeepEP+PyTorch, DeepEP+TransformerEngine, HybridEP+Megatron). Separate standalone suite (zero shared experts, one routed layer): 3.09 useful PFLOP/s per GPU NVFP4 Mega inference (EP16), 1.86 MXFP8 Staged training (EP64), 1.27 BF16 training (EP64) — vs dense datasheet peaks of 15/5/2.5 PFLOP/s respectively. Imbalance scaling is sub-linear: NVFP4 inference EP16, 8× received rows on the busiest GPU → 4.82× iteration time (~40% lower time per received row). Stated limitations: SM100+ only; no NVFP4 training, MXFP8 E5M2, MXFP4, A8W4, communication quantization, or expert borrowing in this release; the explainer itself discloses that EP32/EP64 training ran at different sites, some allocations shared an NVLink fabric with unconfirmed timing overlap (not uncontended-peak evidence), and HBM byte rates are modeled, not measured.
- Tool
Open Env Arena — agent arena for RL environments
On 2026-10-08, Hugging Face's Ben Burtenshaw (community MLE) launched the Open Env Arena, an agent arena for RL environments: instead of agents competing on tasks, agents compete on defining the best RL environments. The loop: agents submit environment definitions (tasks + rewards), the platform trains a fixed base model (Qwen-3.8-27B) on them with a fixed training recipe, evaluates the resulting models, and posts scores to a leaderboard. The arena runs on PostTrainArena by @benchflow_ai (benchflow-ai/posttrainarena): the Hugging Face frontend reuses the Agent Collabs shared board/score chart/leaderboard with 'Add your agent' onboarding, while PostTrain runs headlessly through a CLI/API. It is fully agent-accessible: agents pull instructions from the Space's /AGENTS.md and /openapi.json and use arena_cli.py (discover, environments list, experiment list, board list) to share env datasets, track metrics, and send each other messages. Compute comes from Nebius GPUs. The underlying pipeline uses native task.md-format tasks, one-epoch LoRA SFT followed by LoRA GRPO over the training set, and held-out evaluation (the repo's data-agent canary shows 2,238 training / 366 held-out tasks). First round tackles a mix of 8 domains on held-out tasks, with the best environments evaluated on public benchmarks; future arenas will focus on specific domains and benchmarks.