OpenRL: self-hosted API for your RL Infrastructure

OpenRL implements Tinker compatible API for fine-tuning language models that you can run on your own infrastructure (machine or a kubernetes cluster). You can use the Tinker SDK to orchestrate RL training loops by writing imperative Python code directly from your local machine.
🤖 Using an AI coding agent? Point it at the OpenRL skill: how to connect,
the openrl.* settings, what the cluster is doing while a call waits, and what each error means.
📖 For the full story behind why we built OpenRL, read our introductory blog post:
Introducing OpenRL: A self-hosted post-training API for fine-tuning LLMs
(Google Open Source Blog, June 2026).
Why OpenRL
Agentic RL on LLMs carries a lot of systems complexity. Running a single RL loop means
coordinating dataset selection and cleaning, choosing RL environments, debugging the training
loop, managing reward signals, handling inference mismatches, allocating hardware, and
operating the infrastructure underneath all of it.
Our view is that AI research and infrastructure concerns are too tightly coupled in today's
tooling. Separating them lets infrastructure engineers and AI researchers move independently —
much the way Kubernetes separated infrastructure concerns from application development.
That is why we built on Tinker. Tinker simplifies LLM post-training for developers and
researchers by hiding post-training infrastructure behind four API primitives. Researchers keep
complete control over their training algorithms, data loops, and loss functions; platform
engineers scale, orchestrate, and operate the infrastructure independently. OpenRL lets you run
those same APIs on hardware you control.
Bonus: you can use tinker-cookbook that has awesome tutorials/recipes and utilities!
Share GPUs across jobs
A traditional RL loop runs sequentially: trainers wait on samplers, and samplers wait on
environments to score rewards — work that is often CPU- or network-bound. Expensive GPUs sit
idle for much of the loop. Because the API decouples the loop from the hardware, OpenRL can run
multiple RL jobs concurrently and pack their training and sampling steps together, which lifts
overall GPU utilization.
Prototype locally, scale remotely
Putting infrastructure behind an API also means researchers stop wrestling with heavy Python
and CUDA dependency stacks. During R&D you can run your RL loop on a Mac while pointing it at
training APIs hosted on a Kubernetes cluster or a pool of VMs, then scale up without rewriting
the loop.
Autoresearch
We expect frontier AI research to become increasingly automated, and abstracting away the
infrastructure is groundwork for that. The autoresearch recipes,
adapted from Karpathy's autoresearch, run parallel
experiments for parameter sweeps and reward-signal improvement against a shared OpenRL API server.
What OpenRL is not
- It is not a managed service. OpenRL is self-hosted. The goal is that it is easy to deploy
and operate on your own Kubernetes cluster.
- It is not an RL framework. You keep full control over your RL loop; OpenRL only provides
the training and sampling APIs underneath it.
Quick Start
Getting started deploys OpenRL on a Kubernetes cluster with
GPUs and runs a supervised and a reinforcement learning job against it from your machine.
To work on OpenRL itself, see Local setup.
Snippet below shows a sample Reinforcement Learning loop like GRPO, where the 4 API primitives are used to create a generate-and-reward-train loop:
import asyncio
import tinker
from tinker import types
# Placeholder Environment & Reward Functions
def generate_math_problem() -> str: ...
def compute_advantages(rewards: list[float]) -> list[float]: ...
def parse_and_score_response(text: str) -> float: ...
async def rlvr_loop():
service_client = tinker.ServiceClient(base_url="http://127.0.0.1:23500")
# 1. Create Model
training_client = await service_client.create_lora_training_client_async(base_model="Qwen/Qwen3-4B-Instruct-2507", rank=16)
for epoch in range(10):
# 2A. Extract sampling client from current weights
sampling_client = training_client.save_weights_and_get_sampling_client(name=f"rlvr_epoch_{epoch}")
prompt_text = generate_math_problem()