StackMap
Subscribe
Explore / labs-molt
NVIDIA-NeMo

labs-molt

Molt: NVIDIA's agentic-first RL framework in ~9K lines — Ray for placement, vLLM for rollout, AutoModel + FSDP2 for training — fully async, multimodal, multi-turn, scaling to 1T-class MoE.

1,018 100 Python Apache-2.0updated yesterday
View on GitHubDispute this mapping →
Curator's take

The RL stack to read end-to-end: the agent is the program (one Gymnasium-aligned Env.step() or ChatAgent.run(), reward is any Python you write), the trainer is a single actor with an optional KL reference, and Ray owns the async queues between rollout, training and weight sync. Token-first contract keeps ids, logprobs, action ranges, rewards and multimodal tensors aligned so multi-turn tool use and VLM environments share one format. Same script trains 8B and DeepSeek-V3-class MoE with expert parallelism. NOT for breadth — it deliberately has fewer algorithms and integrations than verl or TRL — and NOT for SFT-only work; it's for research groups running agentic RL who want every gradient one file away.

Mapped by ShipWithAI editors · links verified

Continue your stack

What teams reach for next — and why each earns a place beside labs-molt. Ranked by curator confidence.

pairs wellalternativealternativealternativebuilt withgym-anythingverlslimetrlvLLMlabs-molt
pairs wellalternativebuilt withpick a node for the why · open it from the panel
Weekly digest
README.md2 min read

🦋 Molt

An agentic-first RL framework for research.

Ray · vLLM · NVIDIA AutoModel — the smallest PyTorch-native stack for 1T-class fully-async, multimodal, multi-turn agentic RL.


License Python PyTorch NVIDIA AutoModel vLLM Ray RL code Tech Report Ask DeepWiki


Paper · Architecture · Why Molt · Quick Start · Agent Contract · Recipes · Scaling

Package SFT RL Runtime
molt molt.cli.train_sft molt.cli.train_rl_ray vLLM

Molt is agentic-first and PyTorch-native. The agent is the program; the trainer is a single actor; reward is any Python you write inside an Env or ChatAgent — graders, multi-turn tools, VLM environments, LLM-as-judge. Three components carry the rest — Ray for placement and async queues, vLLM for rollout, NVIDIA AutoModel + FSDP2 for training in pure PyTorch. That is the whole stack: ~9.2K lines of RL code that scale to 1T-class MoE on vLLM with TP / EP / CP — think DeepSeek-V3 at --fsdp.ep_size 256, Adam CPU offload for the largest actors. One agent API, one trainable actor, clean enough to read end-to-end.

🧩 Architecture

Three boxes. One async loop.

Molt architecture: Agent · vLLM rollout · Ray async queue · single-actor AutoModel/FSDP2 trainer, fully async

Ray owns placement and the async queue between the three boxes — that is the entire runtime. The contract is token-first: token ids, logprobs, action ranges, rewards, and multimodal tensors stay aligned from rollout to training. Anything you can compute in Python is a valid reward, including LLM-as-judge calls back through the same vLLM engines that drive rollout.

✨ Why Molt

What you get Why it matters for research
🤖 Agentic-first One Gymnasium-aligned API — Env.step() or ChatAgent.run() — covers graders, multi-turn tools, VLM environments, and OpenAI/Anthropic-compatible servers The agent is the program — iterate on environments in plain Python, the trainer stays untouched
⚙️ Fully-async runtime Ray placement, async rollout queues, vLLM engines, partial rollout, weight sync Rollout, training, and weight sync overlap — a DeepSeek-V3-class actor stays fed without bespoke infra
🔥 PyTorch-native, AutoModel-first FSDP2 + NVIDIA AutoModel, pure PyTorch end-to-end Hack the model in the language you already write; no backend ceremony
🎯 Single-actor simplicity One actor, optional KL reference — the whole RL graph fits on a page Every gradient is explicit; every loss term is one file away
🚀 Frontier-scale MoE AutoModel + FSDP2 + TP / EP / CP + Adam CPU offload, MoE-native — e.g. DeepSeek-V3 with --fsdp.ep_size 256 The same script that trains 8B scales to 1T-class MoE — no rewrite between scales
🔗 Token-first contract Aligned token ids, logprobs, action ranges, rewards, multimodal ten