Molt: A Scalable PyTorch-Native Training Framework for Agentic Reinforcement Learning

Jian Hu, Huiying Li, Hao Zhang, Binfeng Xu, Yifan Zhang, Shaokun Zhang, Hemil Desai, Michael Demoret, Pavlo Molchanov, Jan Kautz, Yi DongarXiv 2026 · DOI

TL;DR

Molt is a lean, PyTorch-native training framework for agentic reinforcement learning (RL) that prioritizes human and AI readability with a compact ~8.6K line codebase. By composing un-forked, production-hardened components like Ray, vLLM, and NeMo AutoModel, Molt allows researchers to rapidly prototype new algorithms while matching the throughput of massive, hyperscale Megatron-based stacks.

What Problem Does This Paper Address?

Developing agentic reinforcement learning algorithms requires constant experimentation with new advantage estimators, pipeline stages, and rollout schemes. However, mainstream RL frameworks are architected for ultra-large-scale production. This introduces heavy multi-backend abstractions and layered indirection, forcing researchers to modify code across the trainer, distributed backend, and rollout glue for even minor algorithmic changes.

Additionally, agentic RL suffers from "quiet failure modes." Subtle differences in tokenization, policy versions, or Mixture-of-Experts (MoE) routing between the serving engine and the training actor can cause gradients to become biased or rejected without ever throwing an explicit error.

Methods

Molt addresses these challenges by stripping away infrastructure complexity, organizing the entire runtime into three components and a single asynchronous loop.

The Molt system architecture consists of three components and one asynchronous loop, ensuring token-exact data flow and direct weight synchronization.

Key methodological innovations include:

  • Token-First Contract: Trajectories are captured strictly as token IDs and log-probabilities directly from the rollout engine's sampler. This eliminates text-to-token retokenization drift entirely.
  • SDK Loopback Capture: Molt launches a local chat server that intercepts standard OpenAI or Anthropic SDK calls. This allows existing agent codebases to be trained out-of-the-box without custom integration glue.
  • MoE Routing Replay: To prevent numerical divergence between rollout and training routers in Mixture-of-Experts models, the rollout engine records its exact expert choices, which the actor then replays during training.
  • Direct Weight Refit: Updated weights are broadcast via NCCL directly from the actor to the rollout engines, completely bypassing the request router to maximize throughput.

Datasets

The authors evaluated Molt using two primary setups:

  • DAPO-Math: A prompt dataset deduplicated to 2,000 rows, used for head-to-head benchmarking against alternative frameworks.
  • geo3k: A 32K multi-turn tool-use task used to evaluate multimodal MoE performance using a Qwen3.6-35B-A3B recipe.

Key Insights and Ideas

  • Complexity is an Inherited Choice: Reaching frontier scale does not require building massive, bespoke infrastructure layers. By composing standalone, hardened upstream components, scalability can be inherited via configuration rather than re-implemented.
  • Readability as a Core Metric: Code is part of the user interface. By designing a codebase small enough to be read in one pass by both a human researcher and an AI coding assistant (like Claude Code), the framework becomes highly hackable and adaptable.
  • Pure Functions for RL Logic: Implementing advantage estimators as pure functions of rewards and groups eliminates the need for complex strategy classes or inheritance hierarchies, turning algorithm modifications into simple "afternoon edits."

Key Results

  • Minimal Code Footprint: Molt achieves its goals with just ~8.6K lines of Python code, making it several times smaller than production stacks like verl (~62K LOC) and slime (~25K LOC).
A comparison of framework code sizes and design centers highlights Molt's lean, readability-first approach.
  • Throughput Parity: In a head-to-head asynchronous benchmark on a Qwen3-30B-A3B model across 16 H100 GPUs, Molt achieved an optimizer step time of 119.4 ± 2.3 seconds. This is statistically comparable to the heavily optimized, Megatron-Core-based slime stack (109.5 ± 10.3 seconds).
  • Frontier Scalability: Without changing a single line of the core loop, Molt successfully executed the full asynchronous training path on a massive 700B MoE model at expert parallelism 256.

Limitations and Future Work

While Molt successfully validates loop mechanics and throughput at massive scales, full end-to-end convergence validation for the 700B MoE model is still pending. This is due to an upstream distributed-MoE forward mismatch in the benchmark checkpoint that causes the framework's strict sequence gate to reject updates.

The authors plan to resolve this upstream issue, push past the 3-trillion-parameter mark on NVIDIA GB300 clusters, and conduct deeper usability studies regarding human-AI co-development in RL research.

Summary updated

BibTeX
@misc{hu2026molt,
  author = {Jian Hu and Huiying Li and Hao Zhang and Binfeng Xu and Yifan Zhang and Shaokun Zhang and Hemil Desai and Michael Demoret and Pavlo Molchanov and Jan Kautz and Yi Dong},
  title = {{Molt: A Scalable PyTorch-Native Training Framework for Agentic Reinforcement Learning}},
  year = {2026},
  eprint = {2607.21653},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.21653},
}
Figure