Skip to content
Projetos

Sobre

Treinamento de RL agentivo em grande escala

IA e aprendizado de máquina

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
+1
em 7 dias
+8
em 15 dias
+27
em 1 mês
+75

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Prime Intellect Prime Intellect


prime-rl: Async RL Training at Scale



Style Tests

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 verifiers and prime-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
  Z.ai GLM-5.3-Flash, GLM-5.3, GLM-5, GLM-4.5-Air ✅ ✅
  TML Inkling-2-Mini, Inkling-2-Small ✅ ✅
  DeepSeek DeepSeek-V4-Flash, DeepSeek-V4-Pro ✅ ✅
  Qwen Qwen3.6-27B, Qwen3.6-35B-A3B, Qwen3.8-27B, Qwen3.8-Flash-Next, Qwen3.8-2.4T-A95B, Qwen3-235B-A22B ✅ ✅
  MiniMax MiniMax-M2.5, MiniMax-M2.7 ✅ ✅
  NVIDIA Nemotron-3.5-Lightning-30B-A3B, Nemotron-3-Super-120B-A12B, Nemotron-3.5-Super-VL-120B-A12B ✅ ✅
  Meta Muse-Glimmer-30B — ✅
  Poolside Laguna-XS.2, Laguna-XS-2.1, Laguna-S-2.1, Laguna-M.1 ✅ ✅
  Arcee Trinity-Nano, Trinity-Mini, Trinity-Large ✅ ✅
  OpenAI gpt-oss-20b, gpt-oss-120b ✅ ✅
  Prime Intellect 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
  1. Clone the repository
git clone https://github.com/PrimeIntellect-ai/prime-rl.git
cd prime-rl
  1. Initialize submodules
git submodule update --init -- deps/verifiers deps/renderers deps/prime-envs deps/pydantic-config
  1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
  1. Install dependencies from the lock file
uv sync --all-extras

NOTE: Environments are opt-in uv workspace members — uv sync --all-extras does not install them. To train on them, install all with uv sync --all-extras --all-packages, or a subset with uv sync --package prime-rl --package <env>.

NOTE: The gpu extra is the union of train (the trainer stack) and inference (vLLM and the transports that broadcast weights to it). SFT and pretraining without online evals only need uv sync --extra train; RL and online evals need both. FP8 training, MegaMoE and the cudnn_flashmla sparse-attention backend use kernels bundled in the vLLM wheel, so they need inference as well.

Validate your environment setup
  1. Check that the environment uses Python 3.12
uv run python -V
  1. Check that flash-attn is installed
uv run python -c "import flash_attn"
  1. Check that you can run SFT trainer (this requires 1 GPU)
uv run sft @ dev/setup/sft.toml
  1. Check that you can run the inference server (this requires 1 GPU)
uv run inference --vllm.model Qwen/Qwen3-0.6B
  1. 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:

  1. Install the pre-commit hooks to ensure your code is formatted correctly.
  2. Please keep your PR in "Draft" until it is ready for review.
  3. If your PR resolves an issue, please link the issue in the PR description
  4. 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}
}

Explore projetos relacionados

Carregando…