Explore the research collection
4 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.
- Paper
OperLoop: Looped Transformers as Optimizers
Reframes looped Transformers' recurrent transition as an optimizer update on the hidden state treated as a fast weight. Any loop transition derives from (1) an input-map projection, (2) a local objective whose gradient the shared blocks' output predicts, (3) an optimizer update rule. Diagnosis: existing transitions (Ouro, Huginn, Parcae, HyperLoop) have input-map mismatches between transitions and projections (Parcae omits Āᵀ; HyperLoop splits H^pre/H^post) — aligning maps cuts loss, +0.15pp Parcae / +0.54pp HyperLoop commonsense (aligned HyperLoop: 59.47 vs 58.93). Their design, OperLoop: delta objective ½‖o_l − t_l‖², explicit learned weight decay Λ_l, state-dependent causally-monotonic step size η_l (inspired by Delta Linear Attention, but target implicit rather than projected values). At matched training FLOPs (~50% params): best looped variant at both scales — EM avg 25.58 vs non-looped 5B baseline 23.89 (+1.69pp), 10B +1.04pp; Loop6 at 1.67× FLOPs: EM 31.90 (+8.01), 8-shot CoT GSM8K 17.13→31.08. Ablations: removing delta objective 25.58→24.84; causal step-size beats fixed η=1 (+1.18pp EM) and non-causal (+1.56pp). Caveats: all looped models have worse PPL and log-likelihood accuracy than the non-looped baseline (Wikitext 13.90 vs 13.08 at 5B) — the advantage shows only in generative EM eval (authors' own point: evaluate beyond PPL); gains vary by task (ARCcn at 5B: 37.63 vs baseline 40.96); small models (5B/10B, 300–500B tokens, 4k seq) — no frontier-scale evidence.
- Paper
VERA: Scaling Verifiable Environments for Agentic co-Evolution
VERA (NVIDIA) addresses agent training's environment bottleneck by converting benchmark trajectories into 9,000+ restartable, rubric-scored sandboxes, then co-evolving the LLM and its harness on them. Auto-Rubric turns trajectories into sandboxes: a coding agent writes binary rubric items (scored {0,1} from observable evidence) over action arguments, execution effects, artifacts, and output quality; executable checks and an Agent Judge verify each sandbox, and a failed executable check overrides any judge score. Trajectories are segmented into five stages (plan, setup, verify, execute, submit), each restorable and scored independently. The co-evolution loop alternates two updates with the other component frozen: model rounds run full-parameter GRPO with rubric rewards (a Reward Verifier checks the rollout evidence behind each reward; a checkpoint is accepted if its dev-benchmark score drops no more than 20% relative to the previous accepted checkpoint), and harness rounds add/merge/remove skills (accepted only if a paired frozen-model rerun shows target-stage improvement, no end-to-end regression, safety checks pass, and self-tests pass with at least +5 Overall points on the dev set; at most three edits per round). At 9B (Qwen3.5-9B), the co-evolved agent beats the strongest single-axis baseline by 10.3 points on AutoCoWorkBench and 13.0 on AutoMedBench, leading SWE-Bench Verified and MedXpertQA under their official protocols. At 27B (Qwen3.8-27B), VERA reaches 71.6 on AutoCoWorkBench (above Claude Opus 4.8, 1.0 point below GPT-5.6-Sol) and 80.7 on AutoMedBench (within 1.2 of Claude Opus 4.8, highest Agentic score 94.1), and transfers out of domain to Automation-Bench (43.8%) and AgentClinic (76.4%). Only at 27B are general capabilities retained/improved (AIME 2026 +10.0, ALFWorld +3.8, GPQA-Diamond +7.7, IF-Bench +1.8 for the CoWork agent); 4B/9B agents lose heavily on AIME.
- Dataset
FineFineWeb: A Comprehensive Study on Fine-Grained Domain Web Corpus
FineFineWeb is a large-scale web corpus that classifies FineWeb data into fine-grained domains (e.g., aerospace, etc.) using a multi-iteration pipeline involving GPT-4 URL labeling, FastText coarse recall, and BERT fine recall. It contains ~4.89B rows across multiple domains with billions of tokens each, enabling researchers to build domain-specific pretraining mixtures with explicit control over domain composition.