PrimeIntellect-ai/prime-rl
Über uns
Agentisches RL-Training im großen Maßstab
KI und maschinelles LernenGemessener Sternzuwachs
- in 24h
- +1
- in 7 days
- +8
- in 15 days
- +27
- in 1 month
- +75
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
Original
prime-rl: Async RL Training at Scale
Overview
prime-rl is a framework for large-scale reinforcement learning. It is designed to be easy to use and hackable, yet capable of scaling to 1000+ GPUs. Here is what we think sets it apart:
- Fully async RL. Fully asynchronous RL for high-throughput agentic training at scale.
- Scale. FSDP2 and vLLM train 1T+ MoE models on 1000+ GPUs, with EP, CP and custom kernels. See Scaling.
- Low precision. FP8, MXFP8 and NVFP4 in training and inference. See Advanced.
- Agentic inference. P/D disaggregation, wide-EP, spec dec and KV cache offload. See Inference.
- Algorithms. Built-in losses, advantages and curricula, plus plugins for your own. See Algorithms.
- Environments. Built-in open-source and in-house environments via
verifiersandprime-envs. - End-to-end. Pretraining, SFT, RL, LoRA and evals, with live run control and a local dashboard. See Training.
- Models and recipes. Custom model implementations, including multimodal ones, with launch-ready recipes.
Models & Recipes
The trainer runs custom model implementations with expert parallelism (EP) and context parallelism (CP). Linked models have a launch-ready recipe for multi-node RL, SFT and inference.
| Provider | Models | EP | CP |
|---|---|---|---|
GLM-5.3-Flash, GLM-5.3, GLM-5, GLM-4.5-Air |
✅ | ✅ | |
Inkling-2-Mini, Inkling-2-Small |
✅ | ✅ | |
DeepSeek-V4-Flash, DeepSeek-V4-Pro |
✅ | ✅ | |
Qwen3.6-27B, Qwen3.6-35B-A3B, Qwen3.8-27B, Qwen3.8-Flash-Next, Qwen3.8-2.4T-A95B, Qwen3-235B-A22B |
✅ | ✅ | |
MiniMax-M2.5, MiniMax-M2.7 |
✅ | ✅ | |
Nemotron-3.5-Lightning-30B-A3B, Nemotron-3-Super-120B-A12B, Nemotron-3.5-Super-VL-120B-A12B |
✅ | ✅ | |
Muse-Glimmer-30B |
— | ✅ | |
Laguna-XS.2, Laguna-XS-2.1, Laguna-S-2.1, Laguna-M.1 |
✅ | ✅ | |
Trinity-Nano, Trinity-Mini, Trinity-Large |
✅ | ✅ | |
gpt-oss-20b, gpt-oss-120b |
✅ | ✅ | |
INTELLECT-3.1 |
✅ | ✅ |
Setup
We develop and test on NVIDIA GPUs. If your setup fails, please create an issue.
Quick Setup
Set up prime-rl in a single command.
curl -sSL https://raw.githubusercontent.com/PrimeIntellect-ai/prime-rl/main/scripts/install.sh | bash
Manual Setup
- Clone the repository
git clone https://github.com/PrimeIntellect-ai/prime-rl.git
cd prime-rl
- Initialize submodules
git submodule update --init -- deps/verifiers deps/renderers deps/prime-envs deps/pydantic-config
- Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
- Install dependencies from the lock file
uv sync --all-extras
NOTE: Environments are opt-in uv workspace members —
uv sync --all-extrasdoes not install them. To train on them, install all withuv sync --all-extras --all-packages, or a subset withuv sync --package prime-rl --package <env>.
NOTE: The
gpuextra is the union oftrain(the trainer stack) andinference(vLLM and the transports that broadcast weights to it). SFT and pretraining without online evals only needuv sync --extra train; RL and online evals need both. FP8 training, MegaMoE and thecudnn_flashmlasparse-attention backend use kernels bundled in the vLLM wheel, so they needinferenceas well.
Validate your environment setup
- Check that the environment uses Python 3.12
uv run python -V
- Check that
flash-attnis installed
uv run python -c "import flash_attn"
- Check that you can run SFT trainer (this requires 1 GPU)
uv run sft @ dev/setup/sft.toml
- Check that you can run the inference server (this requires 1 GPU)
uv run inference --vllm.model Qwen/Qwen3-0.6B
- Check that the full RL stack (inference + orchestrator + trainer) runs end-to-end (this requires 2 GPUs)
uv run rl @ dev/examples/reverse-text/rl.toml
Docs
Check out the docs directory for in-depth guides on how to use prime-rl.
- Overview - Architecture, install, and a copy-pasteable end-to-end RL run
- Configuration - TOML composition, CLI overrides, env vars, validation
- Training - RL, SFT, pretraining, checkpointing, live run control, observability and the dashboard
- Eval - Standalone evals against any inference server, online evals, resume, platform upload
- Inference - Single-node to multi-node serving, P/D disaggregation, router, KV cache offload, speculative decoding
- Scaling - Single-GPU through multi-node, FSDP/EP/CP, SLURM, benchmarking
- Algorithms - Async training and staleness, losses, advantages, curricula, trajectory merging
- Advanced - Custom modeling, low-precision training, multimodal training, LoRA
- Development - Test suite, pre-commit hooks, adding a new model
Contributing
We warmly welcome community contributions! We use issues to track bugs, feature requests, and share our internal roadmap. If you encounter bugs, have pain points during development, or have ideas for new features, please open an issue.
Contributions are welcome via PR. Please follow these guidelines:
- Install the pre-commit hooks to ensure your code is formatted correctly.
- Please keep your PR in "Draft" until it is ready for review.
- If your PR resolves an issue, please link the issue in the PR description
- If you can, try running the test suite locally to ensure your changes are working as expected.
Pre-Commit Hooks
Please install the pre-commit hooks to ensure your code is formatted correctly.
uv run pre-commit install
Tests
uv run pytest -v # everything
uv run pytest tests/unit -v # unit only
uv run pytest tests/integration -v # integration only
uv run pytest -v -m "not gpu" # CPU-only (inverse of the gpu marker)
License
This project is licensed under the Apache 2.0 license, as found in the License file.
Citation
If you find our work useful, feel free to cite it using
@misc{primeintellect2025prime-rl,
author = {Prime Intellect},
title = {prime-rl},
url = {https://github.com/PrimeIntellect-ai/prime-rl},
year = {2025}
}
Ähnliche Projekte entdecken
Wird geladen…