默认只装 tinker 单机后端依赖,多 GPU 训练需另装 rllm[verl],Fireworks 平台需装 rllm[fireworks];需 Python >= 3.11;CLI 使用前要先执行 rllm model setup 配置模型提供方。

rllm
rllm-orgApache-2.0活跃维护面向大语言模型的强化学习训练框架,支持分布式训练与智能体工作流,让开发者能低成本训练和调优推理模型。
Democratizing Reinforcement Learning for LLMs
uv pip install "rllm @ git+https://github.com/rllm-org/rllm.git"README 未说明具体显存要求;分布式多 GPU 训练需安装 verl 后端(含 vLLM/SGLang),单机可用 tinker 后端。
用强化学习训练语言智能体的开源框架,同一份智能体代码既能评测也能训练
面向大语言模型的强化学习训练框架,支持分布式训练与智能体工作流,让开发者能低成本训练和调优推理模型。
核心能力
- 用 @rllm.rollout 包装任意智能体代码,无需改动即可接入训练
- 通过模型网关按 URL 会话捕获 token ID 与 logprobs
- 用单个 flag 在 verl、tinker、fireworks 训练后端间切换
- 集成 60+ 基准,rllm eval 自动拉取并运行
- 支持 Docker、Daytona、Modal、本地沙箱并带快照与预热池
容易踩的坑
- v0.3.0-prerLLM: v0.3.0-pre最新正式版2026-04-30 · 2026-04-30 07:22 UTC
What's Changed
- [feature] add support for on policy distillation by @kylemontgomery1 in https://github.com/rllm-org/rllm/pull/356
- [Bugfix] Make sure the tracking logger is now explicitly finished by trainers by @listar2000 in https://github.com/rllm-org/rllm/pull/358
- Add Geo3K Tinker training example with VLM support by @BrianChen26 in https://github.com/rllm-org/rllm/pull/357
- Support custom metric for SDK by @thwu1 in https://github.com/rllm-org/rllm/pull/362
- fix: typo in bibtex by @tongyx361 in https://github.com/rllm-org/rllm/pull/363
- Fireworks API returns raw token ids to avoid re-tokenization by @1stprinciple in https://github.com/rllm-org/rllm/pull/301
- overlong_filter in stepwise RL by @LianShuQuan in https://github.com/rllm-org/rllm/pull/365
- Verifiers and Prime Intellect Environment Integration & Example by @alt-glitch in https://github.com/rllm-org/rllm/pull/367
- Add test_train.sh for docs build by @alt-glitch in https://github.com/rllm-org/rllm/pull/374
- Resolve Tinker error in advantage computation by @listar2000 in https://github.com/rllm-org/rllm/pull/375
- Merge nightly branch into main by @listar2000 in https://github.com/rllm-org/rllm/pull/377
- [Fix] Add a few patches to unified trainer by @listar2000 in https://github.com/rllm-org/rllm/pull/383
- [Doc improvements] Add the missing multi-GPU configuration options to the evaluation scripts in the quick-start documentation. by @SyncLionPaw in https://github.com/rllm-org/rllm/pull/384
- [Fix] Further enhancements to the Unified Trainer by @listar2000 in https://github.com/rllm-org/rllm/pull/385
- [Experimental] Fixing Tinker rollout prompt ids by @listar2000 in https://github.com/rllm-org/rllm/pull/390
- Reset workflow with task and uid before workflow execution by @JasonWei05 in https://github.com/rllm-org/rllm/pull/389
- Fully Async Trainer by @thwu1 in https://github.com/rllm-org/rllm/pull/394
- Add LLM-in-Sandbox to awesome projects by @cdxeve in https://github.com/rllm-org/rllm/pull/395
- 【Fix】All content in examples/search were empty by @Fulin-Gao in https://github.com/rllm-org/rllm/pull/396
- [Feat] Important updates to the experimental unified trainer by @listar2000 in https://github.com/rllm-org/rllm/pull/398
- FinQA Release by @mananroongta in https://github.com/rllm-org/rllm/pull/393
- Refactor unified trainer async flow and add precomputed-advantage + Tinker rollout fixes by @listar2000 in https://github.com/rllm-org/rllm/pull/401
- feat(tracking): integrate changes need for the rllm-ui by @Chanbinski in https://github.com/rllm-org/rllm/pull/402
- Fixed the qwen parser to handle case when model is non-thinking but user put disable_thinking=false as config by @jeewoo-lee in https://github.com/rllm-org/rllm/pull/405
- Enable TrajectorygGoup's role specific RL advantage estimator via unified trainer hook by @listar2000 in https://github.com/rllm-org/rllm/pull/408
- Move Tinker backend to rllm.trainer.tinker and deprecate legacy trainer APIs under rllm.trainer.deprecated by @listar2000 in https://github.com/rllm-org/rllm/pull/409
- Refactor RL advantage estimators and add REINFORCE++ baseline/RLOO support by @listar2000 in https://github.com/rllm-org/rllm/pull/410
- Extend On-Policy Distillation support with unified trainer example by @BrianChen26 in https://github.com/rllm-org/rllm/pull/406
- [Doc] Unified trainer docs by @listar2000 in https://github.com/rllm-org/rllm/pull/414
- [Fix] Put doc images into assets by @listar2000 in https://github.com/rllm-org/rllm/pull/415
- [Fix] Hot-fix advantage calcuilation unpacking issue by @listar2000 in https://github.com/rllm-org/rllm/pull/416
- Add deprecation notices in docs by @listar2000 in https://github.com/rllm-org/rllm/pull/417
- feat(tracking): UILogger with non-blocking background worker by @Chanbinski in https://github.com/rllm-org/rllm/pull/419
- feat(rllm-model-gateway): add standalone proxy server for rLLM by @luyuzhe111 in https://github.com/rllm
- v0.2.1.post1rLLM: v0.2.1.post12025-12-18 · 2025-12-18 23:51 UTC
查看更新说明
What's Changed
- update docs & add curves by @thwu1 in https://github.com/rllm-org/rllm/pull/343
- Fix import for colorful_print in agent_sdk_engine.py and agent_sdk_trainer.py by @wht0703 in https://github.com/rllm-org/rllm/pull/345
- Unblock sdk installation by overriding dependices by @wht0703 in https://github.com/rllm-org/rllm/pull/348
- [Doc] Update README and fix a few installation related issues by @listar2000 in https://github.com/rllm-org/rllm/pull/347
- fix: keyerror completion_ids by @kxfan2002 in https://github.com/rllm-org/rllm/pull/353
- Fix: Enable GPU acceleration for dense retrieval in search agent by @Gitsamshi in https://github.com/rllm-org/rllm/pull/349
New Contributors
- @wht0703 made their first contribution in https://github.com/rllm-org/rllm/pull/345
- @kxfan2002 made their first contribution in https://github.com/rllm-org/rllm/pull/353
- @Gitsamshi made their first contribution in https://github.com/rllm-org/rllm/pull/349
Full Changelog: https://github.com/rllm-org/rllm/compare/v0.2.1...v0.2.1.post1
- v0.2.1rLLM: v0.2.12025-12-11 · 2025-12-11 22:58 UTC
查看更新说明
rLLM v0.2.1: Tinker backend, VLM training, Eval Protocol, and SDK (preview)
We are excited to release rLLM v0.2.1. This new version comes with the following exciting features:
-
rLLM SDK (preview): The rLLM SDK enables you to transform agents written in frameworks such as LangGraph, SmolAgent, or Strands into trainable workflows. Check out this LangGraph RAG example, which builds a RAG agent and trains it with the rLLM SDK.
-
Tinker training backend: In addition to
verl, rLLM now supportsTinkeras a training backend. You can use the same abstractions for building agents and easily switch between different backends for training. -
VLM training: rLLM supports Vision-Language Model training with the
verlbackend. See the Geo3K training example for reference. -
LoRA fine-tuning: rLLM supports LoRA training in both the
verlandTinkerbackends. See the GSM8K LoRA example for how to enable LoRA training with a single config change. -
Eval Protocol Integration We integrate with the Eval Protocol from Fireworks AI. Users can now train on any environments supported by the Eval Protocol. See this example that uses Eval Protocol in rLLM to train a Frozenlake agent.
A big shoutout to @thwu1 @kylemontgomery1 @listar2000 @xzrderek for their outstanding work on these features.
What's Changed
- make rllm-specific configs applied correctly and robustly by @listar2000 in https://github.com/rllm-org/rllm/pull/256
- Ensure disable_thinking defaults to False when config is None by @Tendo33 in https://github.com/rllm-org/rllm/pull/258
- fix: circular import issues in WORKFLOW_CLASS_MAPPING by @listar2000 in https://github.com/rllm-org/rllm/pull/261
- [nightly] initialize the nightly branch by @listar2000 in https://github.com/rllm-org/rllm/pull/263
- Fix environment variable forwarding to ray runtime env by @listar2000 in https://github.com/rllm-org/rllm/pull/265
- [nightly] update recent changes on workflow engines by @listar2000 in https://github.com/rllm-org/rllm/pull/268
- Fix : Prevent KeyError in _pad_dataproto_to_world_size by @mananroongta in https://github.com/rllm-org/rllm/pull/274
- Fix retokenization by @thwu1 in https://github.com/rllm-org/rllm/pull/272
- fix controlling the n_parallel_agents and the concurrent env operations by @LianShuQuan in https://github.com/rllm-org/rllm/pull/271
- Added is_correct & reward flow through tool env by @mananroongta in https://github.com/rllm-org/rllm/pull/277
- Integrate Eval Protocol as RL environment by @1stprinciple in https://github.com/rllm-org/rllm/pull/276
- SWEEnv.from_dict() by @LianShuQuan in https://github.com/rllm-org/rllm/pull/278
- Fix: Resolve PyArrow nested data conversion error in distributed dataset loading by @erranlli in https://github.com/rllm-org/rllm/pull/281
- Per Episode Logging Feature by @qywu in https://github.com/rllm-org/rllm/pull/282
- [feature] Support Tinker as a backend by @thwu1 in https://github.com/rllm-org/rllm/pull/283
- [feat] Tinker Workflow Trainer by @thwu1 in https://github.com/rllm-org/rllm/pull/288
- Fix fireworks dependency by @listar2000 in https://github.com/rllm-org/rllm/pull/296
- Examples: fix utils import by @Flecart in https://github.com/rllm-org/rllm/pull/295
- [Refactor] Update Tinker Backend Example by @thwu1 in https://github.com/rllm-org/rllm/pull/300
- Revert "fix: Gracefully skip overlong prompts during training to prev… by @1stprinciple in https://github.com/rllm-org/rllm/pull/302
- Fixes #303 Optimize old_log_prob computation in PPO trainer by @BabelTower in https://github.com/rllm-org/rllm/pull/304
- Bug/n parallel agents by @kylemontg
-
- v0.2.0rLLM: v0.2.02025-10-16 · 2025-10-16 21:24 UTC
查看更新说明
rLLM v0.2: RL Training over General Agentic Programs (Blog Post)
We are excited to release rLLM v0.2, a major upgrade of our RL training framework. In v0.1, rLLM provided agent and OpenAI Gym-like environment abstractions to support training ReACT-style agents. In v0.2, we additionally introduce
AgentWorkflowEngineandAgentWorkflowTrainer—more general abstractions that enable arbitrary agentic programs to be trained. Agent builders and researchers can now define multi-agent systems, complex workflows (e.g., solver-judge, planner executor, MCTS), and agentic programs with custom reward functions, and train them with reinforcement learning without rewriting their production code.Key Features in v0.2
- Support the official
verl==0.5.0as training backend, no custom verl fork anymore!verl==0.5.0comes with support of the following features which are now supported in rLLM (@kylemontgomery1):- Megatron training support (@jeewoo-lee)
- SGLang as the rollout engine, in addition to vLLM.
- Introduce
AgentWorkflowEngine, which enables passing in arbitrary agentic programs for training. (@kylemontgomery1) - Support more agents and environments
- Terminus and TerminalBench (@JasonWei05)
- Tongyi DeepResearch agent (@yayashuxue)
- AppWorld and AppWorldReactAgent (@sunan135)
- Integration with other agentic framework/SDK
- Strands SDK from AWS
- SmolAgents
What's Changed
- fix <tool_calls_begin> variable by @wj-Mcat in https://github.com/rllm-org/rllm/pull/142
- Fix not registered license from code by @annyan09023 in https://github.com/rllm-org/rllm/pull/144
- fix r2egym import error; update installation README by @jeffreysijuntan in https://github.com/rllm-org/rllm/pull/146
- update deepscaler max_prompt_length to avoid exception during training by @jeffreysijuntan in https://github.com/rllm-org/rllm/pull/148
- fix(syntax): Resolve invalid escape sequence warnings by @tonyz0x0 in https://github.com/rllm-org/rllm/pull/154
- added Tools for SFT by @mananroongta in https://github.com/rllm-org/rllm/pull/160
- update docs by @jeffreysijuntan in https://github.com/rllm-org/rllm/pull/167
- Add dark mode to docs by @philippnormann in https://github.com/rllm-org/rllm/pull/168
- [FIX] Fix tool calling result parsing problem in tranjectory visualizer & MCP tool name fixing by @VincentXWD in https://github.com/rllm-org/rllm/pull/174
- [hotfix][miniwob] Fix gymnasium.error.NameNotFound by @abrohamLee in https://github.com/rllm-org/rllm/pull/172
- Load full DeepCoder dataset, instead of LCB subset by @mananroongta in https://github.com/rllm-org/rllm/pull/178
- [feat][docker] Installation with Docker by @abrohamLee in https://github.com/rllm-org/rllm/pull/177
- Add macOS compatibility: exclude GPU dependencies on darwin by @yayashuxue in https://github.com/rllm-org/rllm/pull/180
- Torch 2.7.0 only compatible with MacOS python=3.11 by @yayashuxue in https://github.com/rllm-org/rllm/pull/184
- Migrate to verl v0.5.0 by @kylemontgomery1 in https://github.com/rllm-org/rllm/pull/193
- Terminal Bench Integration into rLLM (Simplified) by @JasonWei05 in https://github.com/rllm-org/rllm/pull/205
- feat: Integrate Strands SDK with RLLM for scalable tool-enabled agent training by @yayashuxue in https://github.com/rllm-org/rllm/pull/206
- Add VimGolf agent training example by @James4Ever0 in https://github.com/rllm-org/rllm/pull/209
- fix: update search engine source data path by @noiji in https://github.com/rllm-org/rllm/pull/216
- [feature] Adding Megatron support for v0.2 by @jeewoo-lee in https://github.com/rllm-org/rllm/pull/221
- Use RolloutEngine for single_turn_workflow.py by @1stprinciple in https://github.com/rllm-org/rllm/pull/223
- Standalone inference: remove hard verl dependency by @JasonWei05 in https://github.com/rllm-org/rllm/pull/228
- Update pyproject.toml to v0.2.0 by @NIL-zhuang in http
- Support the official
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Agentic RL on any harness, with any backend, on any benchmark.
rLLM is an open-source framework for training language agents with reinforcement learning. Bring any harness, run it in any sandbox, and switch training backends with one flag — the same agent code drives both eval and training.
Core features
- Any harness. 10+ CLI harnesses (Claude Code, Codex, Terminus-2, mini-swe-agent, opencode, ...) plus Harbor-compatible task dirs. Or wrap your own agent — LangGraph, OpenAI Agents SDK,
openai.OpenAI— with@rllm.rollout. - Any sandbox. Docker, Daytona, Modal, or local — with snapshot + warm-pool acceleration to keep rollouts cheap at training-scale.
- Multiple training backends, one API.
verl(distributed multi-GPU),tinker(single-machine),fireworks(Fireworks platform). Switch with one flag. - 60+ integrated benchmarks. Math, code, MCQ, QA, search, VLM, translation, agentic — Terminal-Bench 2.0, SWE-bench, SkillsBench, AIME, MATH-500, GPQA, and more.
rllm eval <name>auto-pulls and runs. - Multiple training methods. GRPO, REINFORCE, RLOO, SFT, on-policy distillation, and more.
- Battle-tested. State-of-the-art open-source results (DeepScaleR-1.5B, DeepCoder-14B, DeepSWE-32B, FinQA-4B). Adopted by academic labs and industry research teams (see Community Projects below).
Read more on our documentation site.
Installation
rLLM requires Python >= 3.11. You can install it either directly via pip or build from source.
uv pip install "rllm @ git+https://github.com/rllm-org/rllm.git"
This installs dependencies for running rllm CLI with the tinker backend (single-machine, Tinker API). For other backends:
# Distributed multi-GPU training (verl + vLLM/SGLang)
uv pip install "rllm[verl] @ git+https://github.com/rllm-org/rllm.git"
# Fireworks training platform
uv pip install "rllm[fireworks] @ git+https://github.com/rllm-org/rllm.git"
For building from source or Docker, see the installation guide.
Quickstart
Option A: CLI (no code needed)
# 1. Configure your model provider
rllm model setup
# 2. Evaluate on a benchmark
rllm eval gsm8k
# 3. Train with RL
rllm train gsm8k
Option B: Python API
Define a rollout (your agent) and an evaluator (your reward function), then hand them to the trainer:
# my_flow.py
from openai import OpenAI
import rllm
from rllm.types import AgentConfig, Episode, Task, Trajectory
@rllm.rollout
def solve(task: Task, config: AgentConfig) -> Episode:
client = OpenAI(base_url=config.base_url, api_key="EMPTY")
response = client.chat.completions.create(
model=config.model,
messages=[{"role": "user", "content": task.instruction}],
)
answer = response.choices[0].message.content or ""
return Episode(
trajectories=[Trajectory(name="solver", steps=[])],
artifacts={"answer": answer},
)
# my_evaluator.py
import rllm
from rllm.eval.types import EvalOutput, Signal
from rllm.types import Episode
@rllm.evaluator
def score(task: dict, episode: Episode) -> EvalOutput:
answer = str(episode.artifacts.get("answer", ""))
is_correct = answer.strip() == task["ground_truth"].strip()
reward = 1.0 if is_correct else 0.0
return EvalOutput(reward=reward, is_correct=is_correct,
signals=[Signal(name="accuracy", value=reward)])
# train.py
from rllm.trainer import AgentTrainer
trainer = AgentTrainer(
backend="tinker",
agent_flow=solve,
evaluator=score,
config=config,
train_dataset=dataset,
)
trainer.train()
During training, config.base_url points to a gateway that transparently captures token IDs and logprobs — your agent code stays the same for eval and training.
See the cookbooks for complete working examples (single-turn VLM solver, multi-agent solver-judge, and more).
Architecture
rLLM follows a simple pipeline: run your agent → collect traces → compute rewards → update the model.
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Your Agent │───▶│ Traces │───▶│ Rewards │───▶│ RL Update │
│ (any code) │ │ (auto-logged)│ │ (your logic) │ │ (GRPO etc.) │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
Your agent runs as-is — rLLM's model gateway captures LLM calls (token IDs + logprobs) by URL-routed sessions and structures them into Episodes (one task) containing Trajectories (one agent run) made of Steps (one LLM call). A reward function scores the result, and the RL algorithm updates the model weights. The same agent code works for both eval and training.
Under the hood:
- Workflow Engine runs N parallel agent instances to collect rollouts
- Model Gateway routes requests and captures token IDs + logprobs
- Transform Pipeline groups trajectories for advantage computation
- Training Backend (verl, tinker, or fireworks) handles the policy update
Community Projects
- Tongyi DeepResearch — Open-source AI researchers by Alibaba NLP
- Terminal-Bench-RL — Training long-horizon terminal agents with RL
- PettingLLMs — Multi-agent RL with on-policy training
- SETA — Scaling environments for terminal agents
- LLM-in-Sandbox — Building general agents by running LLMs in a sandbox
- Vision-DeepResearch — The first long-horizon multimodal deep-research MLLM
- OpenSearch-VL - An Open Recipe for Frontier Multimodal Search Agents
- Cogito, Ergo Ludo — An agent that learns to play by reasoning and planning
- Cut the Bill, Keep the Turns — Affordable multi-turn search RL
- Experiential Reinforcement Learning — Experience-reflection-consolidation loop for RL with sparse rewards
- V1: Unifying Generation and Self-Verification — Pairwise self-verification for parallel test-time scaling
- TherapyGym - Evaluating and Aligning Clinical Fidelity and Safety in Therapy Chatbots
- SandMLE - Synthetic Sandbox for Training MLE Agents
- AxPO - Agent Explorative Policy Optimization for Multimodal Agentic Reasoning
- Remember When It Matters — Proactive Memory Agent for Long-Horizon Agents
Articles & Blog Posts
- rLLM UI: Real-Time Observability Tool for Agent Training & Evaluation — Mar 2026
- rLLM On-Policy Distillation: Training Smaller Students from Stronger Teachers — Mar 2026
- Faster and Better: Open-Source Recipe for Deep Research Agents with Fully Async Training — Feb 2026
- rLLM-FinQA: How a 4B Model Outperforms 235B and Rivals Gemini 2.5 Pro on Financial Analysis — Feb 2026
- rLLM SDK: Training Any Agentic Program without Code Changes — Dec 2025
- rLLM v0.2: RL Training for General Agentic Programs — Oct 2025
- DeepSWE: Open-source SWE Agent via RL — Jul 2025
- DeepCoder: 14B Coder at O3-mini Level — Apr 2025
- DeepScaleR: 1.5B Surpasses O1-Preview — Feb 2025
Acknowledgements
Our work is done as part of Berkeley Sky Computing Lab. The rLLM team is generously supported by grants from Laude Institute, AWS, Hyperbolic, Fireworks AI, and Modal. We pay special thanks to Together AI for the research partnership and compute support.
Citation
@misc{rllm2025,
title={rLLM: A Framework for Post-Training Language Agents},
author={Sijun Tan and Michael Luo and Colin Cai and Tarun Venkat and Kyle Montgomery and Aaron Hao and Tianhao Wu and Arnav Balyan and Manan Roongta and Chenguang Wang and Li Erran Li and Raluca Ada Popa and Ion Stoica},
year={2025},
howpublished={\url{https://pretty-radio-b75.notion.site/rLLM-A-Framework-for-Post-Training-Language-Agents-21b81902c146819db63cd98a54ba5f31}},
note={Notion Blog},
}
You may also cite our prior work DeepScaleR, DeepCoder, and DeepSWE.