areal-project/AReaL
Asynchronous RL services that connect LLM rollout inference to agent training
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
AReaL is a Python reinforcement-learning trainer that uses inference engines to generate rollouts, not a standalone inference server. The 2.0 refactor puts training, inference, agent execution, and weight updates in separate services under areal/v2/. In the RL loop, rollout inference generates trajectories for training; the training backend updates the actor, and the weight-update service makes the new policy available for subsequent rollouts. Asynchronous execution lets generation and optimization overlap rather than forcing them to advance in lockstep.
Training can run on Megatron, PyTorch FSDP, or PyTorch Archon. Rollout inference runs on SGLang by default or on vLLM, with separate dependency manifests and lockfiles for the vLLM path. For an existing black-box agent, the online proxy provides an integration point through base_url; for teams that need more control over the training workflow, examples/agent_workflow/ provides a separate starting point.
Key Capabilities & Differentiators
The GSM8K examples offer comparable configurations for GRPO, PPO, DAPO, and GSPO, while the multi-turn math example discounts rewards across turns. The example suite also covers Hermes online RL, Tau2 customer-service agents, and GRPO for visual reasoning. Set max_head_offpolicyness=0 to run synchronously and establish a baseline before testing asynchronous sampling.
Backend choice determines both the usable model set and the parallelism options. Megatron and Archon list pipeline and expert parallelism; FSDP lists neither. Qwen3-MoE is listed on all three training backends, but Qwen3.5 and Qwen3.5-MoE are listed only on Megatron and FSDP, and Gemma 3 only on FSDP. FSDP supports LoRA, Megatron lists LoRA with vLLM, and Archon does not support it. For inference, both SGLang and vLLM list tensor parallelism; vLLM lists pipeline parallelism, while SGLang lists data-parallel attention and expert parallelism. The table leaves those last two capabilities unspecified for vLLM.
Trade-offs & Limitations
Compared with deploying SGLang or vLLM alone, AReaL adds a closed RL loop, not a simpler way to serve a fixed checkpoint. Compared with synchronous RL, overlapping generation and optimization can improve utilization when rollouts would otherwise leave training workers idle. The cost is that trajectories can come from an older policy. Benchmark evaluation quality alongside throughput, and monitor rollout staleness and weight-update time rather than treating generation throughput as the training result.
The service split lets teams size training and rollout capacity separately, but it also makes backend, model, and weight-transfer compatibility an operating concern. Qwen2 and Qwen2.5 text models illustrate the boundary: disk updates work in v1 and v2, XCCL requires both actor and rollout to use v1, and AWEX is unsupported. The package metadata still classifies the project as pre-alpha. Before a costly run, validate the exact release, model, and backend combination through an end-to-end update and evaluation cycle.
Hardware & Deployment Guide
The package targets Linux, requires Python 3.11 or 3.12, and lists a CUDA 12 environment. The native CUDA quickstart uses uv, a FlashAttention wheel matched to Python, PyTorch, and CUDA, and uv sync --extra cuda for the default SGLang stack. The root Dockerfile defaults to an SGLang variant and accepts --build-arg VARIANT=vllm. For a native vLLM setup, use pyproject.vllm.toml and uv.vllm.lock in place of the default manifest and lockfile. A separate Dockerfile.rocm is present; confirm backend and model compatibility before committing to that path.
For a first run, use examples/math/gsm8k_rl.py with examples/math/gsm8k_grpo.yaml and scheduler.type=local. It downloads GSM8K and Qwen2-1.5B-Instruct, so a restricted-network deployment needs to stage those assets in advance. The multi-node Ray path uses scheduler.type=ray and sets cluster.fileroot to shared storage. Pin the release and backend together for repeatable runs: v2.0.0 introduced the service split, and v2.1.1 fixed the trainer to run initial evaluation before the first update.
max_head_offpolicyness=0 selects synchronous execution for a baseline.base_url change; Hermes provides an end-to-end example.Applied research and ML systems teams that need to train reasoning models or agents with reward feedback, compare RL algorithms, or scale rollout generation and optimization separately across GPUs.
You only need to serve a fixed checkpoint, call a hosted model API, or deploy a turnkey trainer without validating the model, inference backend, and weight-update combination.
Quick Start & Installation
git clone https://github.com/areal-project/AReaL cd AReaL pip install uv # Install flash-attn pre-built wheel first to avoid compiling from source # (pick the wheel matching your Python version; see https://github.com/mjun0812/flash-attention-prebuild-wheels/releases) uv pip install "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.7.16/flash_attn-2.8.3+cu128torch2.9-cp312-cp312-linux_x86_64.whl" uv sync --extra cuda # installs training packages + SGLang (default inference backend) # For vLLM instead: cp pyproject.vllm.toml pyproject.toml && cp uv.vllm.lock uv.lock && uv sync --extra cuda
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| AReaL ★ | 5.9k | +10 | Python | Apache-2.0 | Asynchronous RL services that connect LLM rollout inference to agent training |
| minimind | 75.5k | +3.2k | Python | Apache-2.0 | Native PyTorch dense and MoE models for end-to-end LLM training on local GPUs |
| autoresearch | 101k | +342 | Python | — | Single-GPU nanochat harness for agent-led, five-minute training experiments |
| LlamaFactory | 76.4k | +86 | Python | Apache-2.0 | A unified Python framework for LLM and VLM fine-tuning with pluggable inference |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/areal-project/AReaL.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about AReaL
Can I connect an existing agent without rewriting it?
base_url at AReaL's online training proxy. This lets you keep the agent application in place while changing where it sends model requests. The Hermes example demonstrates an end-to-end online loop; examples/agent_workflow/ is the better starting point if you need to customize the training workflow.How much GPU memory do I need for a first run?
Can I self-host AReaL commercially?
When should I choose AReaL over standalone SGLang or vLLM?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy