rllm

rllm-orgApache-2.0活跃维护

面向大语言模型的强化学习训练框架,支持分布式训练与智能体工作流,让开发者能低成本训练和调优推理模型。

Democratizing Reinforcement Learning for LLMs

v0.3.0-pre发布于 2026-04-30 07:22 UTC5,913star +1 / 7 天640fork同步于 2026-11-10 23:36 UTC

怎么上手

由 README 提炼,执行前请确认
uv pip install "rllm @ git+https://github.com/rllm-org/rllm.git"
硬件要求按 README 说明

README 未说明具体显存要求;分布式多 GPU 训练需安装 verl 后端(含 vLLM/SGLang),单机可用 tinker 后端。

多卡 / 张量并行
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用强化学习训练语言智能体的开源框架,同一份智能体代码既能评测也能训练

面向大语言模型的强化学习训练框架,支持分布式训练与智能体工作流,让开发者能低成本训练和调优推理模型。

核心能力

  • 用 @rllm.rollout 包装任意智能体代码,无需改动即可接入训练
  • 通过模型网关按 URL 会话捕获 token ID 与 logprobs
  • 用单个 flag 在 verl、tinker、fireworks 训练后端间切换
  • 集成 60+ 基准,rllm eval 自动拉取并运行
  • 支持 Docker、Daytona、Modal、本地沙箱并带快照与预热池

容易踩的坑

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

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

4 个版本v0.3.0-pre
  1. v0.3.0-prerLLM: v0.3.0-pre最新正式版2026-04-30 · 2026-04-30 07:22 UTC

    What's Changed

  2. v0.2.1.post1rLLM: v0.2.1.post12025-12-18 · 2025-12-18 23:51 UTC
    查看更新说明

    What's Changed

    New Contributors

    Full Changelog: https://github.com/rllm-org/rllm/compare/v0.2.1...v0.2.1.post1

  3. 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 supports Tinker as 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 verl backend. See the Geo3K training example for reference.

    • LoRA fine-tuning: rLLM supports LoRA training in both the verl and Tinker backends. 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

  4. 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 AgentWorkflowEngine and AgentWorkflowTrainer—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

    1. Support the official verl==0.5.0 as training backend, no custom verl fork anymore! verl==0.5.0 comes 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.
    2. Introduce AgentWorkflowEngine, which enables passing in arbitrary agentic programs for training. (@kylemontgomery1)
    3. Support more agents and environments
      • Terminus and TerminalBench (@JasonWei05)
      • Tongyi DeepResearch agent (@yayashuxue)
      • AppWorld and AppWorldReactAgent (@sunan135)
    4. Integration with other agentic framework/SDK
      • Strands SDK from AWS
      • SmolAgents

    What's Changed

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Agentic RL on any harness, with any backend, on any benchmark.

    Documentation Slack Website Blogs X

    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

    Articles & Blog Posts

    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.