NVIDIA-NeMo/labs-molt

An agentic-first RL framework for research (9k lines).

What it solves

Molt is designed for high-velocity agentic RL research, specifically targeting the training of frontier-scale Mixture-of-Experts (MoE) models (up to 1T parameters). It addresses the complexity and infrastructure overhead typically associated with scaling RL from small models to massive ones, providing a PyTorch-native stack that remains hackable and readable while supporting fully asynchronous rollout and training.

How it works

Molt utilizes a three-component architecture coordinated by an asynchronous loop via Ray:

  1. Ray: Manages placement and asynchronous queues between components.
  2. vLLM: Handles the rollout (generation) phase.
  3. NVIDIA AutoModel + FSDP2: Manages the training phase in pure PyTorch, supporting advanced parallelism (TP, EP, CP) and Adam CPU offload for massive actors.

Rewards are defined in plain Python within an Env or ChatAgent class. The framework maintains a "token-first" contract, ensuring token IDs, logprobs, and multimodal tensors remain aligned from rollout through to training.

Who it’s for

It is built for AI researchers who need to iterate quickly on agentic environments and RL algorithms at scale, particularly those working with VLMs (Vision-Language Models) and large MoE models, without needing to rewrite their code when scaling from 8B to 1T parameters.

Highlights

  • Agentic-First Design: Uses a Gymnasium-aligned API where the agent is the program, allowing researchers to iterate on environments in Python without touching the trainer.
  • Frontier-Scale MoE: Native support for TP/EP/CP and MoE-native training, capable of scaling to 1T-class models like DeepSeek-V3.
  • Fully-Async Runtime: Overlaps rollout, training, and weight synchronization to keep large actors fed.
  • Small Codebase: Approximately 9.2K lines of RL code, making it easy to read and hack end-to-end.
  • Broad Algorithm Support: Includes REINFORCE, RLOO, GRPO, PPO (via GAE), and on-policy distillation.
  • IS Correction: Implements various importance sampling correction schemes (TIS, IcePop, MIS) to handle logprob mismatches between async rollout and training.

Related

  • Project
  • Project
  • Project
  • Project
  • Project