Compare commits

...
Author SHA1 Message Date
961c11f4cf feat(orchestrator): support infinite tasksets (#2993)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(orchestrator): support infinite tasksets

An env server may now report num_tasks=None (verifiers#1969: an
infinite, procedurally generated taskset). TrainSource streams a
monotonic task_idx for such an env - the server generates tasks on
demand, so every pull is a fresh task and there are no epochs to
shuffle - while finite envs keep their shuffled index table. An eval
env with an infinite taskset must set num_examples explicitly.

Dormant until the verifiers pin includes #1969: a finite taskset still
reports an int count and takes the existing paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers to main (infinite tasksets) + relock

Activates the orchestrator's infinite-taskset support: verifiers main
now includes #1969, so the procedural v1 tasksets report
num_tasks=None. The color-codeword-v1 configs drop their num_examples
taskset field (the knob no longer exists - the taskset is
unconditionally infinite and the train env streams); CHANGELOG entry
for the removed size knobs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: drop CHANGELOG entry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 19:05:55 -07:00
Sebastian MüllerandGitHub b7b1f874b5 fix(trainer): skip unneeded gradients in fused LM-head backward (#3011)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
_SequenceChunkedLogProbEntropyFn.backward unconditionally allocated and
accumulated both grad_hidden and grad_weight, ignoring
ctx.needs_input_grad. With a frozen output head (e.g. LoRA without head
adaptation) this allocated a full vocab-size gradient buffer and ran the
weight-gradient matmuls for a result autograd discards. Allocate and
accumulate each gradient only when required; return None otherwise.
2026-07-14 03:25:41 +02:00
d334ea5294 chore: release v0.7.0 (#2998)
Tag and Release / auto-tag-on-main (push) Canceled after 0s
Tag and Release / release-from-auto-tag (push) Canceled after 0s
Tag and Release / tag-and-release (push) Canceled after 0s
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: release v0.7.0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: sync uv.lock to 0.7.0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 18:22:09 -07:00
57d2b84330 feat(config): allow prime-rl conversions to be stored separately from model (#3023)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(config): allow prime-rl conversions to be stored separately from model

Add primerl_conversion_dir config field to decouple converted weight
storage from the (potentially immutable) model snapshot directory. When
set, HF<->PrimeRL format conversions are written there instead of inside
the model directory. Defaults to None (existing behavior).

Also fixes load_state_dict to always read from the original source_path
instead of the converted snapshot path's parent.

Signed-off-by: Sami Jaghouar <sami.jaghouar@gmail.com>

* chore: rename primerl_conversion_dir to conversion_dir

Address review: shorter field name and clarify the docstring that converted
weights land in a prime/hf subdirectory. Keep the /prime subdir layout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Signed-off-by: Sami Jaghouar <sami.jaghouar@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 18:13:32 -07:00
Matej SirovatkaandGitHub 4f5e06fcb6 fix: install vllm-router on aarch64 (#3025)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-07-14 02:20:25 +02:00
Matej SirovatkaandGitHub 390dfdc556 fix: support DeepGEMM FP8 training on SM100 (#3022)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* fix: support DeepGEMM grouped GEMM on SM100

* Remove FP8 inference instructions

Remove FP8 inference section from SKILL.md.

Signed-off-by: Matej Sirovatka <54212263+S1ro1@users.noreply.github.com>

* refactor: inline DeepGEMM scale mode

* fix: support FP8 linears on SM100

---------

Signed-off-by: Matej Sirovatka <54212263+S1ro1@users.noreply.github.com>
2026-07-14 02:19:24 +02:00
2fdffa7d3d fix(trainer): broadcast resumed policy weights before training loop (#3004)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* fix(trainer): broadcast resumed policy weights before training loop

On resume, the orchestrator advances to v{checkpoint_step} and pauses
inference to receive those weights over NCCL. Since #2896 moved the
in-loop weight broadcast to the END of a step, the trainer would start
step {checkpoint_step+1} first — which blocks on rollouts the paused
inference engines cannot produce until they get v{checkpoint_step}.
Both sides then wait forever (confirmed on GLM-5.2 resume: orchestrator
"Created NCCL_READY marker" then silent, trainer stuck "Looking for
batches" for the next step).

Restore the pre-#2896 top-of-loop sync with a one-shot broadcast right
after checkpoint load. Runs are only registered during batch collection
(packer.discover_runs), so discover run 0 first (mirroring optim.py's
wait-for-run-0 pattern) to populate used_idxs before broadcasting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(resume): broadcast startup weights on the first step (fresh or resume)

Address review: instead of a resume-only pre-loop broadcast, always sync
inference to the incoming policy on the first training step.

- trainer: broadcast v{step-1} at the top of the loop's first iteration
  (fresh -> v0, resume -> v{checkpoint_step}), replacing the pre-loop block.
- orchestrator: always pause + sync inference at startup (previously
  resume-only), so it rendezvouses with the trainer's first-step broadcast
  in both cases and startup is symmetric.
- factor the "wait for run 0 to be discovered" loop into
  MultiRunManager.wait_for_run(); reuse it in optim.py (dedupes the
  copy that lived there) and the first-step broadcast.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(orchestrator): wait for startup broadcast on fresh start

The unconditional startup weight sync fell back to wait_timeout=None when
there was no ckpt block (from-scratch run). With filesystem weight broadcast
(check_exists=True), get_weight_dir then raised FileNotFoundError immediately
instead of waiting for the trainer to write broadcasts/step_0/STABLE.

Fall back to a default timeout so the orchestrator waits for the trainer's
startup broadcast, which is always coming.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(config): reject NCCL weight broadcast with LoRA

LoRA adapters are transferred via the filesystem (loaded from disk by the
inference servers); NCCL broadcast only writes a STABLE marker. The now
unconditional startup weight sync makes a fresh LoRA + NCCL run try to load an
adapter from a disk path NCCL never populates, hanging/failing during setup
(and LoRA over NCCL is broken for training-time updates too).

The auto weight-broadcast setup already falls back to filesystem for LoRA when
unset; enforce the same invariant for an explicitly configured NCCL broadcast
instead of failing at runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 17:00:52 -07:00
20 changed files with 360 additions and 102 deletions
@@ -22,7 +22,7 @@ max_completion_tokens = 64
[[orchestrator.train.env]]
name = "color-codeword"
taskset = { id = "color-codeword-v1", images_per_turn = 1, num_examples = 1000 }
taskset = { id = "color-codeword-v1", images_per_turn = 1 }
harness = { id = "null", runtime = { type = "subprocess" } }
[trainer]
+1 -1
View File
@@ -41,7 +41,7 @@ max_completion_tokens = 64
[[orchestrator.train.env]]
name = "color-codeword"
taskset = { id = "color-codeword-v1", images_per_turn = 1, num_examples = 1000 }
taskset = { id = "color-codeword-v1", images_per_turn = 1 }
harness = { id = "null", runtime = { type = "subprocess" } }
# Default renderer (AutoRendererConfig) resolves Qwen3-VL-4B-Instruct from
+1 -1
@@ -347,6 +347,14 @@ class RLConfig(BaseConfig):
self.weight_broadcast = SharedWeightBroadcastConfig(type="filesystem")
else:
self.weight_broadcast = SharedWeightBroadcastConfig()
if self.weight_broadcast.type == "nccl" and self.trainer.model.lora is not None:
# LoRA adapters are transferred via the filesystem (loaded from disk by the inference
# servers); NCCL broadcast only writes a STABLE marker, so LoRA over NCCL cannot transfer
# an adapter and would hang/fail on the startup weight sync.
raise ValueError(
"LoRA training is not yet supported with NCCL weight broadcast. "
"Set weight_broadcast.type = 'filesystem'."
)
if self.weight_broadcast.type == "nccl":
inference_world_size = self.inference.parallel.dp * self.inference.parallel.tp if self.inference else 1
self.trainer.weight_broadcast = TrainerNCCLWeightBroadcastConfig(
@@ -117,6 +117,9 @@ class DebugModelConfig(BaseConfig):
class ModelConfig(BaseModelConfig):
conversion_dir: Path | None = None
"""Directory for the auto-converted weights (written to a `prime`/`hf` subdirectory). If not set, we write into the model snapshot directory."""
seq_len: int = 2048
"""Sequence length the model is trained on."""
+11 -5
View File
@@ -1,6 +1,6 @@
[project]
name = "prime-rl"
version = "0.6.0"
version = "0.7.0"
description = "Async RL Training at Scale"
readme = "README.md"
requires-python = "~=3.12.0"
@@ -68,10 +68,10 @@ flash-attn-cute = [
]
disagg = [
"deep-ep ; platform_machine == 'x86_64'",
"deep-gemm ; platform_machine == 'x86_64'",
"deep-gemm",
"nixl",
"nixl-cu12 ; platform_machine == 'x86_64'",
"vllm-router ; platform_machine == 'x86_64'",
"vllm-router",
]
gpt-oss = [
"kernels",
@@ -195,13 +195,19 @@ torchaudio = { index = "pytorch-cu128" }
torchtitan = { git = "https://github.com/pytorch/torchtitan", rev = "23e4dfc" }
dion = { git = "https://github.com/samsja/dion.git", rev = "d891eeb" }
flash-attn-4 = { git = "https://github.com/Dao-AILab/flash-attention.git", subdirectory = "flash_attn/cute", rev = "96bd151" }
vllm-router = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }
vllm-router = [
{ url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl", marker = "platform_machine == 'x86_64'" },
{ url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl", marker = "platform_machine == 'aarch64'" },
]
vllm = [
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.24.0/vllm-0.24.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl", marker = "platform_machine == 'x86_64'" },
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.24.0/vllm-0.24.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl", marker = "platform_machine == 'aarch64'" },
]
deep-ep = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_ep-1.2.1+29d31c0-cp312-cp312-linux_x86_64.whl" }
deep-gemm = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }
deep-gemm = [
{ url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl", marker = "platform_machine == 'x86_64'" },
{ url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl", marker = "platform_machine == 'aarch64'" },
]
nixl-cu12 = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/nixl_cu12-0.10.1-cp312-cp312-linux_x86_64.whl" }
flash-linear-attention = { git = "https://github.com/fla-org/flash-linear-attention" }
flash_attn_3 = { index = "pytorch-cu128-test" }
-6
View File
@@ -43,12 +43,6 @@ CUDA_HOME=/usr/local/cuda uv pip install mamba-ssm
Requires `nvcc`. Without `mamba-ssm`, NemotronH falls back to HF's pure-PyTorch SSD path, which computes softplus in bf16 and yields ~0.4 KL divergence vs vLLM. Do **not** install `causal-conv1d` unless your GPU arch matches the prebuilt kernels — the code falls back to `nn.Conv1d` when it's absent.
### FP8 inference (GLM-5-FP8, etc.)
```bash
uv sync --group fp8-inference # installs the prebuilt deep-gemm wheel
```
### Trainer DeepEP backend
`scripts/install_ep_kernels.sh` auto-detects the CUDA toolkit matching torch and the GPU arch, builds NVSHMEM + DeepEP from source, and skips if `deep_ep` already imports.
+10 -5
View File
@@ -83,7 +83,8 @@ class Env:
def __init__(self, config: EnvConfig):
self.config = config
self.sampling_args: dict = {}
self.num_tasks: int = 0
self.num_tasks: int | None = 0
"""Task count reported by the server; ``None`` means the taskset is infinite."""
self.requires_group_scoring: bool = False
self._env_client: EnvClient | None = None
self._env_server_process: BaseProcess | None = None
@@ -112,9 +113,8 @@ class Env:
info = await self.env_client.info()
self.num_tasks = info.num_tasks
self.requires_group_scoring = info.requires_group_scoring
get_logger().info(
f"Env {self.name} ready: num_tasks={self.num_tasks} group_scoring={self.requires_group_scoring}"
)
num_tasks = self.num_tasks if self.num_tasks is not None else "infinite"
get_logger().info(f"Env {self.name} ready: num_tasks={num_tasks} group_scoring={self.requires_group_scoring}")
async def _spawn(self, log_dir: Path, log_level: str, json_logging: bool) -> str:
"""Spawn a v1 EnvServer child process (it loads the env; we never do).
@@ -220,7 +220,12 @@ class EvalEnv(Env):
async def start(self, log_dir: Path, log_level: str | None = None, json_logging: bool = False) -> None:
await super().start(log_dir=log_dir, log_level=log_level, json_logging=json_logging)
n = self.num_tasks if self.config.num_examples < 0 else min(self.config.num_examples, self.num_tasks)
if self.num_tasks is None:
if self.config.num_examples < 0:
raise ValueError(f"Eval env {self.name} has an infinite taskset — set num_examples to bound it")
n = self.config.num_examples
else:
n = self.num_tasks if self.config.num_examples < 0 else min(self.config.num_examples, self.num_tasks)
self.examples = [{"task_idx": i} for i in range(n)]
+25 -10
View File
@@ -101,6 +101,11 @@ MAX_CONSECUTIVE_EMPTY_BATCHES = 10
# resumed when the watcher advances ``policy.version``.
TARGET_LAG = 1
# Default wait for the trainer's startup weight broadcast when no ckpt block
# configures ``wait_for_weights_timeout`` (e.g. a from-scratch run). The
# broadcast is always coming, so wait rather than fail immediately.
STARTUP_WEIGHT_WAIT_TIMEOUT_S = 1200
class Orchestrator:
# Set in ``__init__``
@@ -315,19 +320,29 @@ class Orchestrator:
# trainer even when ``ckpt.skip_progress`` left the counter unrestored.
self.progress.step = self.resume_step + 1
get_logger().info(f"Resuming orchestrator from checkpoint step {self.resume_step}")
check_exists = config.weight_broadcast.type != "nccl"
wait_timeout = config.ckpt.wait_for_weights_timeout if config.ckpt else None
weights_path = get_weight_dir(
config.output_dir, self.resume_step, check_exists=check_exists, wait_timeout=wait_timeout
)
await self.policy_inference.update_weights(weights_path, lora_name=self.lora_name, step=self.resume_step)
if self.lora_name is not None:
self.policy_inference.update_model_name(self.lora_name)
self.policy.model_name = self.lora_name
self.policy.version = self.resume_step
else:
get_logger().info("Training from scratch")
# Sync inference to the incoming policy before the first step, whether fresh (v0 = base) or
# resumed (v{resume_step}). This pauses inference and rendezvouses with the trainer's
# first-step broadcast (train.py), so inference serves the correct policy from step 1. Keeping
# it unconditional makes trainer/orchestrator startup symmetric and avoids the resume deadlock
# where inference waited for weights the trainer only sent at the end of a step.
sync_version = self.resume_step if self.resume_step is not None else 0
check_exists = config.weight_broadcast.type != "nccl"
# Wait for the trainer's startup broadcast to land. On a fresh start there is no ckpt block,
# so fall back to a default timeout instead of not waiting at all (which would raise before
# broadcasts/step_0/STABLE is written when using filesystem weight broadcast).
wait_timeout = config.ckpt.wait_for_weights_timeout if config.ckpt else STARTUP_WEIGHT_WAIT_TIMEOUT_S
weights_path = get_weight_dir(
config.output_dir, sync_version, check_exists=check_exists, wait_timeout=wait_timeout
)
await self.policy_inference.update_weights(weights_path, lora_name=self.lora_name, step=sync_version)
if self.lora_name is not None:
self.policy_inference.update_model_name(self.lora_name)
self.policy.model_name = self.lora_name
self.policy.version = sync_version
self.train_source = TrainSource(self.train_envs, seed=42)
self.eval_source: EvalSource | None = (
EvalSource(
+17 -6
View File
@@ -1,7 +1,10 @@
"""TrainSource: weighted round-robin across train envs, infinite pull.
Weights are each env's configured ``ratio`` (default 1, i.e. equal weight
per env). ``next_example`` reshuffles on cursor exhaustion."""
per env). A finite env serves a shuffled task-index table, reshuffled on
cursor exhaustion; an infinite env (``num_tasks is None``) streams a
monotonic ``task_idx`` — the server generates tasks on demand, so every
pull is a fresh task and there are no epochs to shuffle."""
from __future__ import annotations
@@ -22,17 +25,22 @@ class TrainSource:
if not self.envs:
raise ValueError("TrainSource needs at least one train env")
self.examples: dict[str, list[dict]] = {}
# A finite env's shuffled index table; ``None`` for an infinite env,
# whose cursor alone is the (monotonic) task_idx stream.
self.examples: dict[str, list[dict] | None] = {}
self.cursors: dict[str, int] = {}
# Group-scoring envs reserve ``group_size`` permits up front;
# per-rollout envs need 1
self.env_costs: dict[str, int] = {}
for env in self.envs:
# The orchestrator never loads the env: sample over the task-index
# range the server reported via info() (num_tasks).
rows: list[dict] = [{"task_idx": i, "env_name": env.name} for i in range(env.num_tasks)]
self.rng.shuffle(rows)
self.examples[env.name] = rows
# range the server reported via info() (num_tasks; None = infinite).
if env.num_tasks is None:
self.examples[env.name] = None
else:
rows: list[dict] = [{"task_idx": i, "env_name": env.name} for i in range(env.num_tasks)]
self.rng.shuffle(rows)
self.examples[env.name] = rows
self.cursors[env.name] = 0
self.env_costs[env.name] = env.config.group_size if env.requires_group_scoring else 1
@@ -45,6 +53,9 @@ class TrainSource:
return None
rows = self.examples[env_name]
cursor = self.cursors[env_name]
if rows is None: # infinite env: the cursor is the task_idx
self.cursors[env_name] = cursor + 1
return {"task_idx": cursor, "env_name": env_name}
if cursor >= len(rows):
self.rng.shuffle(rows)
cursor = 0
+7 -5
View File
@@ -834,19 +834,21 @@ def load_dcp_from_hf(model: nn.Module, config: ModelConfig, parallel_dims: Paral
# All ranks read just the key names (cheap) to determine the path independently.
# Only master loads the full state dict when conversion is actually needed.
if isinstance(model, PreTrainedModelPrimeRL):
snapshot_keys = dict.fromkeys(load_state_dict_keys(snapshot_path))
source_path = snapshot_path
convert_dir = config.conversion_dir or source_path
snapshot_keys = dict.fromkeys(load_state_dict_keys(source_path))
model_keys = dict.fromkeys(model.state_dict().keys())
if model.is_hf_state_dict(snapshot_keys) and model.is_prime_state_dict(model_keys):
logger.warning(
"Found HF weight format in snapshot state dict and PrimeRL weight format in model state dict. Trying to auto-convert..."
)
snapshot_path = snapshot_path / "prime"
snapshot_path = convert_dir / "prime"
if not snapshot_path.exists() and get_world().is_master:
logger.debug(
f"Converting snapshot state dict to PrimeRL format and saving to {snapshot_path} on master rank. This is a one-time operation."
)
snapshot_state_dict = load_state_dict(snapshot_path.parent)
snapshot_state_dict = load_state_dict(source_path)
model.convert_to_prime(snapshot_state_dict)
save_state_dict(snapshot_state_dict, snapshot_path)
del snapshot_state_dict
@@ -855,12 +857,12 @@ def load_dcp_from_hf(model: nn.Module, config: ModelConfig, parallel_dims: Paral
logger.warning(
"Found PrimeRL weight format in snapshot state dict and HF weight format in model state dict. Trying to auto-convert..."
)
snapshot_path = snapshot_path / "hf"
snapshot_path = convert_dir / "hf"
if not snapshot_path.exists() and get_world().is_master:
logger.debug(
f"Converting snapshot state dict to HF format and saving to {snapshot_path} on master rank. This is a one-time operation."
)
snapshot_state_dict = load_state_dict(snapshot_path.parent)
snapshot_state_dict = load_state_dict(source_path)
model.convert_to_hf(snapshot_state_dict)
save_state_dict(snapshot_state_dict, snapshot_path)
del snapshot_state_dict
@@ -249,7 +249,7 @@ def _grouped_per_token_fp8_kernel(
@triton.jit
def _grouped_per_channel_fp8_sm90_kmajor_kernel(
def _grouped_per_channel_fp8_kernel(
x_ptr,
block_to_group_ptr,
starts_ptr,
@@ -264,6 +264,7 @@ def _grouped_per_channel_fp8_sm90_kmajor_kernel(
stride_sf0,
stride_sf1,
USE_UE8M0: tl.constexpr,
K_MAJOR: tl.constexpr,
BLOCK_K: tl.constexpr,
BLOCK_N: tl.constexpr,
):
@@ -293,8 +294,20 @@ def _grouped_per_channel_fp8_sm90_kmajor_kernel(
scale = tl.exp2(tl.ceil(tl.log2(scale)))
y = x / scale[None, :]
flat_base = block_start.to(tl.int64) * BLOCK_K * cols
out_ptrs = out_ptr + flat_base + col_offsets_i64[:, None] * aligned_m + row_offsets_i64[None, :]
tl.store(out_ptrs, tl.trans(y).to(tl.float8e4nv), mask=valid_cols[:, None] & (row_offsets[None, :] < aligned_m))
if K_MAJOR:
out_ptrs = out_ptr + flat_base + col_offsets_i64[:, None] * aligned_m + row_offsets_i64[None, :]
tl.store(
out_ptrs,
tl.trans(y).to(tl.float8e4nv),
mask=valid_cols[:, None] & (row_offsets[None, :] < aligned_m),
)
else:
out_ptrs = out_ptr + flat_base + row_offsets_i64[:, None] * cols + col_offsets_i64[None, :]
tl.store(
out_ptrs,
y.to(tl.float8e4nv),
mask=(row_offsets[:, None] < aligned_m) & valid_cols[None, :],
)
tl.store(
sf_ptr + pid_blk * stride_sf0 + col_offsets_i64 * stride_sf1,
scale,
@@ -477,7 +490,7 @@ def grouped_per_channel_cast_to_fp8_sm90_kmajor_triton(
if block_to_group.numel() == 0:
return out, sf.T
grid = (block_to_group.numel(), ceil_div(x.size(1), 128))
_grouped_per_channel_fp8_sm90_kmajor_kernel[grid](
_grouped_per_channel_fp8_kernel[grid](
x,
block_to_group,
starts_tensor,
@@ -492,6 +505,7 @@ def grouped_per_channel_cast_to_fp8_sm90_kmajor_triton(
sf.stride(0),
sf.stride(1),
USE_UE8M0=use_ue8m0,
K_MAJOR=True,
BLOCK_K=gran_k,
BLOCK_N=128,
num_warps=4,
@@ -499,6 +513,48 @@ def grouped_per_channel_cast_to_fp8_sm90_kmajor_triton(
return out, sf.T
def grouped_per_channel_cast_to_fp8_rowmajor_triton(
x: torch.Tensor,
padded_total_m: int,
block_to_group: torch.Tensor,
starts_tensor: torch.Tensor,
actual_ms_tensor: torch.Tensor,
ks_tensor: torch.Tensor,
block_starts_tensor: torch.Tensor,
use_ue8m0: bool,
gran_k: int = GROUP_ALIGNMENT,
) -> Tuple[torch.Tensor, torch.Tensor]:
assert x.dim() == 2
assert gran_k == GROUP_ALIGNMENT
out = torch.empty((padded_total_m, x.size(1)), device=x.device, dtype=torch.float8_e4m3fn)
total_blocks = padded_total_m // gran_k
sf = torch.empty((total_blocks, x.size(1)), device=x.device, dtype=torch.float32)
if block_to_group.numel() == 0:
return out, sf
grid = (block_to_group.numel(), ceil_div(x.size(1), 128))
_grouped_per_channel_fp8_kernel[grid](
x,
block_to_group,
starts_tensor,
actual_ms_tensor,
ks_tensor,
block_starts_tensor,
out,
sf,
x.size(1),
x.stride(0),
x.stride(1),
sf.stride(0),
sf.stride(1),
USE_UE8M0=use_ue8m0,
K_MAJOR=False,
BLOCK_K=gran_k,
BLOCK_N=128,
num_warps=4,
)
return out, sf
def grouped_per_block_cast_to_fp8_triton(
x: torch.Tensor, use_ue8m0: bool, gran_k: int = GROUP_ALIGNMENT
) -> Tuple[torch.Tensor, torch.Tensor]:
@@ -1,17 +1,19 @@
from __future__ import annotations
import torch
try:
import deep_gemm
except ImportError:
deep_gemm = None # CPU-only environments don't ship deep_gemm; FP8 paths
# are GPU-only at runtime, so leaving the symbol None is safe — only the
# autograd Function bodies below actually call into it.
import torch
from prime_rl.trainer.models.kernels.fp8_utils import (
GROUP_ALIGNMENT,
build_grouped_layout,
grouped_per_block_cast_to_fp8_triton,
grouped_per_channel_cast_to_fp8_rowmajor_triton,
grouped_per_channel_cast_to_fp8_sm90_kmajor_triton,
grouped_per_token_cast_to_fp8_triton,
unpack_rows_triton,
@@ -30,32 +32,60 @@ def _compute_grad_weight(
block_starts_tensor: torch.Tensor,
aligned_ms: list[int],
) -> torch.Tensor:
x_k_major = grouped_per_channel_cast_to_fp8_sm90_kmajor_triton(
x,
padded_total_m,
block_to_group,
starts_tensor,
actual_ms_tensor,
ks_tensor,
block_starts_tensor,
False,
GROUP_ALIGNMENT,
)
dy_k_major = grouped_per_channel_cast_to_fp8_sm90_kmajor_triton(
grad_output,
padded_total_m,
block_to_group,
starts_tensor,
actual_ms_tensor,
ks_tensor,
block_starts_tensor,
False,
GROUP_ALIGNMENT,
)
is_sm100 = torch.cuda.get_device_capability(x.device)[0] >= 10
if is_sm100:
x_fp8 = grouped_per_channel_cast_to_fp8_rowmajor_triton(
x,
padded_total_m,
block_to_group,
starts_tensor,
actual_ms_tensor,
ks_tensor,
block_starts_tensor,
True,
GROUP_ALIGNMENT,
)
dy_fp8 = grouped_per_channel_cast_to_fp8_rowmajor_triton(
grad_output,
padded_total_m,
block_to_group,
starts_tensor,
actual_ms_tensor,
ks_tensor,
block_starts_tensor,
True,
GROUP_ALIGNMENT,
)
grouped_weight_grad = deep_gemm.k_grouped_fp8_gemm_tn_contiguous
else:
x_fp8 = grouped_per_channel_cast_to_fp8_sm90_kmajor_triton(
x,
padded_total_m,
block_to_group,
starts_tensor,
actual_ms_tensor,
ks_tensor,
block_starts_tensor,
True,
GROUP_ALIGNMENT,
)
dy_fp8 = grouped_per_channel_cast_to_fp8_sm90_kmajor_triton(
grad_output,
padded_total_m,
block_to_group,
starts_tensor,
actual_ms_tensor,
ks_tensor,
block_starts_tensor,
True,
GROUP_ALIGNMENT,
)
grouped_weight_grad = deep_gemm.k_grouped_fp8_gemm_nt_contiguous
grad_weight = torch.zeros(weight_shape, device=x.device, dtype=torch.float32)
deep_gemm.k_grouped_fp8_gemm_nt_contiguous(
x_k_major,
dy_k_major,
grouped_weight_grad(
x_fp8,
dy_fp8,
grad_weight,
aligned_ms,
ks_tensor,
@@ -90,12 +120,12 @@ class _GroupedFP8Gemm(torch.autograd.Function):
starts_tensor,
actual_ms_tensor,
block_starts_tensor,
False,
True,
GROUP_ALIGNMENT,
)
weight_fp8 = grouped_per_block_cast_to_fp8_triton(
weight.transpose(1, 2),
False,
True,
GROUP_ALIGNMENT,
)
@@ -174,12 +204,12 @@ class _GroupedFP8Gemm(torch.autograd.Function):
starts_tensor,
actual_ms_tensor,
block_starts_tensor,
False,
True,
GROUP_ALIGNMENT,
)
weight_dx_fp8 = grouped_per_block_cast_to_fp8_triton(
weight,
False,
True,
GROUP_ALIGNMENT,
)
grad_x_padded = torch.empty(
@@ -2,14 +2,15 @@ from __future__ import annotations
import re
import torch
from torch import nn
try:
import deep_gemm
except ImportError:
deep_gemm = None # CPU-only environments don't ship deep_gemm; FP8 paths
# are GPU-only at runtime, so leaving the symbol None is safe — only the
# autograd Function bodies below actually call into it.
import torch
from torch import nn
from prime_rl.trainer.models.kernels.fp8_utils import (
per_block_cast_to_fp8_tp_triton,
@@ -25,8 +26,8 @@ class _FP8BlockwiseMM(torch.autograd.Function):
def forward(ctx, x, weight, block_size, out_dtype=torch.bfloat16):
x_shape = x.shape
x_2d = x.reshape(-1, x_shape[-1]).contiguous()
x_fp8 = per_token_cast_to_fp8_triton(x_2d, False, block_size)
weight_fp8 = per_block_cast_to_fp8_triton(weight, False, block_size)
x_fp8 = per_token_cast_to_fp8_triton(x_2d, True, block_size)
weight_fp8 = per_block_cast_to_fp8_triton(weight, True, block_size)
out = torch.empty((x_2d.size(0), weight.size(0)), device=x.device, dtype=out_dtype)
deep_gemm.fp8_gemm_nt(x_fp8, weight_fp8, out)
@@ -44,8 +45,8 @@ class _FP8BlockwiseMM(torch.autograd.Function):
grad_x = grad_weight = None
if ctx.needs_input_grad[0]:
grad_output_fp8 = per_token_cast_to_fp8_triton(grad_output_2d, False, block_size)
weight_dx_fp8 = per_block_cast_to_fp8_tp_triton(weight, False, block_size)
grad_output_fp8 = per_token_cast_to_fp8_triton(grad_output_2d, True, block_size)
weight_dx_fp8 = per_block_cast_to_fp8_tp_triton(weight, True, block_size)
grad_x_2d = torch.empty_like(x_2d)
deep_gemm.fp8_gemm_nt(grad_output_fp8, weight_dx_fp8, grad_x_2d)
grad_x = grad_x_2d.reshape(ctx.x_shape)
@@ -63,8 +64,8 @@ class _FP8BlockwiseMM(torch.autograd.Function):
else:
grad_output_2d_padded = grad_output_2d
x_2d_padded = x_2d
grad_output_t_fp8 = per_token_cast_to_fp8_tp_triton(grad_output_2d_padded, False, block_size)
x_t_fp8 = per_token_cast_to_fp8_tp_triton(x_2d_padded, False, block_size)
grad_output_t_fp8 = per_token_cast_to_fp8_tp_triton(grad_output_2d_padded, True, block_size)
x_t_fp8 = per_token_cast_to_fp8_tp_triton(x_2d_padded, True, block_size)
grad_weight_fp32 = torch.zeros_like(weight, dtype=torch.float32)
deep_gemm.fp8_gemm_nt(
grad_output_t_fp8,
@@ -82,7 +83,7 @@ class Float8BlockwiseLinear(nn.Linear):
"""nn.Linear replacement that uses FP8 blockwise matmul via DeepGEMM.
Requires:
- SM90 (Hopper) GPU
- SM90 (Hopper) or SM100 (Blackwell) GPU
- bfloat16 inputs/weights
- No bias
- in_features and out_features divisible by 128
@@ -238,8 +238,9 @@ class _SequenceChunkedLogProbEntropyFn(torch.autograd.Function):
vocab = weight.shape[0]
vocab_chunk_size = min(vocab, 8192)
grad_hidden = torch.zeros_like(hidden)
grad_weight = torch.zeros_like(weight)
needs_hidden, needs_weight = ctx.needs_input_grad[0], ctx.needs_input_grad[1]
grad_hidden = torch.zeros_like(hidden) if needs_hidden else None
grad_weight = torch.zeros_like(weight) if needs_weight else None
for start in range(0, n, chunk_size):
end = min(start + chunk_size, n)
@@ -263,8 +264,10 @@ class _SequenceChunkedLogProbEntropyFn(torch.autograd.Function):
grad_logits[mask, idx] += grad_chunk[mask]
grad_logits = grad_logits * inv_t_chunk
grad_hidden[start:end].add_(grad_logits.to(hidden.dtype) @ weight_chunk)
grad_weight[vocab_start:vocab_end].add_(grad_logits.to(weight.dtype).t() @ hidden_chunk)
if needs_hidden:
grad_hidden[start:end].add_(grad_logits.to(hidden.dtype) @ weight_chunk)
if needs_weight:
grad_weight[vocab_start:vocab_end].add_(grad_logits.to(weight.dtype).t() @ hidden_chunk)
return grad_hidden, grad_weight, None, None, None
+1 -10
View File
@@ -1,5 +1,4 @@
import copy
import time
from typing import Callable
import torch
@@ -12,7 +11,6 @@ from prime_rl.configs.trainer import OptimizerConfig
from prime_rl.trainer.parallel_dims import ParallelDims
from prime_rl.trainer.runs import get_multi_run_manager
from prime_rl.trainer.sign_sgd import SignSGD
from prime_rl.trainer.world import get_world
from prime_rl.utils.logger import get_logger
@@ -121,14 +119,7 @@ def setup_optimizer(
# Wait for run 0 to be created in the multi run manager
# Otherwise, the creation will reset the parameters
multi_run_manager = get_multi_run_manager()
world = get_world()
logger = get_logger()
while 0 not in multi_run_manager.idx_2_id:
if world.is_master:
multi_run_manager.discover_runs()
multi_run_manager.synchronize_state()
logger.info(f"Waiting for run 0 to be created {multi_run_manager.id_2_idx=}")
time.sleep(1)
multi_run_manager.wait_for_run(0)
named_params = multi_run_manager.get_named_parameters_for_run(0)
optimizer = _create_optimizer(config, named_params, parallel_dims)
+13
View File
@@ -255,6 +255,7 @@ def train(config: TrainerConfig):
logger.info(f"Tracing to {config.trace_path}")
prof = profile(activities=[ProfilerActivity.CPU, ProfilerActivity.CUDA], record_shapes=True).__enter__()
maybe_record_function = record_function
start_step = progress.step
while True:
# Reset peak memory stats
torch.cuda.reset_peak_memory_stats()
@@ -265,6 +266,18 @@ def train(config: TrainerConfig):
logger.debug(f"Starting training step {progress.step}")
step_start_time = time.perf_counter()
# Broadcast the incoming policy (v{progress.step-1}) before waiting for its rollouts. #2896
# broadcasts at the END of a step, so the first step would otherwise block on rollouts the
# inference engines cannot produce until they receive v{progress.step-1} (the orchestrator
# pauses inference at startup to sync it). This happens whether resuming (v{checkpoint_step})
# or starting fresh (v0), keeping trainer and orchestrator startup symmetric.
if progress.step == start_step and weight_broadcast is not None:
logger.info(f"Broadcasting startup policy weights (v{progress.step - 1}) to inference engines")
multi_run_manager.wait_for_run(0)
for idx in multi_run_manager.used_idxs:
multi_run_manager.ready_to_update[idx] = True
weight_broadcast.broadcast_weights(model, step=progress.step - 1)
# Wait for the batch to be available
logger.debug("Waiting for training batch to arrive")
wait_for_batch_start_time = time.perf_counter()
+15
View File
@@ -1,4 +1,5 @@
import pickle
import time
from dataclasses import dataclass
from pathlib import Path
from typing import TYPE_CHECKING, Callable, Optional
@@ -463,6 +464,20 @@ class MultiRunManager:
# Properties and Accessors
# =========================================================================
def wait_for_run(self, idx: int = 0, poll_interval: float = 1.0) -> None:
"""Block until run ``idx`` is registered. Master discovers from disk; all ranks synchronize.
Runs are otherwise only discovered during batch collection (``packer.discover_runs``), so
callers that need a run before the first batch (optimizer setup, first-step weight sync)
use this to populate ``idx_2_id``/``used_idxs``.
"""
while idx not in self.idx_2_id:
if self.world.is_master:
self.discover_runs()
self.synchronize_state()
self.logger.info(f"Waiting for run {idx} to be created ({self.id_2_idx=})")
time.sleep(poll_interval)
@property
def used_idxs(self):
return sorted(self.idx_2_id.keys())
+28
View File
@@ -61,6 +61,34 @@ def test_fused_lm_head_matches_full_logits_forward_and_backward_cpu():
torch.testing.assert_close(grad_weight1, grad_weight0, rtol=0, atol=1e-5)
def test_fused_lm_head_frozen_weight_backward_cpu():
"""Frozen LM-head weight: hidden gradient matches baseline, no weight gradient is produced."""
torch.manual_seed(0)
b, s, h, v = 2, 4, 8, 37
temperature = torch.full((b, s), 1.7, dtype=torch.float32)
chunk_size = 3
hidden0 = torch.randn(b, s, h, dtype=torch.float32, requires_grad=True)
labels = torch.randint(0, v, (b, s), dtype=torch.long)
weight0 = torch.randn(v, h, dtype=torch.float32)
# Baseline (weight frozen)
logp0, _ = _baseline_logprobs_and_entropy(hidden0, weight0, labels, temperature=temperature)
logp0.sum().backward()
grad_hidden0 = hidden0.grad.detach().clone()
# Fused (weight frozen)
hidden1 = hidden0.detach().clone().requires_grad_(True)
lm = FusedOutputLinear(in_features=h, out_features=v, chunk_size=chunk_size)
lm.weight = torch.nn.Parameter(weight0.clone(), requires_grad=False)
out = lm(hidden1, labels, temperature=temperature)
out["logprobs"].sum().backward()
torch.testing.assert_close(hidden1.grad, grad_hidden0, rtol=0, atol=1e-5)
assert lm.weight.grad is None
def test_fused_lm_head_requires_labels():
"""Test that FusedOutputLinear raises assertion error when labels is None."""
torch.manual_seed(0)
Generated
+82 -5
View File
@@ -81,6 +81,7 @@ members = [
"mcp-atlas-v1",
"mmlu-pro-v1",
"mmmu",
"mmmu-v1",
"mrcr-v2-v1",
"multiswe-v1",
"nl2repobench-v1",
@@ -1299,10 +1300,24 @@ wheels = [
{ url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_ep-1.2.1+29d31c0-cp312-cp312-linux_x86_64.whl", hash = "sha256:a52b709d62c4dfc46a018b988724a7c10894125091aef596bf6d68e94c2b564e" },
]
[[package]]
name = "deep-gemm"
version = "2.5.0+891d57b"
source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" }
resolution-markers = [
"platform_machine == 'aarch64' and sys_platform == 'linux'",
]
wheels = [
{ url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl", hash = "sha256:a1cbc53414e26b70f9e283e4d57bbe48ba2a3ec84254a72052af8e06f6d0fb1a" },
]
[[package]]
name = "deep-gemm"
version = "2.5.0+891d57b"
source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }
resolution-markers = [
"platform_machine == 'x86_64' and sys_platform == 'linux'",
]
wheels = [
{ url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl", hash = "sha256:3a9e4472b86e8e7e2c77cc76951c886bbe7a23a1f5908958969ab5b9c707a2f3" },
]
@@ -3514,6 +3529,23 @@ requires-dist = [
{ name = "verifiers", specifier = ">=0.1.4" },
]
[[package]]
name = "mmmu-v1"
version = "0.1.0"
source = { editable = "deps/verifiers/environments/mmmu_v1" }
dependencies = [
{ name = "datasets" },
{ name = "pillow" },
{ name = "verifiers" },
]
[package.metadata]
requires-dist = [
{ name = "datasets" },
{ name = "pillow" },
{ name = "verifiers" },
]
[[package]]
name = "modal"
version = "1.5.1"
@@ -4798,7 +4830,7 @@ dev = [
[[package]]
name = "prime-rl"
version = "0.6.0"
version = "0.7.0"
source = { editable = "." }
dependencies = [
{ name = "aiolimiter" },
@@ -4845,21 +4877,25 @@ dependencies = [
[package.optional-dependencies]
all = [
{ name = "deep-ep", marker = "platform_machine == 'x86_64'" },
{ name = "deep-gemm", marker = "platform_machine == 'x86_64'" },
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
{ name = "flash-attn", marker = "platform_machine == 'x86_64'" },
{ name = "flash-attn-3" },
{ name = "flash-attn-4" },
{ name = "nixl" },
{ name = "nixl-cu12", version = "0.10.1", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/nixl_cu12-0.10.1-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
{ name = "quack-kernels" },
{ name = "vllm-router", marker = "platform_machine == 'x86_64'" },
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
]
disagg = [
{ name = "deep-ep", marker = "platform_machine == 'x86_64'" },
{ name = "deep-gemm", marker = "platform_machine == 'x86_64'" },
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
{ name = "deep-gemm", version = "2.5.0+891d57b", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
{ name = "nixl" },
{ name = "nixl-cu12", version = "0.10.1", source = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/nixl_cu12-0.10.1-cp312-cp312-linux_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
{ name = "vllm-router", marker = "platform_machine == 'x86_64'" },
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
{ name = "vllm-router", version = "0.1.26", source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64'" },
]
flash-attn = [
{ name = "flash-attn", marker = "platform_machine == 'x86_64'" },
@@ -4899,6 +4935,8 @@ requires-dist = [
{ name = "beartype", specifier = ">=0.21.0" },
{ name = "datasets", specifier = ">=4.0.0" },
{ name = "deep-ep", marker = "platform_machine == 'x86_64' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_ep-1.2.1+29d31c0-cp312-cp312-linux_x86_64.whl" },
{ name = "deep-gemm", marker = "platform_machine == 'aarch64' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_aarch64.whl" },
{ name = "deep-gemm", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'disagg'" },
{ name = "deep-gemm", marker = "platform_machine == 'x86_64' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" },
{ name = "dion", git = "https://github.com/samsja/dion.git?rev=d891eeb" },
{ name = "flash-attn", marker = "platform_machine == 'x86_64' and extra == 'flash-attn'", url = "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.4/flash_attn-2.8.3+cu128torch2.11-cp312-cp312-linux_x86_64.whl" },
@@ -4949,6 +4987,8 @@ requires-dist = [
{ name = "vllm", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64'", specifier = ">=0.24.0" },
{ name = "vllm", marker = "platform_machine == 'aarch64'", url = "https://github.com/vllm-project/vllm/releases/download/v0.24.0/vllm-0.24.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl" },
{ name = "vllm", marker = "platform_machine == 'x86_64'", url = "https://github.com/vllm-project/vllm/releases/download/v0.24.0/vllm-0.24.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl" },
{ name = "vllm-router", marker = "platform_machine == 'aarch64' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" },
{ name = "vllm-router", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64' and extra == 'disagg'" },
{ name = "vllm-router", marker = "platform_machine == 'x86_64' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" },
{ name = "wandb", specifier = ">=0.26.1" },
{ name = "wandb-workspaces", specifier = ">=0.4.3" },
@@ -7521,6 +7561,7 @@ examples = [
{ name = "deepwiki-v1", editable = "deps/verifiers/environments/deepwiki_v1" },
{ name = "glossary-v1", editable = "deps/verifiers/environments/glossary_v1" },
{ name = "gsm8k-v1", editable = "deps/verifiers/environments/gsm8k_v1" },
{ name = "mmmu-v1", editable = "deps/verifiers/environments/mmmu_v1" },
{ name = "reverse-text-v1", editable = "deps/verifiers/environments/reverse_text_v1" },
{ name = "scratchpad-v1", editable = "deps/verifiers/environments/scratchpad_v1" },
{ name = "wiki-search-v1", editable = "deps/verifiers/environments/wiki_search_v1" },
@@ -7912,10 +7953,46 @@ requires-dist = [
]
provides-extras = ["zen", "bench", "tensorizer", "fastsafetensors", "instanttensor", "runai", "audio", "video", "flashinfer", "helion", "grpc", "otel", "extra-quant"]
[[package]]
name = "vllm-router"
version = "0.1.26"
source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl" }
resolution-markers = [
"platform_machine == 'aarch64' and sys_platform == 'linux'",
]
dependencies = [
{ name = "aiohttp" },
{ name = "fastapi" },
{ name = "orjson" },
{ name = "requests" },
{ name = "setproctitle" },
{ name = "uvicorn" },
]
wheels = [
{ url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:ab8d0da61faa588fd5a7ed947bd58ddb31f5836cf55518bdd0122cfbc83989f4" },
]
[package.metadata]
requires-dist = [
{ name = "aiohttp" },
{ name = "fastapi" },
{ name = "orjson" },
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0.0" },
{ name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.21.0" },
{ name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=4.0.0" },
{ name = "requests", specifier = ">=2.25.0" },
{ name = "setproctitle" },
{ name = "uvicorn" },
]
provides-extras = ["dev"]
[[package]]
name = "vllm-router"
version = "0.1.26"
source = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }
resolution-markers = [
"platform_machine == 'x86_64' and sys_platform == 'linux'",
]
dependencies = [
{ name = "aiohttp" },
{ name = "fastapi" },