Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ab5e04c4c | ||
|
|
d1046b876c | ||
|
|
381df0a658 | ||
|
|
532d622b4c | ||
|
|
ec92686fbc | ||
|
|
fb31b51e84 | ||
|
|
33b7d19cb1 | ||
|
|
56a9402953 | ||
|
|
0c0b92f99c | ||
|
|
84ce4d6677 | ||
|
|
01e959596a | ||
|
|
738eb5016a |
@@ -193,7 +193,11 @@ jobs:
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.cuda
|
||||
push: true
|
||||
# zstd compresses the multi-GB venv layers several times faster than gzip at a
|
||||
# comparable ratio. No `force-compression`, so base-image layers are reused as-is
|
||||
# rather than needlessly recompressed. Pulling zstd layers needs containerd >= 1.5
|
||||
# or Docker >= 23.
|
||||
outputs: type=image,push=true,compression=zstd,compression-level=3
|
||||
platforms: ${{ matrix.platform }}
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.prepare.outputs.tag }}-${{ matrix.suffix }}
|
||||
|
||||
+21
-7
@@ -1,3 +1,7 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# ^ `COPY --exclude` (used to split the venv into parallel-compressible layers) needs
|
||||
# Dockerfile syntax >= 1.19; `docker/dockerfile:1` resolves to the latest stable 1.x.
|
||||
|
||||
#inspired from https://github.com/astral-sh/uv-docker-example/blob/main/multistage.Dockerfile
|
||||
|
||||
# Build stage - multi-arch base (supports amd64 + arm64)
|
||||
@@ -128,11 +132,6 @@ RUN if [ "$INCLUDE_NIXL_FROM_SOURCE" = "1" ]; then \
|
||||
&& rm -rf /tmp/nixl /app/deps/nixl_cu12-*.whl; \
|
||||
fi
|
||||
|
||||
# arm64: build flash-attn from source, fix namespace conflicts, apply workarounds
|
||||
ARG TARGETARCH
|
||||
COPY scripts/docker-arm64-post-install.sh /app/scripts/docker-arm64-post-install.sh
|
||||
RUN if [ "$TARGETARCH" = "arm64" ]; then /app/scripts/docker-arm64-post-install.sh; fi
|
||||
|
||||
# Trim the CUDA toolkit to the nvcc-JIT essentials in a separate stage, so the runtime
|
||||
# COPY ships only the trimmed result (~1.5 GB) instead of the full ~6.6 GB. Drops the math
|
||||
# runtime libs (cublas/cusparse/cufft/cusolver/curand/npp/nvjpeg) and big static .a
|
||||
@@ -217,8 +216,23 @@ RUN INSTALLER_NO_MODIFY_PATH=1 UV_INSTALL_DIR="/usr/local/bin" sh /uv-installer.
|
||||
USER appuser
|
||||
ENV PATH="/usr/local/bin:$PATH"
|
||||
WORKDIR /app
|
||||
# Copy the application from the builder
|
||||
COPY --from=builder --chown=appuser:appuser /app /app
|
||||
# Copy the application from the builder, splitting the venv's largest trees into their
|
||||
# own layers. BuildKit compresses and pushes layers in parallel, so shipping the whole
|
||||
# ~20 GB venv as one layer serialized the export behind a single compressor. Splitting
|
||||
# also lets nodes pull the image in parallel. Keep the excludes below in sync with the
|
||||
# per-tree copies that follow, or the data lands in the image twice.
|
||||
COPY --from=builder --chown=appuser:appuser \
|
||||
--exclude=.venv/lib/python3.12/site-packages/nvidia \
|
||||
--exclude=.venv/lib/python3.12/site-packages/torch \
|
||||
--exclude=.venv/lib/python3.12/site-packages/vllm \
|
||||
--exclude=.venv/lib/python3.12/site-packages/flash_attn \
|
||||
--exclude=.venv/lib/python3.12/site-packages/flash_attn_2_cuda*.so \
|
||||
/app /app
|
||||
COPY --from=builder --chown=appuser:appuser /app/.venv/lib/python3.12/site-packages/nvidia /app/.venv/lib/python3.12/site-packages/nvidia
|
||||
COPY --from=builder --chown=appuser:appuser /app/.venv/lib/python3.12/site-packages/torch /app/.venv/lib/python3.12/site-packages/torch
|
||||
COPY --from=builder --chown=appuser:appuser /app/.venv/lib/python3.12/site-packages/vllm /app/.venv/lib/python3.12/site-packages/vllm
|
||||
COPY --from=builder --chown=appuser:appuser /app/.venv/lib/python3.12/site-packages/flash_attn /app/.venv/lib/python3.12/site-packages/flash_attn
|
||||
COPY --from=builder --chown=appuser:appuser /app/.venv/lib/python3.12/site-packages/flash_attn_2_cuda*.so /app/.venv/lib/python3.12/site-packages/
|
||||
COPY --from=builder /opt/ucx /opt/ucx
|
||||
|
||||
# Copy and set up entrypoint script
|
||||
|
||||
@@ -113,15 +113,6 @@ 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>`.
|
||||
|
||||
4.1. On aarch64 hosts: build flash-attn from source for your GPU
|
||||
|
||||
> *NOTE*: aarch64 has no prebuilt flash-attn wheel. This step compiles the CUDA extension for your local GPU (~20-30 minutes). Compute capability is auto-detected from `nvidia-smi`; override with `TORCH_CUDA_ARCH_LIST=9.0` (Hopper) / `10.0` (Blackwell) if needed.
|
||||
> *NOTE*: After this step, you can't run `uv sync --all-extras` or `uv run` as it will uninstall the package, you can avoid it by running `uv sync --inexact` or `uv run --no-sync`.
|
||||
|
||||
```bash
|
||||
bash scripts/docker-arm64-post-install.sh
|
||||
```
|
||||
|
||||
3.1. Optional: Install Flash Attention 3 (on Hopper GPUs only, for flash_attention_3 attention backend)
|
||||
|
||||
> *NOTE*: This step will take a while, as it builds the Flash Attention 3 extension from source, as it has no wheels prebuilt.
|
||||
@@ -166,7 +157,7 @@ uv run trainer @ configs/debug/fake/rl.toml
|
||||
5. Check that you can run the inference server (*this requires 1 GPU*)
|
||||
|
||||
```bash
|
||||
uv run inference --model.name Qwen/Qwen3-0.6B
|
||||
uv run inference --vllm.model Qwen/Qwen3-0.6B
|
||||
```
|
||||
|
||||
6. Check that the full RL stack (inference + orchestrator + trainer) runs end-to-end (*this requires 2 GPUs*)
|
||||
|
||||
@@ -36,10 +36,8 @@ type = "subprocess"
|
||||
[trainer.model]
|
||||
seq_len = 16384
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 8192
|
||||
|
||||
# Model not in MODEL_RENDERER_MAP — opt into DefaultRenderer (apply_chat_template).
|
||||
[orchestrator.renderer]
|
||||
name = "default"
|
||||
reasoning_parser = "think"
|
||||
|
||||
@@ -54,5 +54,5 @@ type = "subprocess"
|
||||
|
||||
[ckpt] # Checkpoint at the end of training
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
tool_call_parser = "hermes"
|
||||
|
||||
@@ -39,10 +39,12 @@ id = "null"
|
||||
type = "subprocess"
|
||||
|
||||
[inference]
|
||||
enable_lora = true
|
||||
gpu_memory_utilization = 0.7
|
||||
|
||||
# PrimeIntellect Qwen3 fine-tune - select its renderer explicitly (the -SFT
|
||||
# suffix misses the MODEL_RENDERER_MAP exact match).
|
||||
|
||||
[inference.vllm]
|
||||
enable_lora = true
|
||||
gpu_memory_utilization = 0.7
|
||||
[orchestrator.renderer]
|
||||
name = "prime-qwen3"
|
||||
|
||||
@@ -38,10 +38,12 @@ id = "null"
|
||||
type = "subprocess"
|
||||
|
||||
[inference]
|
||||
enable_lora = true
|
||||
gpu_memory_utilization = 0.7
|
||||
|
||||
# PrimeIntellect Qwen3 fine-tune - select its renderer explicitly (the -SFT
|
||||
# suffix misses the MODEL_RENDERER_MAP exact match).
|
||||
|
||||
[inference.vllm]
|
||||
enable_lora = true
|
||||
gpu_memory_utilization = 0.7
|
||||
[orchestrator.renderer]
|
||||
name = "prime-qwen3"
|
||||
|
||||
@@ -38,11 +38,9 @@ id = "null"
|
||||
type = "subprocess"
|
||||
|
||||
[inference]
|
||||
gpu_memory_utilization = 0.7
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 2048
|
||||
|
||||
# Model not in MODEL_RENDERER_MAP — opt into DefaultRenderer (apply_chat_template).
|
||||
gpu_memory_utilization = 0.7
|
||||
[orchestrator.renderer]
|
||||
name = "default"
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
# Inference config for multi-run RL integration test
|
||||
[vllm]
|
||||
model = "PrimeIntellect/Qwen3-0.6B-Reverse-Text-SFT"
|
||||
max_model_len = 2048
|
||||
enable_lora = true
|
||||
max_lora_rank = 8
|
||||
max_loras = 4
|
||||
gpu_memory_utilization = 0.7
|
||||
|
||||
[model]
|
||||
name = "PrimeIntellect/Qwen3-0.6B-Reverse-Text-SFT"
|
||||
max_model_len = 2048
|
||||
|
||||
[weight_broadcast]
|
||||
type = "filesystem"
|
||||
|
||||
|
||||
@@ -72,4 +72,6 @@ type = "subprocess"
|
||||
lr = 3e-6
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.4
|
||||
|
||||
@@ -78,4 +78,6 @@ type = "subprocess"
|
||||
lr = 3e-6
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.4
|
||||
|
||||
@@ -40,5 +40,5 @@ max_completion_tokens = 768
|
||||
|
||||
[trainer]
|
||||
|
||||
[inference.parallel]
|
||||
dp = 4
|
||||
[inference.vllm]
|
||||
data_parallel_size = 4
|
||||
|
||||
@@ -54,12 +54,9 @@ type = "subprocess"
|
||||
seq_len = 16384
|
||||
attn = "flash_attention_2"
|
||||
|
||||
[inference.parallel]
|
||||
dp = 4
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 8192
|
||||
|
||||
data_parallel_size = 4
|
||||
[orchestrator.renderer]
|
||||
name = "default"
|
||||
reasoning_parser = "think"
|
||||
|
||||
@@ -40,8 +40,6 @@ max_completion_tokens = 512
|
||||
|
||||
[trainer]
|
||||
|
||||
[inference.parallel]
|
||||
dp = 4
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
tool_call_parser = "hermes"
|
||||
data_parallel_size = 4
|
||||
|
||||
@@ -35,8 +35,7 @@ max_completion_tokens = 1024
|
||||
|
||||
[trainer]
|
||||
|
||||
[inference.parallel]
|
||||
dp = 6
|
||||
|
||||
[inference.vllm]
|
||||
data_parallel_size = 6
|
||||
[orchestrator.renderer]
|
||||
name = "prime-qwen3"
|
||||
|
||||
@@ -24,10 +24,10 @@ Needed for `opd*.toml`, `sft_distill.toml` / `sft_distill_lora.toml`, and `mixed
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=1 uv run inference \
|
||||
--model.name PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
--vllm.model PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
--server.port 8001 \
|
||||
--gpu-memory-utilization 0.5 \
|
||||
--model.enforce-eager
|
||||
--vllm.gpu-memory-utilization 0.5 \
|
||||
--vllm.enforce-eager
|
||||
```
|
||||
|
||||
## Run the debug configs
|
||||
|
||||
@@ -58,4 +58,6 @@ name = "prime-qwen3"
|
||||
lr = 1e-6
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -58,4 +58,6 @@ lr = 3e-6
|
||||
[ckpt]
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -58,4 +58,6 @@ lr = 3e-6
|
||||
[ckpt]
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# ref_logprobs, GRPO samples don't, and both pack into the same micro batches.
|
||||
# Start the frozen reference server first (on a separate GPU):
|
||||
# CUDA_VISIBLE_DEVICES=1 uv run inference \
|
||||
# --model.name PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --gpu-memory-utilization 0.5 --model.enforce-eager
|
||||
# --vllm.model PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --vllm.gpu-memory-utilization 0.5 --vllm.enforce-eager
|
||||
# Then:
|
||||
# uv run rl @ configs/debug/algo/mixed_grpo_opd.toml
|
||||
|
||||
@@ -85,4 +85,6 @@ type = "subprocess"
|
||||
lr = 3e-6
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Start the frozen reference server first (on a separate GPU):
|
||||
# CUDA_VISIBLE_DEVICES=1 uv run inference \
|
||||
# --model.name PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --gpu-memory-utilization 0.5 --model.enforce-eager
|
||||
# --vllm.model PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --vllm.gpu-memory-utilization 0.5 --vllm.enforce-eager
|
||||
# Then:
|
||||
# uv run rl @ configs/debug/algo/opd.toml
|
||||
|
||||
@@ -70,4 +70,6 @@ lr = 3e-6
|
||||
[ckpt]
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Start the frozen reference server first (on a separate GPU):
|
||||
# CUDA_VISIBLE_DEVICES=1 uv run inference \
|
||||
# --model.name PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --gpu-memory-utilization 0.5 --model.enforce-eager
|
||||
# --vllm.model PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --vllm.gpu-memory-utilization 0.5 --vllm.enforce-eager
|
||||
# Then:
|
||||
# uv run rl @ configs/debug/algo/opd_lora.toml
|
||||
|
||||
@@ -76,4 +76,6 @@ save_adapter_separately = true
|
||||
[ckpt]
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -70,4 +70,6 @@ lr = 3e-6
|
||||
[ckpt]
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -64,4 +64,6 @@ type = "subprocess"
|
||||
lr = 3e-6
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Start the frozen reference server first (on a separate GPU):
|
||||
# CUDA_VISIBLE_DEVICES=1 uv run inference \
|
||||
# --model.name PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --gpu-memory-utilization 0.5 --model.enforce-eager
|
||||
# --vllm.model PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --vllm.gpu-memory-utilization 0.5 --vllm.enforce-eager
|
||||
# Then:
|
||||
# uv run rl @ configs/debug/algo/sft_distill.toml
|
||||
|
||||
@@ -75,4 +75,6 @@ lr = 3e-6
|
||||
[ckpt]
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Start the frozen reference server first (on a separate GPU):
|
||||
# CUDA_VISIBLE_DEVICES=1 uv run inference \
|
||||
# --model.name PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --gpu-memory-utilization 0.5 --model.enforce-eager
|
||||
# --vllm.model PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL \
|
||||
# --server.port 8001 --vllm.gpu-memory-utilization 0.5 --vllm.enforce-eager
|
||||
# Then:
|
||||
# uv run rl @ configs/debug/algo/sft_distill_lora.toml
|
||||
|
||||
@@ -81,4 +81,6 @@ save_adapter_separately = true
|
||||
[ckpt]
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
@@ -64,4 +64,6 @@ type = "subprocess"
|
||||
lr = 3e-6
|
||||
|
||||
[inference]
|
||||
|
||||
[inference.vllm]
|
||||
gpu_memory_utilization = 0.5
|
||||
|
||||
Vendored
+1
-1
Submodule deps/renderers updated: d4707862ac...2a7e77eb14
Vendored
+1
-1
Submodule deps/research-environments updated: f9c43a74fe...b10db7640b
Vendored
+1
-1
Submodule deps/verifiers updated: d30a3f48e5...29e3a0f7a3
@@ -50,7 +50,7 @@ CLI flags mirror the TOML tree using dots:
|
||||
--max-steps 50 # top-level
|
||||
--model.name Qwen/Qwen3-4B # nested
|
||||
--trainer.optim.lr 1e-5 # double-nested
|
||||
--inference.parallel.tp 4
|
||||
--inference.vllm.tensor-parallel-size 4
|
||||
```
|
||||
|
||||
> Field names are snake_case in TOML (`max_model_len`) and kebab-case on the CLI (`--max-model-len`).
|
||||
@@ -126,11 +126,11 @@ To **disable** a sub-config that's on by default, use `--no-<name>` on the CLI o
|
||||
TOML has no `null`. Use the string `"None"`, which the loader coerces:
|
||||
|
||||
```toml
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = "None"
|
||||
```
|
||||
|
||||
On the CLI: `--inference.model.max-model-len None`.
|
||||
On the CLI: `--inference.vllm.max-model-len None`.
|
||||
|
||||
### Discriminated Unions
|
||||
|
||||
|
||||
+2
-2
@@ -118,8 +118,8 @@ Then run the full RL stack on reverse-text:
|
||||
uv run rl @ configs/ci/integration/reverse-text-moe/start.toml \
|
||||
--model.name samsja/mini-glm-moe \
|
||||
--trainer.model.impl custom \
|
||||
--inference.gpu-memory-utilization 0.7 \
|
||||
--inference.model.max-model-len 2048
|
||||
--inference.vllm.gpu-memory-utilization 0.7 \
|
||||
--inference.vllm.max-model-len 2048
|
||||
```
|
||||
|
||||
What to look for:
|
||||
|
||||
+23
-26
@@ -42,7 +42,7 @@ type = "single_node" # or "multi_node" or "disaggregated"
|
||||
To configure the inference server, you can use the `InferenceConfig` field. This is a config-field that allows you to set the inference server-specific knobs. Most of these are supported for all deployment shapes, with few exceptions. These exceptions are rejected on validation.
|
||||
|
||||
```toml
|
||||
[inference]
|
||||
[inference.vllm]
|
||||
model = "PrimeIntellect/INTELLECT-3"
|
||||
...
|
||||
```
|
||||
@@ -63,12 +63,10 @@ The launcher starts a `vllm-router` on `inference.server.port` (default `8000`)
|
||||
This deployment shape runs the inference server on a single node, if configured with NVLink enabled, it allows you more freedom in terms of parallelism configurations.
|
||||
|
||||
```toml
|
||||
[inference]
|
||||
[inference.vllm]
|
||||
enable_expert_parallel = true # defaults to False
|
||||
|
||||
[inference.parallel]
|
||||
tp = 2
|
||||
dp = 4
|
||||
tensor_parallel_size = 2
|
||||
data_parallel_size = 4
|
||||
|
||||
[inference.deployment]
|
||||
type = "single_node"
|
||||
@@ -76,7 +74,7 @@ type = "single_node"
|
||||
|
||||
We reccomend choosing your parallelism based on the expected throughput and latency requirements. High `dp` might create high latency, however it will also give you the highest throughput. This is a tradeoff you need to make based on your use case and required `orchestrator.max_inflight_requests`. Setting `tp` to a higher value will usually give you lower latency, but the inference server also will become saturated faster with lower number of requests.
|
||||
|
||||
Another thing to consider, is the memory usage. You need to make sure that the model will fit into the available GPU memory. We will not go into the details on how to do this in this document. Related thing to consider, is the space for the KV cache. This will heavily affect the amount of requests your inference server can handle. You want to shard your model, either using `inference.enable_expert_parallel` or `inference.parallel.tp` to maximize the available GPU memory.
|
||||
Another thing to consider, is the memory usage. You need to make sure that the model will fit into the available GPU memory. We will not go into the details on how to do this in this document. Related thing to consider, is the space for the KV cache. This will heavily affect the amount of requests your inference server can handle. You want to shard your model, either using `inference.vllm.enable_expert_parallel` or `inference.vllm.tensor_parallel_size` to maximize the available GPU memory.
|
||||
|
||||
You can also increase the available KV cache memory by enabling `inference.kv_cache_offload`. More details in the [Advanced Configuration](#advanced-configuration) section.
|
||||
|
||||
@@ -86,7 +84,7 @@ You can also increase the available KV cache memory by enabling `inference.kv_ca
|
||||
This deployment shape branches into 2 sub-shapes:
|
||||
|
||||
- [Multi-replica](#multi-replica) - Runs the inference server on multiple nodes, but each node runs an independent vLLM replica. You can think of this as a for-loop over single-node deployments.
|
||||
- [Wide-EP](#wide-ep) - This option is gated behind `inference.enable_expert_parallel = true`. It allows you to run the inference server on multiple nodes, allowing you to use multi-node expert parallelism. This is a more advanced feature that is suitable for high-throughput, high-concurrency workloads.
|
||||
- [Wide-EP](#wide-ep) - This option is gated behind `inference.vllm.enable_expert_parallel = true`. It allows you to run the inference server on multiple nodes, allowing you to use multi-node expert parallelism. This is a more advanced feature that is suitable for high-throughput, high-concurrency workloads.
|
||||
|
||||
### Multi-replica
|
||||
|
||||
@@ -98,35 +96,31 @@ Parallelism configuration is the same as the single-node deployment. The shape i
|
||||
type = "multi_node"
|
||||
num_nodes = 2
|
||||
|
||||
[inference]
|
||||
[inference.vllm]
|
||||
model = "PrimeIntellect/INTELLECT-3"
|
||||
|
||||
[inference.parallel]
|
||||
tp = 2
|
||||
dp = 4
|
||||
tensor_parallel_size = 2
|
||||
data_parallel_size = 4
|
||||
```
|
||||
|
||||
This configuration will run 2 independent vLLM replicas, each with `tp=2` and `dp=4`. Routing is handled by a single global router running on the first inference node, fronting the per-rank endpoints of all replicas — either `vllm-router` (default) or the upstream `llm-d` EPP+Envoy, selected via the `[inference.router]` block. You can read more about the supported routing options in the [router](#router) section.
|
||||
This configuration will run 2 independent vLLM replicas, each with `tensor_parallel_size=2` and `data_parallel_size=4`. Routing is handled by a single global router running on the first inference node, fronting the per-rank endpoints of all replicas — either `vllm-router` (default) or the upstream `llm-d` EPP+Envoy, selected via the `[inference.router]` block. You can read more about the supported routing options in the [router](#router) section.
|
||||
|
||||
### Wide-EP
|
||||
|
||||
For huge, 200B+ scale models, you might want to use multi-node expert parallelism to maximize the KV-cache space. This deployment shape is defined by setting `inference.deployment.type = "multi_node"` and `inference.enable_expert_parallel = true`.
|
||||
For huge, 200B+ scale models, you might want to use multi-node expert parallelism to maximize the KV-cache space. This deployment shape is defined by setting `inference.deployment.type = "multi_node"` and `inference.vllm.enable_expert_parallel = true`.
|
||||
|
||||
```toml
|
||||
[inference.deployment]
|
||||
type = "multi_node"
|
||||
num_nodes = 2
|
||||
|
||||
[inference]
|
||||
[inference.vllm]
|
||||
model = "PrimeIntellect/INTELLECT-3"
|
||||
enable_expert_parallel = true
|
||||
|
||||
[inference.parallel]
|
||||
tp = 2
|
||||
dp = 8
|
||||
tensor_parallel_size = 2
|
||||
data_parallel_size = 8
|
||||
```
|
||||
|
||||
This configuration will run 2 vLLM processes, each with `data_parallel_size_local = 4` and `tp = 2` and expert parallelism spanning 2 nodes. The requests are again routed to these processes via the `vllm-router`.
|
||||
This configuration will run 2 vLLM processes, each with `data_parallel_size_local = 4` and `tensor_parallel_size = 2` and expert parallelism spanning 2 nodes. The requests are again routed to these processes via the `vllm-router`.
|
||||
|
||||
## P/D Disaggregation
|
||||
|
||||
@@ -272,24 +266,27 @@ type = "disaggregated"
|
||||
These are role-specific and layer on top of [`env_vars`](configuration.md#environment-variables) shared by all inference processes regardless of role.
|
||||
|
||||
### Other vLLM features
|
||||
We support various other vLLM features. Some of those, such as `enable_dbo`, `enable_eplb` are exposed as a top-level config fields. For those that are not, you can configure them by setting `inference.vllm_extra` to the desired value.
|
||||
The `[inference.vllm]` section is a pass-through: every key is forwarded to the vLLM server under vLLM's own argument name, whether prime-rl types it or not. Anything `vllm serve` accepts can be set here.
|
||||
|
||||
```toml
|
||||
[inference.vllm_extra]
|
||||
[inference.vllm]
|
||||
headless = true
|
||||
max_num_seqs = 256
|
||||
```
|
||||
|
||||
On the CLI the same keys are available as `--inference.vllm.max-num-seqs 256` (or `--vllm.max-num-seqs 256` for the standalone inference entrypoint); dict-valued arguments take a JSON string, e.g. `--vllm.compilation-config '{"cudagraph_mode": "NONE"}'`.
|
||||
|
||||
### Router Replay
|
||||
|
||||
Router replay works by capturing the expert routing decisions into a buffer. This buffer then gets sent to the trainer, which can use it instead of re-computing the routing. This lowers the trainer↔inference mismatch by an order of magnitude, resulting in more stable training.
|
||||
|
||||
To enable router replay, you can set `inference.enable_return_routed_experts = true`.
|
||||
To enable router replay, you can set `inference.vllm.enable_return_routed_experts = true`.
|
||||
|
||||
```toml
|
||||
[trainer]
|
||||
enable_router_replay = true # this will also auto-set the inference.enable_return_routed_experts = true
|
||||
enable_router_replay = true # this will also auto-set inference.vllm.enable_return_routed_experts = true
|
||||
|
||||
[inference]
|
||||
[inference.vllm]
|
||||
enable_return_routed_experts = true
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ The `rl`, `sft`, and `inference` entrypoints all accept a `[deployment]` block (
|
||||
uv run rl @ rl.toml \
|
||||
--deployment.num-infer-gpus 6 \
|
||||
--deployment.num-train-gpus 2 \
|
||||
--inference.parallel.dp 6
|
||||
--inference.vllm.data-parallel-size 6
|
||||
```
|
||||
|
||||
The launcher allocates GPUs in order from `CUDA_VISIBLE_DEVICES` (or all visible GPUs): inference first, trainer next. To target a specific physical subset, pin `CUDA_VISIBLE_DEVICES` before launching.
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ This page covers everything you need to launch, observe, checkpoint, and recover
|
||||
| `uv run inference` | vLLM server. | Always use this entrypoint over `vllm serve` — it adds `/update_weights`, `/load_lora_adapter`, and `/init_broadcaster`. |
|
||||
| `uv run trainer` | Standalone trainer process group. | Use only when launching the trainer separately from the orchestrator (e.g. multi-node RL without the `rl` wrapper). |
|
||||
| `uv run orchestrator` | Standalone orchestrator process. | Pair with a separately-launched trainer, inference, and one `env-server` per source. |
|
||||
| `uv run env-server` | Standalone env server for one environment. | The `rl` launcher starts these automatically (one per train/eval source, at the source's derived `serve.address`); only needed when running the orchestrator standalone. |
|
||||
| `uv run env-server` | Standalone env server for one environment. | The `rl` launcher starts these automatically (one per train/eval source, at a derived loopback address); only needed when running the orchestrator standalone, or for sources with an explicit `serve.address` — those are externally managed (e.g. their own k8s pod) and the launcher expects the server to already run there. |
|
||||
|
||||
## RL Trainer
|
||||
|
||||
@@ -103,7 +103,7 @@ Frozen models are declared inline on the algorithm, named where the model is use
|
||||
|
||||
```bash
|
||||
CUDA_VISIBLE_DEVICES=1 uv run inference \
|
||||
--model.name <frozen-model> --server.port 8001
|
||||
--vllm.model <frozen-model> --server.port 8001
|
||||
```
|
||||
|
||||
The standalone `uv run sft` entrypoint is the more traditional SFT path — pure dataset-based, no orchestrator. Use the `sft` algorithm only when you want a frozen model to generate the supervision on the fly.
|
||||
|
||||
@@ -200,15 +200,13 @@ model = "Qwen/Qwen3-235B-A22B-Instruct-2507"
|
||||
# --- Inference ---
|
||||
|
||||
[inference]
|
||||
enable_return_routed_experts = true
|
||||
|
||||
# vLLM + FlashInfer caches on node-local /tmp.
|
||||
[inference.env_vars]
|
||||
VLLM_CACHE_ROOT = "/tmp/.vllm-cache"
|
||||
FLASHINFER_WORKSPACE_BASE = "/tmp/.flashinfer-cache"
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 131072
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
tensor_parallel_size = 8
|
||||
enable_return_routed_experts = true
|
||||
|
||||
@@ -142,15 +142,13 @@ rollout = 3600
|
||||
# --- Inference ---
|
||||
|
||||
[inference]
|
||||
enable_return_routed_experts = true
|
||||
|
||||
# vLLM + FlashInfer caches on node-local /tmp (see [env_vars]).
|
||||
[inference.env_vars]
|
||||
VLLM_CACHE_ROOT = "/tmp/.vllm-cache"
|
||||
FLASHINFER_WORKSPACE_BASE = "/tmp/.flashinfer-cache"
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 131072
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
tensor_parallel_size = 8
|
||||
enable_return_routed_experts = true
|
||||
|
||||
@@ -197,15 +197,13 @@ id = "terminal-bench-2-v1"
|
||||
# --- Inference ---
|
||||
|
||||
[inference]
|
||||
enable_return_routed_experts = true
|
||||
|
||||
# vLLM + FlashInfer caches on node-local /tmp.
|
||||
[inference.env_vars]
|
||||
VLLM_CACHE_ROOT = "/tmp/.vllm-cache"
|
||||
FLASHINFER_WORKSPACE_BASE = "/tmp/.flashinfer-cache"
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 131072
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
tensor_parallel_size = 8
|
||||
enable_return_routed_experts = true
|
||||
|
||||
@@ -6,22 +6,9 @@
|
||||
|
||||
output_dir = "/shared/outputs/glm5.2-16node-llmd"
|
||||
|
||||
enable_expert_parallel = true
|
||||
gpu_memory_utilization = 0.75
|
||||
enable_eplb = false
|
||||
use_deep_gemm = true
|
||||
enable_fp32_lm_head = true
|
||||
|
||||
[model]
|
||||
name = "zai-org/GLM-5.2-FP8"
|
||||
max_model_len = 91000
|
||||
tool_call_parser = "glm47"
|
||||
reasoning_parser = "glm45"
|
||||
|
||||
[vllm_extra]
|
||||
enable_ep_weight_filter = true
|
||||
safetensors_load_strategy = "prefetch"
|
||||
|
||||
[kv_cache_offload]
|
||||
type = "mooncake"
|
||||
device_name = "mlx5_0,mlx5_3,mlx5_4,mlx5_5,mlx5_6,mlx5_9,mlx5_10,mlx5_11"
|
||||
@@ -64,3 +51,14 @@ non_cached_tokens = 128
|
||||
[slurm]
|
||||
job_name = "glm5.2-16node-llmd"
|
||||
partition = "all"
|
||||
|
||||
[vllm]
|
||||
model = "zai-org/GLM-5.2-FP8"
|
||||
max_model_len = 91000
|
||||
tool_call_parser = "glm47"
|
||||
reasoning_parser = "glm45"
|
||||
gpu_memory_utilization = 0.75
|
||||
enable_expert_parallel = true
|
||||
enable_eplb = false
|
||||
enable_ep_weight_filter = true
|
||||
safetensors_load_strategy = "prefetch"
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
enable_expert_parallel = true
|
||||
enable_eplb = false
|
||||
use_deep_gemm = true
|
||||
gpu_memory_utilization = 0.85
|
||||
|
||||
[model]
|
||||
name = "zai-org/GLM-5-FP8"
|
||||
tool_call_parser = "auto"
|
||||
reasoning_parser = "glm45"
|
||||
|
||||
[deployment]
|
||||
type = "disaggregated"
|
||||
@@ -17,3 +9,11 @@ gpus_per_node = 8
|
||||
[slurm]
|
||||
job_name = "glm5"
|
||||
partition = "cluster"
|
||||
|
||||
[vllm]
|
||||
model = "zai-org/GLM-5-FP8"
|
||||
tool_call_parser = "auto"
|
||||
reasoning_parser = "glm45"
|
||||
gpu_memory_utilization = 0.85
|
||||
enable_expert_parallel = true
|
||||
enable_eplb = false
|
||||
|
||||
@@ -48,7 +48,6 @@ num_decode_replicas = 1
|
||||
"max_num_batched_tokens" = 96
|
||||
"max_num_seqs" = 96
|
||||
|
||||
|
||||
[inference.router]
|
||||
type = "llm-d"
|
||||
|
||||
@@ -66,6 +65,16 @@ non_cached_tokens = 128 # if <128 tokens, skip prefill go to decode immediately
|
||||
"kv-cache-utilization-scorer" = 4.0
|
||||
"queue-scorer" = 3.0
|
||||
|
||||
[inference.vllm]
|
||||
model = "zai-org/GLM-5.1-FP8"
|
||||
max_model_len = 131072
|
||||
tool_call_parser = "glm47"
|
||||
reasoning_parser = "glm45"
|
||||
gpu_memory_utilization = 0.75
|
||||
enable_expert_parallel = true
|
||||
enable_eplb = false
|
||||
enable_ep_weight_filter = true
|
||||
safetensors_load_strategy = "prefetch"
|
||||
[slurm]
|
||||
job_name = "glm5-llmd"
|
||||
partition = "all" # FILL IN: set to your cluster's partition
|
||||
@@ -118,7 +127,6 @@ temperature = 1.0
|
||||
[orchestrator.train.sampling.extra_body.chat_template_kwargs]
|
||||
clear_thinking = false
|
||||
|
||||
|
||||
[[orchestrator.train.source]]
|
||||
name = "r2e"
|
||||
|
||||
@@ -133,25 +141,10 @@ type = "prime"
|
||||
labels = ["glm5-llmd"]
|
||||
|
||||
[inference]
|
||||
enable_expert_parallel = true
|
||||
# <0.80 because glm5 layers are too large for 0.85
|
||||
gpu_memory_utilization = 0.75
|
||||
enable_eplb = false
|
||||
use_deep_gemm = true
|
||||
enable_fp32_lm_head = true
|
||||
|
||||
[inference.model]
|
||||
name = "zai-org/GLM-5.1-FP8"
|
||||
max_model_len = 131072
|
||||
tool_call_parser = "glm47"
|
||||
reasoning_parser = "glm45"
|
||||
|
||||
# Speed up GLM-5.1 weight load: EP weight filtering + safetensors prefetch.
|
||||
[inference.vllm_extra]
|
||||
enable_ep_weight_filter = true
|
||||
safetensors_load_strategy = "prefetch"
|
||||
|
||||
# Mooncake distributed CPU KV store: 1TB/node shared pool across all inference nodes.
|
||||
[inference.kv_cache_offload]
|
||||
type = "mooncake"
|
||||
# Auto Detection is funky, do it yourself from nvidia-smi topo -m
|
||||
|
||||
@@ -23,10 +23,15 @@ type = "disaggregated"
|
||||
prefill_nodes_per_replica = 4
|
||||
decode_nodes_per_replica = 4
|
||||
|
||||
[inference.vllm]
|
||||
model = "zai-org/GLM-5-FP8"
|
||||
tool_call_parser = "glm47"
|
||||
gpu_memory_utilization = 0.80
|
||||
enable_expert_parallel = true
|
||||
enable_eplb = false
|
||||
[slurm]
|
||||
job_name = "glm5-pd-disag"
|
||||
|
||||
|
||||
[ckpt]
|
||||
interval = 100
|
||||
|
||||
@@ -58,7 +63,6 @@ type = "adamw"
|
||||
lr = 1e-6
|
||||
weight_decay = 0.1
|
||||
|
||||
|
||||
[orchestrator]
|
||||
batch_size = 4096
|
||||
group_size = 16
|
||||
@@ -89,12 +93,6 @@ type = "gibberish"
|
||||
enforce = true
|
||||
|
||||
[inference]
|
||||
enable_expert_parallel = true
|
||||
# we need <0.85 bc glm5 layers are too large for 0.85
|
||||
gpu_memory_utilization = 0.80
|
||||
enable_eplb = false
|
||||
use_deep_gemm = true
|
||||
|
||||
[inference.model]
|
||||
name = "zai-org/GLM-5-FP8"
|
||||
tool_call_parser = "glm47"
|
||||
|
||||
@@ -151,9 +151,7 @@ id = "null"
|
||||
[orchestrator.eval.source.env.agent.runtime]
|
||||
type = "subprocess"
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
|
||||
# Model not in MODEL_RENDERER_MAP — opt into DefaultRenderer (apply_chat_template).
|
||||
[inference.vllm]
|
||||
tensor_parallel_size = 8
|
||||
[orchestrator.renderer]
|
||||
name = "default"
|
||||
|
||||
@@ -48,7 +48,6 @@ batch_size = 2048
|
||||
oversampling_factor = 2
|
||||
max_off_policy_steps = 16
|
||||
|
||||
|
||||
[[orchestrator.train.source]]
|
||||
name = "swe"
|
||||
|
||||
@@ -78,9 +77,7 @@ id = "bash"
|
||||
type = "prime"
|
||||
labels = ["minimax-swe", "swe-bench-verified"]
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
|
||||
# PrimeIntellect/MiniMax-M2.5-bf16 — template-identical to MiniMaxAI/MiniMax-M2.5 (mapped).
|
||||
[inference.vllm]
|
||||
tensor_parallel_size = 8
|
||||
[orchestrator.renderer]
|
||||
name = "minimax-m2"
|
||||
|
||||
@@ -122,13 +122,11 @@ labels = ["nemotron-3-super-swe"]
|
||||
rollout = 3600
|
||||
|
||||
[inference]
|
||||
# vLLM disables prefix caching by default for hybrid-Mamba models; SWE turns share long prefixes.
|
||||
|
||||
[inference.vllm]
|
||||
max_model_len = 131072
|
||||
tensor_parallel_size = 8
|
||||
enable_prefix_caching = true
|
||||
enable_expert_parallel = true
|
||||
enable_return_routed_experts = true
|
||||
# vLLM disables prefix caching by default for hybrid-Mamba models; SWE turns share long prefixes.
|
||||
enable_prefix_caching = true
|
||||
|
||||
[inference.model]
|
||||
max_model_len = 131072
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
|
||||
@@ -75,5 +75,5 @@ id = "null"
|
||||
[orchestrator.eval.source.env.agent.runtime]
|
||||
type = "subprocess"
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
[inference.vllm]
|
||||
tensor_parallel_size = 8
|
||||
|
||||
@@ -75,5 +75,5 @@ id = "bash"
|
||||
type = "prime"
|
||||
labels = ["qwen30b-swe", "swe-bench-verified"]
|
||||
|
||||
[inference.parallel]
|
||||
tp = 8
|
||||
[inference.vllm]
|
||||
tensor_parallel_size = 8
|
||||
|
||||
@@ -51,11 +51,9 @@ id = "null"
|
||||
type = "modal"
|
||||
|
||||
[inference]
|
||||
gpu_memory_utilization = 0.85
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 32768
|
||||
|
||||
[inference.parallel]
|
||||
dp = 2
|
||||
tp = 4
|
||||
data_parallel_size = 2
|
||||
tensor_parallel_size = 4
|
||||
gpu_memory_utilization = 0.85
|
||||
|
||||
@@ -32,7 +32,7 @@ We use non-default settings to balance the difficulty: 3 fixed turns (instead of
|
||||
Start the inference server:
|
||||
```bash
|
||||
# In the `Inference` pane
|
||||
uv run inference --enable-lora --model.name Qwen/Qwen3-4B-Instruct-2507
|
||||
uv run inference --vllm.enable-lora --vllm.model Qwen/Qwen3-4B-Instruct-2507
|
||||
```
|
||||
|
||||
Evaluate the base model:
|
||||
@@ -110,7 +110,7 @@ We have uploaded the final model as [`PrimeIntellect/Qwen3-4B-Instruct-AlphabetS
|
||||
Let's see how our final RL checkpoint performs on the eval set.
|
||||
```bash
|
||||
# In the `Inference` pane
|
||||
uv run inference --enable-lora --model.name PrimeIntellect/Qwen3-4B-Instruct-AlphabetSort-RL
|
||||
uv run inference --vllm.enable-lora --vllm.model PrimeIntellect/Qwen3-4B-Instruct-AlphabetSort-RL
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
@@ -49,10 +49,8 @@ type = "subprocess"
|
||||
[trainer.model]
|
||||
seq_len = 16384
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
max_model_len = 8192
|
||||
|
||||
# Model not in MODEL_RENDERER_MAP — opt into DefaultRenderer (apply_chat_template).
|
||||
[orchestrator.renderer]
|
||||
name = "default"
|
||||
reasoning_parser = "think"
|
||||
|
||||
@@ -22,7 +22,7 @@ Let's check how well `Qwen3-0.6B` does out-of-the-box on the `reverse-text` envi
|
||||
|
||||
```bash
|
||||
# Run this in the `Inference` pane
|
||||
uv run inference --model.name Qwen/Qwen3-0.6B
|
||||
uv run inference --vllm.model Qwen/Qwen3-0.6B
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -95,7 +95,7 @@ Let's see how our final RL checkpoints perform on the `reverse-text` environment
|
||||
|
||||
```bash
|
||||
# Run this in the `Inference` pane
|
||||
uv run inference --model.name PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL
|
||||
uv run inference --vllm.model PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -210,7 +210,7 @@ kubectl exec -it my-exp-trainer-0 -- bash
|
||||
|
||||
# If inference server isn't running with the RL model, start it in another terminal:
|
||||
kubectl exec -it my-exp-inference-0 -- bash
|
||||
uv run inference --model.name /data/outputs/weights/step_20
|
||||
uv run inference --vllm.model /data/outputs/weights/step_20
|
||||
|
||||
# Back in trainer pod, run evaluation
|
||||
uv run eval reverse-text-v1 --harness.id null \
|
||||
|
||||
@@ -70,7 +70,7 @@ Start the inference server:
|
||||
|
||||
```bash
|
||||
# In the `Inference` pane
|
||||
uv run inference --enable-lora --model.name Qwen/Qwen3-4B-Instruct-2507 --model.tool_call_parser hermes
|
||||
uv run inference --vllm.enable-lora --vllm.model Qwen/Qwen3-4B-Instruct-2507 --vllm.tool-call-parser hermes
|
||||
```
|
||||
|
||||
Evaluate the base model:
|
||||
@@ -114,7 +114,7 @@ Evaluate your trained model:
|
||||
|
||||
```bash
|
||||
# In the `Inference` pane
|
||||
uv run inference --enable-lora --model.name <user>/Qwen3-4B-Instruct-WikiSearch-RL --model.tool_call_parser hermes
|
||||
uv run inference --vllm.enable-lora --vllm.model <user>/Qwen3-4B-Instruct-WikiSearch-RL --vllm.tool-call-parser hermes
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
@@ -40,10 +40,6 @@ name = "qwen3-4b-wiki-search"
|
||||
[orchestrator.train.sampling]
|
||||
max_completion_tokens = 512
|
||||
|
||||
[[orchestrator.pre_batch_filters]]
|
||||
type = "zero_advantage"
|
||||
enforce = true
|
||||
|
||||
[[orchestrator.train.source]]
|
||||
name = "wiki-search"
|
||||
|
||||
@@ -56,7 +52,11 @@ id = "null"
|
||||
[orchestrator.train.source.env.agent.runtime]
|
||||
type = "subprocess"
|
||||
|
||||
[[orchestrator.pre_batch_filters]]
|
||||
type = "zero_advantage"
|
||||
enforce = true
|
||||
|
||||
[ckpt] # Checkpoint at the end of training
|
||||
|
||||
[inference.model]
|
||||
[inference.vllm]
|
||||
tool_call_parser = "hermes"
|
||||
|
||||
@@ -22,7 +22,7 @@ Before training, we want to get a baseline score and test how well `Qwen3-1.7B`
|
||||
|
||||
```bash
|
||||
# Run this in the `Inference` pane
|
||||
uv run inference --model.name Qwen/Qwen3-1.7B
|
||||
uv run inference --vllm.model Qwen/Qwen3-1.7B
|
||||
```
|
||||
|
||||
Then, use the `eval` entrypoint to evaluate the model in the `wordle` environment. We evaluate on the 20 evaluation examples which are distinct words not appearing in the training set of the environment. We constrain the response length to 1024 tokens as this should be more than enough to play a full game.
|
||||
@@ -98,7 +98,7 @@ Let's see how our final RL checkpoint performs on the eval set.
|
||||
|
||||
```bash
|
||||
# Run this in the `Inference` pane
|
||||
uv run inference --model.name PrimeIntellect/Qwen3-1.7B-Wordle-RL
|
||||
uv run inference --vllm.model PrimeIntellect/Qwen3-1.7B-Wordle-RL
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
@@ -35,9 +35,7 @@ max_completion_tokens = 1024
|
||||
|
||||
[trainer] # Default trainer config
|
||||
|
||||
[inference.parallel]
|
||||
dp = 6
|
||||
|
||||
# Fine-tune inherits the PrimeIntellect Qwen3 template byte-for-byte.
|
||||
[inference.vllm]
|
||||
data_parallel_size = 6
|
||||
[orchestrator.renderer]
|
||||
name = "prime-qwen3"
|
||||
|
||||
@@ -7,10 +7,10 @@ requires-python = "~=3.12.0"
|
||||
dependencies = [
|
||||
"pydantic>=1.10.13",
|
||||
"prime-pydantic-config>=0.4.2",
|
||||
"renderers>=0.1.9.dev10",
|
||||
"renderers>=0.1.9",
|
||||
"tomli>=2.2.1",
|
||||
"tomli-w>=1.2.0",
|
||||
"verifiers>=0.2.2.dev76",
|
||||
"verifiers>=0.3.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import json
|
||||
from argparse import Namespace
|
||||
from pathlib import Path
|
||||
from typing import Annotated, Any, Literal, TypeAlias
|
||||
|
||||
from pydantic import Field, model_validator
|
||||
from pydantic import ConfigDict, Field, model_validator
|
||||
from pydantic_config import BaseConfig
|
||||
|
||||
from prime_rl.configs.shared import BaseModelConfig, EnvVars, LogConfig, SlurmConfig
|
||||
from prime_rl.utils.config import find_package_resource, rgetattr, rsetattr
|
||||
from prime_rl.configs.shared import EnvVars, LogConfig, SlurmConfig
|
||||
from prime_rl.utils.config import find_package_resource
|
||||
from prime_rl.utils.parsers import resolve_reasoning_parser, resolve_tool_call_parser
|
||||
|
||||
# TODO: Set thinking/ solution budget
|
||||
@@ -23,61 +24,192 @@ class ServerConfig(BaseConfig):
|
||||
"""Timeout in seconds for the ``/liveness`` endpoint's internal vLLM worker RPC. With Kubernetes liveness probes, keep the probe ``timeoutSeconds`` at least this high."""
|
||||
|
||||
|
||||
class ParallelConfig(BaseConfig):
|
||||
tp: int = 1
|
||||
"""Tensor parallel size. Forwarded to vLLM as ``--tensor-parallel-size``."""
|
||||
# Valid vLLM max_lora_rank values (`vllm.config.lora.MaxLoRARanks`), excluding 1 so
|
||||
# tiny adapters round up to 8. Hardcoded rather than imported: prime-rl-configs does
|
||||
# not depend on vLLM, and importing it costs seconds in every config-parsing process.
|
||||
VALID_VLLM_LORA_RANKS = (8, 16, 32, 64, 128, 256, 320, 512)
|
||||
|
||||
dp: int = Field(1, ge=1)
|
||||
"""Data parallel size. Forwarded to vLLM as ``--data-parallel-size``."""
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"tp={self.tp} dp={self.dp}"
|
||||
# vLLM all2all backend options for expert-parallel deployments.
|
||||
All2AllBackend = Literal[
|
||||
"allgather_reducescatter",
|
||||
"deepep_high_throughput",
|
||||
"deepep_low_latency",
|
||||
"flashinfer_nvlink_one_sided",
|
||||
"flashinfer_nvlink_two_sided",
|
||||
]
|
||||
|
||||
|
||||
class ModelConfig(BaseModelConfig):
|
||||
"""Configures the inference model. Most arguments are passed directly to the vLLM LLM class (https://docs.vllm.ai/en/latest/api/vllm.LLM.html).
|
||||
class VllmConfig(BaseConfig):
|
||||
"""Arguments forwarded to the vLLM server, under vLLM's own argument names
|
||||
(https://docs.vllm.ai/en/latest/configuration/engine_args.html).
|
||||
|
||||
The fields below are the arguments prime-rl types, defaults, or reads back;
|
||||
any other vLLM argument can be set as well (``[inference.vllm] max_num_seqs = 256``
|
||||
or ``--vllm.max-num-seqs 256``) and passes through to the server verbatim.
|
||||
|
||||
Parser fields (``tool_call_parser``, ``reasoning_parser``) default to ``"auto"``,
|
||||
which resolves to a concrete parser name at validation time from the model name.
|
||||
Set to ``None`` to disable.
|
||||
"""
|
||||
|
||||
model_config = ConfigDict(extra="allow")
|
||||
|
||||
model: str = "Qwen/Qwen3-0.6B"
|
||||
"""HF model name or local path."""
|
||||
|
||||
dtype: Literal["auto", "float16", "bfloat16", "float32"] = "auto"
|
||||
"""dtype for model weights and activations. ``auto`` uses FP16 for FP32/FP16 models and BF16 for BF16 models. Forwarded as ``--dtype``."""
|
||||
"""dtype for model weights and activations. ``auto`` uses FP16 for FP32/FP16 models and BF16 for BF16 models."""
|
||||
|
||||
max_model_len: int | None = None
|
||||
"""Maximum model context length. If None, uses the model config's value. Forwarded as ``--max-model-len``."""
|
||||
"""Maximum model context length. If None, uses the model config's value."""
|
||||
|
||||
enforce_eager: bool = False
|
||||
"""Enforce eager mode. When False, PyTorch eager and cuda graphs run hybrid for maximum performance. Forwarded as ``--enforce-eager``."""
|
||||
"""Enforce eager mode. When False, PyTorch eager and cuda graphs run hybrid for maximum performance."""
|
||||
|
||||
trust_remote_code: bool = False
|
||||
"""Trust remote code. Forwarded to vLLM engine init."""
|
||||
"""Trust remote code when loading the model."""
|
||||
|
||||
chat_template: str | None = None
|
||||
"""Chat template — a Jinja2 template string or path to a template file. Forwarded as ``--chat-template``. If None, uses the model's default."""
|
||||
"""Chat template — a Jinja2 template string or path to a template file. If None, uses the model's default."""
|
||||
|
||||
tool_call_parser: str | None = "auto"
|
||||
"""Tool-call parser. Forwarded as ``--tool-call-parser``. Set to ``"auto"`` (default) to detect from the model name, or ``None`` to disable."""
|
||||
"""Tool-call parser. Set to ``"auto"`` (default) to detect from the model name, or ``None`` to disable."""
|
||||
|
||||
reasoning_parser: str | None = "auto"
|
||||
"""Parser for extracting reasoning content from model outputs. Forwarded as ``--reasoning-parser``. Set to ``"auto"`` (default) to detect from the model name, or ``None`` to disable."""
|
||||
"""Parser for extracting reasoning content from model outputs. Set to ``"auto"`` (default) to detect from the model name, or ``None`` to disable."""
|
||||
|
||||
rope_scaling: dict[str, Any] | str | None = None
|
||||
"""RoPE scaling configuration as a dict (e.g. ``{rope_type="yarn", factor=4.0, original_max_position_embeddings=32768}``). Forwarded as ``--rope-scaling``."""
|
||||
"""RoPE scaling configuration as a dict (e.g. ``{rope_type="yarn", factor=4.0, original_max_position_embeddings=32768}``)."""
|
||||
|
||||
tensor_parallel_size: int = 1
|
||||
"""Tensor parallel size."""
|
||||
|
||||
data_parallel_size: int = Field(1, ge=1)
|
||||
"""Data parallel size."""
|
||||
|
||||
data_parallel_size_local: int | None = Field(None, ge=1)
|
||||
"""Data parallel replicas to run on this node."""
|
||||
|
||||
data_parallel_rpc_port: int = Field(13345, ge=1, le=65535)
|
||||
"""RPC port for data parallel communication."""
|
||||
|
||||
api_server_count: int = Field(1, ge=0)
|
||||
"""API servers to run. Set to 0 for headless mode."""
|
||||
|
||||
seed: int = 0
|
||||
"""Seed the inference components."""
|
||||
|
||||
gpu_memory_utilization: float = 0.9
|
||||
"""GPU memory utilization."""
|
||||
|
||||
enable_prefix_caching: bool | None = None
|
||||
"""Enable prefix caching."""
|
||||
|
||||
quantization: str | None = None
|
||||
"""Online inference quantization method. If None, vLLM infers it from the checkpoint."""
|
||||
|
||||
enable_lora: bool = False
|
||||
"""Enable LoRA."""
|
||||
|
||||
max_loras: int = 8
|
||||
"""Maximum number of LoRAs."""
|
||||
|
||||
# TODO: The default value is very high because our areal impl for lora isn't ideal
|
||||
# We add a lora with the same name instead of changing weights inplace
|
||||
# Because we dont cancel requests that are past max_async, these requests could be using a LoRA that gets unloaded which will crash the inference server
|
||||
max_cpu_loras: int = 100
|
||||
"""Maximum number of LoRAs on CPU."""
|
||||
|
||||
max_lora_rank: int | None = None
|
||||
"""Maximum LoRA rank. Rounded up to the nearest value vLLM accepts."""
|
||||
|
||||
lora_target_modules: list[str] | None = None
|
||||
"""LoRA target modules."""
|
||||
|
||||
enable_expert_parallel: bool = False
|
||||
"""Enable expert parallelism for MoE models."""
|
||||
|
||||
all2all_backend: All2AllBackend = "allgather_reducescatter"
|
||||
"""All-to-all backend for expert-parallel communication."""
|
||||
|
||||
enable_eplb: bool = False
|
||||
"""Enable expert parallel load balancer (EPLB)."""
|
||||
|
||||
enable_dbo: bool = False
|
||||
"""Enable dual batch overlap (DBO)."""
|
||||
|
||||
enable_return_routed_experts: bool = False
|
||||
"""Return routed experts in responses."""
|
||||
|
||||
@model_validator(mode="before")
|
||||
@classmethod
|
||||
def parse_extra_values(cls, data: dict) -> dict:
|
||||
"""Normalize pass-through (untyped) entries: kebab-case keys become snake_case,
|
||||
and string values — which is how CLI overrides arrive — are JSON-parsed so
|
||||
``--vllm.max-num-seqs 256`` lands as an int and ``--vllm.compilation-config
|
||||
'{"cudagraph_mode": "NONE"}'`` as a dict. Non-JSON strings stay strings."""
|
||||
if not isinstance(data, dict):
|
||||
return data
|
||||
for key in [k for k in data if k not in cls.model_fields]:
|
||||
value = data.pop(key)
|
||||
if isinstance(value, str):
|
||||
try:
|
||||
value = json.loads(value)
|
||||
except json.JSONDecodeError:
|
||||
pass
|
||||
data[key.replace("-", "_")] = value
|
||||
return data
|
||||
|
||||
@model_validator(mode="after")
|
||||
def auto_resolve_parsers(self):
|
||||
"""Resolve ``"auto"`` parser values to concrete parser names from the model name.
|
||||
|
||||
Runs after ``RLConfig.auto_setup_shared_configs`` (mode=before) has
|
||||
propagated the shared ``[model] name`` into ``inference.model``, so the
|
||||
propagated the shared ``[model] name`` into ``inference.vllm``, so the
|
||||
name is set even when only the shared block specifies it.
|
||||
"""
|
||||
if self.tool_call_parser == "auto":
|
||||
self.tool_call_parser = resolve_tool_call_parser(self.name)
|
||||
self.tool_call_parser = resolve_tool_call_parser(self.model)
|
||||
if self.reasoning_parser == "auto":
|
||||
self.reasoning_parser = resolve_reasoning_parser(self.name)
|
||||
self.reasoning_parser = resolve_reasoning_parser(self.model)
|
||||
return self
|
||||
|
||||
@model_validator(mode="after")
|
||||
def auto_setup_max_lora_rank(self):
|
||||
"""Auto-setup max_lora_rank by rounding up to the nearest valid vLLM value.
|
||||
|
||||
vLLM only accepts specific values for max_lora_rank: (1, 8, 16, 32, 64, 128, 256, 320, 512).
|
||||
This validator ensures that any configured rank is rounded up to the minimum valid value
|
||||
that can serve adapters of the requested rank.
|
||||
"""
|
||||
if self.max_lora_rank is not None:
|
||||
original_rank = self.max_lora_rank
|
||||
for valid_rank in VALID_VLLM_LORA_RANKS:
|
||||
if valid_rank >= self.max_lora_rank:
|
||||
self.max_lora_rank = valid_rank
|
||||
break
|
||||
else:
|
||||
raise ValueError(f"max_lora_rank={original_rank} exceeds vLLM maximum of {VALID_VLLM_LORA_RANKS[-1]}")
|
||||
return self
|
||||
|
||||
@model_validator(mode="after")
|
||||
def auto_setup_api_server_count(self):
|
||||
"""
|
||||
Ensures that we have at least as many API servers as data parallel
|
||||
size. Unless LoRA is enabled, in which case only one API server is
|
||||
supported (vLLM limitation).
|
||||
"""
|
||||
if self.model_extra and self.model_extra.get("headless", False):
|
||||
self.api_server_count = 0
|
||||
return self
|
||||
|
||||
if "api_server_count" not in self.model_fields_set:
|
||||
min_api_server_count = self.data_parallel_size_local or self.data_parallel_size
|
||||
if self.api_server_count < min_api_server_count:
|
||||
self.api_server_count = min_api_server_count
|
||||
|
||||
if self.enable_lora:
|
||||
self.api_server_count = 1 # LoRA requires only one API server
|
||||
return self
|
||||
|
||||
|
||||
@@ -153,20 +285,6 @@ KVCacheOffloadConfig: TypeAlias = Annotated[
|
||||
]
|
||||
|
||||
|
||||
# Valid vLLM max_lora_rank values (from vllm/config/lora.py)
|
||||
# TODO: on newer vLLM, can import via `get_args(vllm.config.lora.MaxLoRARanks)`
|
||||
VALID_VLLM_LORA_RANKS = (8, 16, 32, 64, 128, 256, 320, 512)
|
||||
|
||||
# vLLM all2all backend options for expert-parallel deployments.
|
||||
All2AllBackend = Literal[
|
||||
"allgather_reducescatter",
|
||||
"deepep_high_throughput",
|
||||
"deepep_low_latency",
|
||||
"flashinfer_nvlink_one_sided",
|
||||
"flashinfer_nvlink_two_sided",
|
||||
]
|
||||
|
||||
|
||||
# Known llm-d EPP scorer plugins (used to guard the ``scorers`` map against typos).
|
||||
KNOWN_SCORERS = frozenset(
|
||||
{
|
||||
@@ -325,10 +443,8 @@ class InferenceConfig(BaseConfig):
|
||||
backend_port: int = 8100
|
||||
"""Port for the vLLM engine(s) behind the router. Defaults to ``server.port + 100``. Multi-node deployments start one engine per local DP rank at ``backend_port + rank``."""
|
||||
|
||||
model: ModelConfig = Field(default_factory=ModelConfig)
|
||||
|
||||
parallel: ParallelConfig = ParallelConfig()
|
||||
"""Multi-node and multi-GPU parallelism (TP, DP, PP)."""
|
||||
vllm: VllmConfig = Field(default_factory=VllmConfig)
|
||||
"""vLLM server arguments, under vLLM's own argument names. Unknown fields pass through verbatim."""
|
||||
|
||||
log: LogConfig = LogConfig()
|
||||
"""Logging configuration."""
|
||||
@@ -336,57 +452,6 @@ class InferenceConfig(BaseConfig):
|
||||
env_vars: EnvVars = {}
|
||||
"""Extra environment variables for the inference server process(es). Merged on top of the launcher defaults."""
|
||||
|
||||
enable_lora: bool = False
|
||||
"""Enable LoRA. Forwarded as ``--enable-lora``."""
|
||||
|
||||
max_loras: int = 8
|
||||
"""Maximum number of LoRAs. Forwarded as ``--max-loras``."""
|
||||
|
||||
# TODO: The default value is very high because our areal impl for lora isn't ideal
|
||||
# We add a lora with the same name instead of changing weights inplace
|
||||
# Because we dont cancel requests that are past max_async, these requests could be using a LoRA that gets unloaded which will crash the inference server
|
||||
max_cpu_loras: int = 100
|
||||
"""Maximum number of LoRAs on CPU. Forwarded as ``--max-cpu-loras``."""
|
||||
|
||||
max_lora_rank: int | None = None
|
||||
"""Maximum LoRA rank. Forwarded as ``--max-lora-rank``."""
|
||||
|
||||
lora_target_modules: list[str] | None = None
|
||||
"""LoRA target modules. Forwarded as ``--lora-target-modules``."""
|
||||
|
||||
enable_prefix_caching: bool | None = None
|
||||
"""Enable prefix caching. Forwarded as ``--enable-prefix-caching``."""
|
||||
|
||||
gpu_memory_utilization: float = 0.9
|
||||
"""GPU memory utilization. Forwarded as ``--gpu-memory-utilization``."""
|
||||
|
||||
quantization: str | None = None
|
||||
"""Online inference quantization method. Forwarded as ``--quantization``."""
|
||||
|
||||
api_server_count: int = Field(1, ge=0)
|
||||
"""API servers to run. Forwarded as ``--api-server-count``. Set to 0 for headless mode."""
|
||||
|
||||
data_parallel_size_local: int | None = Field(None, ge=1)
|
||||
"""Data parallel replicas to run on this node. Forwarded as ``--data-parallel-size-local``."""
|
||||
|
||||
data_parallel_rpc_port: int = Field(13345, ge=1, le=65535)
|
||||
"""RPC port for data parallel communication. Forwarded as ``--data-parallel-rpc-port``."""
|
||||
|
||||
seed: int = 0
|
||||
"""Seed the inference components. Forwarded as ``--seed``."""
|
||||
|
||||
enable_expert_parallel: bool = False
|
||||
"""Enable expert parallelism for MoE models. Forwarded as ``--enable-expert-parallel``."""
|
||||
|
||||
all2all_backend: All2AllBackend = "allgather_reducescatter"
|
||||
"""All-to-all backend for expert-parallel communication. Forwarded as ``--all2all-backend``."""
|
||||
|
||||
enable_eplb: bool = False
|
||||
"""Enable expert parallel load balancer (EPLB). Forwarded as ``--enable-eplb``."""
|
||||
|
||||
enable_dbo: bool = False
|
||||
"""Enable dual batch overlap (DBO). Forwarded as ``--enable-dbo``."""
|
||||
|
||||
use_deep_gemm: bool = False
|
||||
"""Enable vLLM DeepGEMM FP8 kernels ``VLLM_USE_DEEP_GEMM=1``. Only works with block-wise FP8 quantization (e.g. GLM-5-FP8)."""
|
||||
|
||||
@@ -398,18 +463,12 @@ class InferenceConfig(BaseConfig):
|
||||
use_pd_kv_transfer: bool = False
|
||||
"""Auto-set for disaggregated P/D: emit the NIXL transfer connector. Persisted into the per-node config (which drops ``deployment``) so the connector is still built per worker. Not meant to be set by hand."""
|
||||
|
||||
enable_return_routed_experts: bool = False
|
||||
"""Return routed experts in responses. Forwarded as ``--enable-return-routed-experts``."""
|
||||
|
||||
enable_fp32_lm_head: bool = True
|
||||
"""Run the lm_head projection in fp32 via a native bf16×bf16 → fp32 GEMM (``torch.mm`` with ``out_dtype=torch.float32``). Stabilizes logprob precision under FP8/bf16 inference, matching SGLang's ``--enable-fp32-lm-head``. Implemented as a monkey-patch over vLLM's LogitsProcessor, activated by setting ``additional_config["fp32_lm_head"] = True`` on the vLLM config."""
|
||||
|
||||
enable_fp32_router_logits: bool = True
|
||||
"""Emit fp32 MoE router logits for DeepSeek-family models (incl. GLM-5.x) by setting ``out_dtype=float32`` on the gate: the bf16×bf16 gate GEMM writes its fp32 accumulator out unrounded instead of truncating logits to bf16 before expert scoring. Matches fp32-routed checkpoints (e.g. GLM-5.x, trained with Megatron ``--moe-router-dtype fp32``); pairs with ``trainer.model.moe_router_dtype = "float32"``. Implemented as a monkey-patch over vLLM's DeepseekV2MoE, activated by setting ``additional_config["fp32_router_logits"] = True`` on the vLLM config."""
|
||||
|
||||
vllm_extra: dict[str, Any] = {}
|
||||
"""Extra arguments forwarded to vLLM. Applied as attributes on the vLLM namespace after config translation."""
|
||||
|
||||
# Launcher-only fields
|
||||
|
||||
deployment: InferenceDeploymentConfig = SingleNodeInferenceDeploymentConfig()
|
||||
@@ -432,7 +491,7 @@ class InferenceConfig(BaseConfig):
|
||||
@model_validator(mode="after")
|
||||
def validate_llmd_no_routed_experts(self):
|
||||
"""Reject routed-expert return with the llm-d router (breaks P/D, unverified for multi-node)."""
|
||||
if self.router is not None and self.router.type == "llm-d" and self.enable_return_routed_experts:
|
||||
if self.router is not None and self.router.type == "llm-d" and self.vllm.enable_return_routed_experts:
|
||||
raise ValueError(
|
||||
"The llm-d router backend does not support routed-expert return "
|
||||
"(enable_return_routed_experts): it breaks P/D and is unverified for multi-node. "
|
||||
@@ -458,10 +517,10 @@ class InferenceConfig(BaseConfig):
|
||||
@model_validator(mode="after")
|
||||
def auto_setup_kv_cache_offload(self):
|
||||
if self.kv_cache_offload is not None:
|
||||
if self.enable_prefix_caching is False:
|
||||
raise ValueError("KV cache offloading requires inference.enable_prefix_caching to be true.")
|
||||
if "enable_prefix_caching" not in self.model_fields_set:
|
||||
self.enable_prefix_caching = True
|
||||
if self.vllm.enable_prefix_caching is False:
|
||||
raise ValueError("KV cache offloading requires inference.vllm.enable_prefix_caching to be true.")
|
||||
if "enable_prefix_caching" not in self.vllm.model_fields_set:
|
||||
self.vllm.enable_prefix_caching = True
|
||||
|
||||
return self
|
||||
|
||||
@@ -470,19 +529,19 @@ class InferenceConfig(BaseConfig):
|
||||
"""Auto-configure inference for disaggregated P/D: enable EP and compute DP."""
|
||||
if self.deployment.type == "disaggregated":
|
||||
self.use_pd_kv_transfer = True
|
||||
if "enable_expert_parallel" not in self.model_fields_set:
|
||||
self.enable_expert_parallel = True
|
||||
if "enable_eplb" not in self.model_fields_set:
|
||||
self.enable_eplb = False
|
||||
if "enable_expert_parallel" not in self.vllm.model_fields_set:
|
||||
self.vllm.enable_expert_parallel = True
|
||||
if "enable_eplb" not in self.vllm.model_fields_set:
|
||||
self.vllm.enable_eplb = False
|
||||
gpus_per_node = self.deployment.gpus_per_node
|
||||
tp = self.parallel.tp
|
||||
tp = self.vllm.tensor_parallel_size
|
||||
dp_per_node = gpus_per_node // tp
|
||||
if self.data_parallel_size_local is None:
|
||||
self.data_parallel_size_local = dp_per_node
|
||||
if self.parallel.dp == 1:
|
||||
self.parallel.dp = dp_per_node
|
||||
if self.api_server_count == 1:
|
||||
self.api_server_count = dp_per_node
|
||||
if self.vllm.data_parallel_size_local is None:
|
||||
self.vllm.data_parallel_size_local = dp_per_node
|
||||
if self.vllm.data_parallel_size == 1:
|
||||
self.vllm.data_parallel_size = dp_per_node
|
||||
if self.vllm.api_server_count == 1:
|
||||
self.vllm.api_server_count = dp_per_node
|
||||
return self
|
||||
|
||||
@model_validator(mode="after")
|
||||
@@ -493,44 +552,6 @@ class InferenceConfig(BaseConfig):
|
||||
self.slurm.template_path = templates_dir / "inference.sbatch.j2"
|
||||
return self
|
||||
|
||||
@model_validator(mode="after")
|
||||
def auto_setup_max_lora_rank(self):
|
||||
"""Auto-setup max_lora_rank by rounding up to the nearest valid vLLM value.
|
||||
|
||||
vLLM only accepts specific values for max_lora_rank: (1, 8, 16, 32, 64, 128, 256, 320, 512).
|
||||
This validator ensures that any configured rank is rounded up to the minimum valid value
|
||||
that can serve adapters of the requested rank.
|
||||
"""
|
||||
if self.max_lora_rank is not None:
|
||||
original_rank = self.max_lora_rank
|
||||
for valid_rank in VALID_VLLM_LORA_RANKS:
|
||||
if valid_rank >= self.max_lora_rank:
|
||||
self.max_lora_rank = valid_rank
|
||||
break
|
||||
else:
|
||||
raise ValueError(f"max_lora_rank={original_rank} exceeds vLLM maximum of {VALID_VLLM_LORA_RANKS[-1]}")
|
||||
return self
|
||||
|
||||
@model_validator(mode="after")
|
||||
def auto_setup_api_server_count(self):
|
||||
"""
|
||||
Ensures that we have at least as many API servers as data parallel
|
||||
size. Unless LoRA is enabled, in which case only one API server is
|
||||
supported (vLLM limitation).
|
||||
"""
|
||||
if self.vllm_extra.get("headless", False):
|
||||
self.api_server_count = 0
|
||||
return self
|
||||
|
||||
if "api_server_count" not in self.model_fields_set:
|
||||
min_api_server_count = self.data_parallel_size_local or self.parallel.dp
|
||||
if self.api_server_count < min_api_server_count:
|
||||
self.api_server_count = min_api_server_count
|
||||
|
||||
if self.enable_lora:
|
||||
self.api_server_count = 1 # LoRA requires only one API server
|
||||
return self
|
||||
|
||||
def build_kv_transfer_config(self) -> dict[str, Any] | None:
|
||||
"""Build the single vLLM ``kv_transfer_config`` from the transfer + offload connectors.
|
||||
|
||||
@@ -560,90 +581,49 @@ class InferenceConfig(BaseConfig):
|
||||
"kv_connector_extra_config": {"connectors": connectors},
|
||||
}
|
||||
|
||||
def to_vllm(self) -> Namespace:
|
||||
"""Convert InferenceConfig to vLLM-compatible Namespace."""
|
||||
namespace = Namespace()
|
||||
to_vllm = {
|
||||
"server.host": "host",
|
||||
"server.port": "port",
|
||||
"server.liveness_timeout_seconds": "liveness_timeout_seconds",
|
||||
"model.name": "model",
|
||||
"model.dtype": "dtype",
|
||||
"model.max_model_len": "max_model_len",
|
||||
"model.enforce_eager": "enforce_eager",
|
||||
"model.trust_remote_code": "trust_remote_code",
|
||||
"model.chat_template": "chat_template",
|
||||
"model.tool_call_parser": "tool_call_parser",
|
||||
"model.reasoning_parser": "reasoning_parser",
|
||||
"model.rope_scaling": "rope_scaling",
|
||||
"parallel.tp": "tensor_parallel_size",
|
||||
"parallel.dp": "data_parallel_size",
|
||||
"data_parallel_size_local": "data_parallel_size_local",
|
||||
"data_parallel_rpc_port": "data_parallel_rpc_port",
|
||||
"enable_lora": "enable_lora",
|
||||
"enable_prefix_caching": "enable_prefix_caching",
|
||||
"max_loras": "max_loras",
|
||||
"max_cpu_loras": "max_cpu_loras",
|
||||
"max_lora_rank": "max_lora_rank",
|
||||
"lora_target_modules": "lora_target_modules",
|
||||
"gpu_memory_utilization": "gpu_memory_utilization",
|
||||
"quantization": "quantization",
|
||||
"api_server_count": "api_server_count",
|
||||
"enable_return_routed_experts": "enable_return_routed_experts",
|
||||
"enable_expert_parallel": "enable_expert_parallel",
|
||||
"all2all_backend": "all2all_backend",
|
||||
"enable_eplb": "enable_eplb",
|
||||
"enable_dbo": "enable_dbo",
|
||||
"seed": "seed",
|
||||
}
|
||||
# Fields vLLM rejects as None — omitted from the namespace so vLLM applies its
|
||||
# own default (e.g. quantization is inferred from the checkpoint).
|
||||
_OMIT_IF_NONE = frozenset(
|
||||
{"chat_template", "tool_call_parser", "reasoning_parser", "lora_target_modules", "quantization", "rope_scaling"}
|
||||
)
|
||||
|
||||
for config_key, vllm_key in to_vllm.items():
|
||||
value = rgetattr(self, config_key.replace("-", "_"))
|
||||
rsetattr(namespace, vllm_key, value)
|
||||
def to_namespace(self) -> Namespace:
|
||||
"""Dump the server + vllm sections into a vLLM-compatible Namespace."""
|
||||
namespace = Namespace(
|
||||
host=self.server.host,
|
||||
port=self.server.port,
|
||||
liveness_timeout_seconds=self.server.liveness_timeout_seconds,
|
||||
)
|
||||
|
||||
# Set `logprobs_mode` to `processed_logprobs` by default
|
||||
rsetattr(namespace, "logprobs_mode", "processed_logprobs")
|
||||
extra_fields = self.vllm.model_extra or {}
|
||||
for key in (*type(self.vllm).model_fields, *extra_fields):
|
||||
value = getattr(self.vllm, key)
|
||||
# None extras are dropped too: `--vllm.foo None` means "use vLLM's default".
|
||||
if value is None and (key in self._OMIT_IF_NONE or key in extra_fields):
|
||||
continue
|
||||
setattr(namespace, key, value)
|
||||
|
||||
# Auto tool choice is gated on a tool-call parser being resolved, unless
|
||||
# explicitly overridden.
|
||||
if "enable_auto_tool_choice" not in extra_fields:
|
||||
namespace.enable_auto_tool_choice = hasattr(namespace, "tool_call_parser")
|
||||
|
||||
# Default `logprobs_mode` to `processed_logprobs`
|
||||
if not hasattr(namespace, "logprobs_mode"):
|
||||
namespace.logprobs_mode = "processed_logprobs"
|
||||
|
||||
kv_transfer_config = self.build_kv_transfer_config()
|
||||
if kv_transfer_config is not None:
|
||||
rsetattr(namespace, "kv_transfer_config", kv_transfer_config)
|
||||
namespace.kv_transfer_config = kv_transfer_config
|
||||
|
||||
# Pass prime-rl-specific flags through vLLM's additional_config dict;
|
||||
# workers read these via get_current_vllm_config().additional_config.
|
||||
additional_config = getattr(namespace, "additional_config", None) or {}
|
||||
if self.enable_fp32_lm_head:
|
||||
existing = getattr(namespace, "additional_config", None) or {}
|
||||
existing["fp32_lm_head"] = True
|
||||
rsetattr(namespace, "additional_config", existing)
|
||||
additional_config["fp32_lm_head"] = True
|
||||
if self.enable_fp32_router_logits:
|
||||
existing = getattr(namespace, "additional_config", None) or {}
|
||||
existing["fp32_router_logits"] = True
|
||||
rsetattr(namespace, "additional_config", existing)
|
||||
|
||||
# Remove chat_template if not set (vLLM doesn't accept None)
|
||||
if namespace.chat_template is None:
|
||||
delattr(namespace, "chat_template")
|
||||
|
||||
# Remove tool_call_parser if not set (vLLM doesn't accept None) and gate
|
||||
# `enable_auto_tool_choice` on its presence.
|
||||
if namespace.tool_call_parser is None:
|
||||
delattr(namespace, "tool_call_parser")
|
||||
namespace.enable_auto_tool_choice = hasattr(namespace, "tool_call_parser")
|
||||
|
||||
# Remove reasoning_parser if not set (vLLM doesn't accept None)
|
||||
if namespace.reasoning_parser is None:
|
||||
delattr(namespace, "reasoning_parser")
|
||||
|
||||
# Remove lora_target_modules if not set (vLLM doesn't accept None)
|
||||
if hasattr(namespace, "lora_target_modules") and namespace.lora_target_modules is None:
|
||||
delattr(namespace, "lora_target_modules")
|
||||
|
||||
# Remove quantization if not set so vLLM can infer it from the checkpoint.
|
||||
if namespace.quantization is None:
|
||||
delattr(namespace, "quantization")
|
||||
|
||||
# Remove rope_scaling if not set (vLLM doesn't accept None)
|
||||
if hasattr(namespace, "rope_scaling"):
|
||||
if namespace.rope_scaling is None:
|
||||
delattr(namespace, "rope_scaling")
|
||||
additional_config["fp32_router_logits"] = True
|
||||
if additional_config:
|
||||
namespace.additional_config = additional_config
|
||||
|
||||
return namespace
|
||||
|
||||
@@ -4,7 +4,6 @@ from typing import Annotated, Any, Literal, TypeAlias
|
||||
import verifiers.v1 as vf
|
||||
from pydantic import Field, SerializeAsAny, model_validator
|
||||
from renderers import AutoRendererConfig, RendererConfig
|
||||
from verifiers.v1.configs.serve import PoolConfig
|
||||
|
||||
from prime_rl.configs.algorithm import (
|
||||
AlgoConfig,
|
||||
@@ -123,21 +122,6 @@ class EvalSamplingConfig(BaseConfig):
|
||||
return args
|
||||
|
||||
|
||||
class ServeConfig(BaseConfig):
|
||||
"""The subset of verifiers' ``ServeConfig`` a source configures — the worker pool
|
||||
and the per-worker bound. The launcher materializes it into the env server's full
|
||||
``[serve]`` block, filling in the source's derived address
|
||||
(``OrchestratorConfig.env_addresses``)."""
|
||||
|
||||
pool: PoolConfig = Field(default_factory=vf.ElasticPoolConfig)
|
||||
"""Worker-pool sizing. ``elastic`` (default) starts at one worker and scales up on
|
||||
demand; ``static`` pre-spawns a fixed ``num_workers``."""
|
||||
|
||||
max_concurrent: int | None = Field(None, ge=1)
|
||||
"""Episodes in flight per worker (None = unbounded; the dispatcher's
|
||||
``max_inflight_episodes`` is the run's bound)."""
|
||||
|
||||
|
||||
class EnvConfig(BaseConfig):
|
||||
"""One environment a run pulls from: the verifiers blocks it composes (``env`` — what
|
||||
runs, ``serve`` — how it's hosted, ``legacy`` — a classic v0 env instead) plus this
|
||||
@@ -146,8 +130,8 @@ class EnvConfig(BaseConfig):
|
||||
env: SerializeAsAny[vf.EnvConfig] = vf.SingleAgentEnvConfig()
|
||||
"""The verifiers environment — which env, its seed taskset, each agent, its knobs. Narrowed to the selected env's config class by the env id, else the taskset id."""
|
||||
|
||||
serve: ServeConfig = ServeConfig()
|
||||
"""How this source's env server is sized. Consumed by the launcher (which writes each source's env-server config), not by the orchestrator — the orchestrator only connects."""
|
||||
serve: vf.ServeConfig = vf.ServeConfig()
|
||||
"""How this source's env server is hosted. The sizing knobs are consumed by the launcher, which writes each source's env-server config with an unset ``address`` filled in as the derived ``tcp://127.0.0.1:<env_server_base_port + index>``. Setting ``address`` marks the server externally managed: the launchers neither write its env-server TOML nor spawn a server for it, and the orchestrator connects to the given address — e.g. a k8s deployment running env servers in their own pods."""
|
||||
|
||||
legacy: vf.LegacyEnvConfig = vf.LegacyEnvConfig()
|
||||
"""A classic (v0) environment to run through the bridge instead of ``env``."""
|
||||
@@ -301,6 +285,11 @@ class EvalConfig(BaseConfig):
|
||||
"""If True, skip the startup eval that otherwise runs before any
|
||||
train rollouts."""
|
||||
|
||||
retrigger_on_resume: bool = False
|
||||
"""If True, re-trigger evals at the checkpoint step on resume (e.g. after a
|
||||
crash that left in-flight evals unfinished). By default, assumes a clean
|
||||
exit where all evals already completed."""
|
||||
|
||||
@model_validator(mode="after")
|
||||
def resolve_env_defaults(self):
|
||||
"""Resolve per-env overrides: inherit group-level sampling, num_examples,
|
||||
@@ -530,7 +519,7 @@ class OrchestratorConfig(BaseConfig):
|
||||
"""Rate limit per environment worker, in tasks per minute. Recommended for sandbox-backed environments to prevent sandbox-not-ready errors during autoscaling. With multiple workers, the effective total rate is ``workers × this value``. None disables rate limiting."""
|
||||
|
||||
env_server_base_port: int = Field(5000, ge=1, le=65535)
|
||||
"""First port of the env-server port range: the source at position ``i`` (train, then eval) is served at ``tcp://127.0.0.1:<base + i>``. Give concurrent runs on one host distinct bases (e.g. one per multi-run orchestrator)."""
|
||||
"""First port of the env-server port range: the source at position ``i`` (train, then eval) is served at ``tcp://127.0.0.1:<base + i>``. Sources with an explicit ``serve.address`` keep it instead, without shifting the other sources' ports (indices stay positional). Give concurrent runs on one host distinct bases (e.g. one per multi-run orchestrator)."""
|
||||
|
||||
batch_size: int | None = Field(None, ge=1)
|
||||
"""Samples to train on per step (rollout-based batching). Set this OR ``token_batch_size``."""
|
||||
@@ -741,11 +730,13 @@ class OrchestratorConfig(BaseConfig):
|
||||
@property
|
||||
def env_addresses(self) -> dict[tuple[str, str], str]:
|
||||
"""Where each source's env server lives, keyed by ``(split, resolved_name)``:
|
||||
the source's own ``serve.address`` when set (an externally managed server), else
|
||||
``tcp://127.0.0.1:<port>`` with ports from ``env_server_base_port`` in
|
||||
``env_sources`` order. The launcher binds env servers at exactly these addresses
|
||||
and the orchestrator connects to them, so both sides agree from the config
|
||||
alone."""
|
||||
return {
|
||||
(split, source.resolved_name): f"tcp://127.0.0.1:{self.env_server_base_port + index}"
|
||||
(split, source.resolved_name): source.serve.address
|
||||
or f"tcp://127.0.0.1:{self.env_server_base_port + index}"
|
||||
for index, (split, source) in enumerate(self.env_sources)
|
||||
}
|
||||
|
||||
@@ -393,7 +393,11 @@ class RLConfig(BaseConfig):
|
||||
"Set weight_broadcast.type = 'filesystem'."
|
||||
)
|
||||
if self.weight_broadcast.type in ("nccl", "nixl"):
|
||||
inference_world_size = self.inference.parallel.dp * self.inference.parallel.tp if self.inference else 1
|
||||
inference_world_size = (
|
||||
self.inference.vllm.data_parallel_size * self.inference.vllm.tensor_parallel_size
|
||||
if self.inference
|
||||
else 1
|
||||
)
|
||||
common_config = dict(
|
||||
host=self.weight_broadcast.host,
|
||||
port=self.weight_broadcast.port,
|
||||
@@ -446,14 +450,14 @@ class RLConfig(BaseConfig):
|
||||
|
||||
@model_validator(mode="after")
|
||||
def validate_eplb_requires_quantized_weight_transfer(self):
|
||||
if self.inference is None or not self.inference.enable_eplb:
|
||||
if self.inference is None or not self.inference.vllm.enable_eplb:
|
||||
return self
|
||||
|
||||
# TODO(matej): check if weight reloading works itself before supporting EPLB without quantized transfer.
|
||||
trainer_weight_broadcast = self.trainer.weight_broadcast
|
||||
if trainer_weight_broadcast.type != "nccl" or not trainer_weight_broadcast.quantize_in_weight_transfer:
|
||||
raise ValueError(
|
||||
"inference.enable_eplb requires weight_broadcast.type = 'nccl' and "
|
||||
"inference.vllm.enable_eplb requires weight_broadcast.type = 'nccl' and "
|
||||
"weight_broadcast.quantize_in_weight_transfer = true."
|
||||
)
|
||||
|
||||
@@ -517,8 +521,8 @@ class RLConfig(BaseConfig):
|
||||
)
|
||||
|
||||
if self.inference is not None:
|
||||
self.inference.enable_lora = True
|
||||
self.inference.max_lora_rank = self.trainer.model.lora.rank
|
||||
self.inference.vllm.enable_lora = True
|
||||
self.inference.vllm.max_lora_rank = self.trainer.model.lora.rank
|
||||
else:
|
||||
warnings.warn(
|
||||
"LoRA is enabled, but inference is not configured. When manually starting the inference server, "
|
||||
@@ -532,12 +536,12 @@ class RLConfig(BaseConfig):
|
||||
def auto_setup_router_replay(self):
|
||||
if self.trainer.enable_router_replay:
|
||||
if self.inference is not None:
|
||||
if self.inference.enable_return_routed_experts is False:
|
||||
if self.inference.vllm.enable_return_routed_experts is False:
|
||||
warnings.warn(
|
||||
"Router replay is enabled, but inference.enable_return_routed_experts is False. Setting to True.",
|
||||
"Router replay is enabled, but inference.vllm.enable_return_routed_experts is False. Setting to True.",
|
||||
stacklevel=2,
|
||||
)
|
||||
self.inference.enable_return_routed_experts = True
|
||||
self.inference.vllm.enable_return_routed_experts = True
|
||||
else:
|
||||
warnings.warn(
|
||||
"Router replay is enabled, but inference is not configured. When manually starting the inference server, make sure to pass `--enable-return-routed-experts` to the vLLM server.",
|
||||
@@ -553,12 +557,12 @@ class RLConfig(BaseConfig):
|
||||
``trainer.enable_router_replay`` path, which sets the inference flag here
|
||||
(after InferenceConfig's own validators, which therefore miss it).
|
||||
"""
|
||||
if self.inference is not None and self.inference.enable_return_routed_experts:
|
||||
if self.inference is not None and self.inference.vllm.enable_return_routed_experts:
|
||||
router = self.inference.router
|
||||
if router is not None and router.type == "llm-d":
|
||||
raise ValueError(
|
||||
"The llm-d router backend does not support routed-expert return "
|
||||
"(inference.enable_return_routed_experts / trainer.enable_router_replay): it "
|
||||
"(inference.vllm.enable_return_routed_experts / trainer.enable_router_replay): it "
|
||||
"breaks P/D and is unverified for multi-node. Use router type 'vllm-router' "
|
||||
"for router-replay runs."
|
||||
)
|
||||
@@ -608,17 +612,17 @@ class RLConfig(BaseConfig):
|
||||
# fill up inference capacity with dp ranks
|
||||
if self.inference is not None:
|
||||
num_infer_gpus = self.deployment.num_infer_gpus
|
||||
if num_infer_gpus != self.inference.parallel.dp * self.inference.parallel.tp:
|
||||
assert num_infer_gpus % self.inference.parallel.tp == 0, (
|
||||
if num_infer_gpus != self.inference.vllm.data_parallel_size * self.inference.vllm.tensor_parallel_size:
|
||||
assert num_infer_gpus % self.inference.vllm.tensor_parallel_size == 0, (
|
||||
"Number of inference GPUs must be divisible by the tensor parallel size"
|
||||
)
|
||||
self.inference.parallel.dp = num_infer_gpus // self.inference.parallel.tp
|
||||
self.inference.vllm.data_parallel_size = num_infer_gpus // self.inference.vllm.tensor_parallel_size
|
||||
# Ensure api_server_count matches DP so all workers are created.
|
||||
# Without this, in-memory weight transfer expects dp*tp workers
|
||||
# but only api_server_count*tp exist, causing a deadlock.
|
||||
dp = self.inference.parallel.dp
|
||||
if self.inference.api_server_count < dp and not self.inference.enable_lora:
|
||||
self.inference.api_server_count = dp
|
||||
dp = self.inference.vllm.data_parallel_size
|
||||
if self.inference.vllm.api_server_count < dp and not self.inference.vllm.enable_lora:
|
||||
self.inference.vllm.api_server_count = dp
|
||||
|
||||
elif self.deployment.type == "multi_node": # multi-node
|
||||
self.orchestrator.num_train_workers = self.deployment.num_train_nodes * self.deployment.gpus_per_node
|
||||
@@ -635,35 +639,38 @@ class RLConfig(BaseConfig):
|
||||
|
||||
if (
|
||||
self.inference is not None
|
||||
and self.inference.enable_expert_parallel
|
||||
and self.inference.vllm.enable_expert_parallel
|
||||
and self.inference.deployment.type != "disaggregated"
|
||||
):
|
||||
inference_tp = self.inference.parallel.tp
|
||||
inference_tp = self.inference.vllm.tensor_parallel_size
|
||||
if self.deployment.gpus_per_node % inference_tp != 0:
|
||||
raise ValueError(
|
||||
"deployment.gpus_per_node must be divisible by inference.parallel.tp "
|
||||
"when inference.enable_expert_parallel is enabled in multi-node deployment."
|
||||
"deployment.gpus_per_node must be divisible by inference.vllm.tensor_parallel_size "
|
||||
"when inference.vllm.enable_expert_parallel is enabled in multi-node deployment."
|
||||
)
|
||||
|
||||
inferred_dp_local = self.deployment.gpus_per_node // inference_tp
|
||||
total_infer_gpus = self.deployment.infer_nodes_per_replica * self.deployment.gpus_per_node
|
||||
expected_global_world_size = self.inference.parallel.dp * inference_tp
|
||||
expected_global_world_size = self.inference.vllm.data_parallel_size * inference_tp
|
||||
if expected_global_world_size != total_infer_gpus:
|
||||
raise ValueError(
|
||||
"For multi-node expert parallel inference, inference.parallel.dp * inference.parallel.tp "
|
||||
"For multi-node expert parallel inference, inference.vllm.data_parallel_size * inference.vllm.tensor_parallel_size "
|
||||
f"must match total inference GPUs ({total_infer_gpus}), got {expected_global_world_size}."
|
||||
)
|
||||
|
||||
if self.inference.data_parallel_size_local is None:
|
||||
self.inference.data_parallel_size_local = inferred_dp_local
|
||||
elif self.inference.data_parallel_size_local != inferred_dp_local:
|
||||
if self.inference.vllm.data_parallel_size_local is None:
|
||||
self.inference.vllm.data_parallel_size_local = inferred_dp_local
|
||||
elif self.inference.vllm.data_parallel_size_local != inferred_dp_local:
|
||||
raise ValueError(
|
||||
"inference.data_parallel_size_local must equal deployment.gpus_per_node / inference.parallel.tp "
|
||||
f"({inferred_dp_local}) when inference.enable_expert_parallel is enabled in multi-node deployment."
|
||||
"inference.vllm.data_parallel_size_local must equal deployment.gpus_per_node / inference.vllm.tensor_parallel_size "
|
||||
f"({inferred_dp_local}) when inference.vllm.enable_expert_parallel is enabled in multi-node deployment."
|
||||
)
|
||||
|
||||
if not self.inference.enable_lora and self.inference.api_server_count == self.inference.parallel.dp:
|
||||
self.inference.api_server_count = inferred_dp_local
|
||||
if (
|
||||
not self.inference.vllm.enable_lora
|
||||
and self.inference.vllm.api_server_count == self.inference.vllm.data_parallel_size
|
||||
):
|
||||
self.inference.vllm.api_server_count = inferred_dp_local
|
||||
|
||||
# Auto-infer DP and api_server_count for standard multi-node inference.
|
||||
# Without EP, vLLM only creates api_server_count * tp workers per node,
|
||||
@@ -671,16 +678,16 @@ class RLConfig(BaseConfig):
|
||||
# more workers than exist, deadlocking in-memory transfer initialization.
|
||||
if (
|
||||
self.inference is not None
|
||||
and not self.inference.enable_expert_parallel
|
||||
and not self.inference.vllm.enable_expert_parallel
|
||||
and self.inference.deployment.type != "disaggregated"
|
||||
):
|
||||
dp_per_node = self.deployment.gpus_per_node // self.inference.parallel.tp
|
||||
if self.inference.parallel.dp == 1 and dp_per_node > 1:
|
||||
self.inference.parallel.dp = dp_per_node
|
||||
if self.inference.data_parallel_size_local is None and dp_per_node > 1:
|
||||
self.inference.data_parallel_size_local = dp_per_node
|
||||
if self.inference.api_server_count == 1 and dp_per_node > 1:
|
||||
self.inference.api_server_count = dp_per_node
|
||||
dp_per_node = self.deployment.gpus_per_node // self.inference.vllm.tensor_parallel_size
|
||||
if self.inference.vllm.data_parallel_size == 1 and dp_per_node > 1:
|
||||
self.inference.vllm.data_parallel_size = dp_per_node
|
||||
if self.inference.vllm.data_parallel_size_local is None and dp_per_node > 1:
|
||||
self.inference.vllm.data_parallel_size_local = dp_per_node
|
||||
if self.inference.vllm.api_server_count == 1 and dp_per_node > 1:
|
||||
self.inference.vllm.api_server_count = dp_per_node
|
||||
|
||||
if self.weight_broadcast is not None and self.weight_broadcast.type in ("nccl", "nixl"):
|
||||
# Every allocated inference GPU is an in-memory transfer worker.
|
||||
@@ -721,7 +728,7 @@ class RLConfig(BaseConfig):
|
||||
# External-LB: one admin client per DP rank, so roles expand per rank
|
||||
# (stride = dp_local = gpus_per_node / tp). ADMIN_URLS lists all prefill
|
||||
# ranks, then all decode ranks, per replica — match that order.
|
||||
stride = self.deployment.gpus_per_node // self.inference.parallel.tp
|
||||
stride = self.deployment.gpus_per_node // self.inference.vllm.tensor_parallel_size
|
||||
role_order = ["prefill"] * (infer_deploy.num_prefill_nodes * stride) + ["decode"] * (
|
||||
infer_deploy.num_decode_nodes * stride
|
||||
)
|
||||
|
||||
@@ -2,12 +2,17 @@ import re
|
||||
|
||||
# (regex, parser_name) — first match wins.
|
||||
TOOL_CALL_PARSER_PATTERNS: list[tuple[re.Pattern[str], str]] = [
|
||||
# Trinity-Large-Thinking uses the Qwen3-Coder tool format; the rest of the family is Hermes.
|
||||
(re.compile(r"^arcee-ai/Trinity-Large-Thinking"), "qwen3_coder"),
|
||||
(re.compile(r"^arcee-ai/Trinity-"), "hermes"),
|
||||
(re.compile(r"^deepseek-ai/DeepSeek-V3\.2"), "deepseek_v32"),
|
||||
(re.compile(r"^deepseek-ai/DeepSeek-V3\.1"), "deepseek_v31"),
|
||||
(re.compile(r"^zai-org/GLM-4\.5"), "glm45"),
|
||||
(re.compile(r"^zai-org/GLM-4\.7"), "glm47"),
|
||||
(re.compile(r"^zai-org/GLM-5"), "glm47"),
|
||||
(re.compile(r"^MiniMaxAI/MiniMax-M2"), "minimax_m2"),
|
||||
(re.compile(r"^openai/gpt-oss"), "openai"),
|
||||
(re.compile(r"^poolside/Laguna"), "poolside_v1"),
|
||||
(re.compile(r"^PrimeIntellect/INTELLECT-3"), "qwen3_coder"),
|
||||
(re.compile(r"^nvidia/NVIDIA-Nemotron-3"), "qwen3_coder"),
|
||||
(re.compile(r"^stepfun-ai/Step-3\.5"), "step3p5"),
|
||||
@@ -18,9 +23,13 @@ TOOL_CALL_PARSER_PATTERNS: list[tuple[re.Pattern[str], str]] = [
|
||||
]
|
||||
|
||||
REASONING_PARSER_PATTERNS: list[tuple[re.Pattern[str], str]] = [
|
||||
# Trinity-Large-Preview doesn't reason; the Thinking/Mini/Nano variants do.
|
||||
(re.compile(r"^arcee-ai/Trinity-(Large-Thinking|Mini|Nano)"), "deepseek_r1"),
|
||||
(re.compile(r"^deepseek-ai/DeepSeek-V3\.[12]"), "deepseek_r1"),
|
||||
(re.compile(r"^zai-org/GLM-"), "glm45"),
|
||||
(re.compile(r"^MiniMaxAI/MiniMax-M2"), "minimax_m2_append_think"),
|
||||
# openai/gpt-oss has no entry here — vLLM's harmony serving path splits reasoning natively.
|
||||
(re.compile(r"^poolside/Laguna"), "poolside_v1"),
|
||||
(re.compile(r"^PrimeIntellect/INTELLECT-3"), "deepseek_r1"),
|
||||
(re.compile(r"^nvidia/NVIDIA-Nemotron-3-Super"), "nemotron_v3"),
|
||||
(re.compile(r"^nvidia/NVIDIA-Nemotron-3-Nano"), "nano_v3"),
|
||||
|
||||
@@ -68,13 +68,12 @@ def propagate_shared_fields(data: Any) -> Any:
|
||||
propagate(
|
||||
"model.name",
|
||||
"trainer.model.name",
|
||||
"inference.model.name",
|
||||
"inference.vllm.model",
|
||||
"orchestrator.model.name",
|
||||
)
|
||||
propagate(
|
||||
"model.vlm",
|
||||
"trainer.model.vlm",
|
||||
"inference.model.vlm",
|
||||
"orchestrator.model.vlm",
|
||||
)
|
||||
|
||||
@@ -109,7 +108,7 @@ def propagate_shared_fields(data: Any) -> Any:
|
||||
# [file_monitor] leaf. (Bare empty ``[file_monitor]`` block enablement is at the end.)
|
||||
propagate("file_monitor.filename", "trainer.file_monitor.filename", "orchestrator.file_monitor.filename")
|
||||
|
||||
# [tokenizer]. ``chat_template`` also flows to ``inference.model`` (vLLM's
|
||||
# [tokenizer]. ``chat_template`` also flows to ``inference.vllm`` (vLLM's
|
||||
# ``--chat-template``); ``name`` and ``trust_remote_code`` can legitimately
|
||||
# differ between sub-configs (auto-derived from model names, which may
|
||||
# differ for FP8-quantized inference variants).
|
||||
@@ -123,7 +122,7 @@ def propagate_shared_fields(data: Any) -> Any:
|
||||
"tokenizer.chat_template",
|
||||
"trainer.tokenizer.chat_template",
|
||||
"orchestrator.tokenizer.chat_template",
|
||||
"inference.model.chat_template",
|
||||
"inference.vllm.chat_template",
|
||||
)
|
||||
|
||||
# [rollout_transport] → both sub-configs (host is launcher-injected for zmq multi-node).
|
||||
@@ -155,7 +154,7 @@ def propagate_shared_fields(data: Any) -> Any:
|
||||
conflicts.append(("output_dir", sub))
|
||||
fill(sub, expected_value)
|
||||
|
||||
# Cascade trainer.tokenizer.chat_template → inference.model.chat_template
|
||||
# Cascade trainer.tokenizer.chat_template → inference.vllm.chat_template
|
||||
# (vLLM ``--chat-template``). Read trainer's value *after* the shared
|
||||
# propagation above so we cover both:
|
||||
# - shared ``[tokenizer] chat_template`` (already filled all three above,
|
||||
@@ -165,7 +164,7 @@ def propagate_shared_fields(data: Any) -> Any:
|
||||
# would otherwise complain about the missing inference value).
|
||||
trainer_chat_template = get("trainer.tokenizer.chat_template")
|
||||
if trainer_chat_template is not None:
|
||||
fill("inference.model.chat_template", trainer_chat_template)
|
||||
fill("inference.vllm.chat_template", trainer_chat_template)
|
||||
|
||||
# Bare ``[ckpt]`` / ``[wandb]`` block: presence-only signal that enables
|
||||
# the section with defaults on both sub-configs. Necessary because
|
||||
@@ -225,9 +224,9 @@ def validate_shared_model_name(
|
||||
) -> None:
|
||||
# Orchestrator must match inference (it queries the inference server)
|
||||
if inference is not None:
|
||||
if inference.model.name != orchestrator.model.name:
|
||||
if inference.vllm.model != orchestrator.model.name:
|
||||
raise ValueError(
|
||||
f"Inference model name ({inference.model.name}) and orchestrator model name ({orchestrator.model.name}) are not the same. "
|
||||
f"Inference model name ({inference.vllm.model}) and orchestrator model name ({orchestrator.model.name}) are not the same. "
|
||||
"The orchestrator queries the inference server and must use the same model name."
|
||||
)
|
||||
return
|
||||
@@ -310,9 +309,9 @@ def validate_shared_tokenizer(
|
||||
f"Use the shared [tokenizer] config to set chat_template for both."
|
||||
)
|
||||
if inference is not None:
|
||||
if trainer.tokenizer.chat_template != inference.model.chat_template:
|
||||
if trainer.tokenizer.chat_template != inference.vllm.chat_template:
|
||||
raise ValueError(
|
||||
f"Inference chat_template ({inference.model.chat_template!r}) does not match "
|
||||
f"Inference chat_template ({inference.vllm.chat_template!r}) does not match "
|
||||
f"the shared tokenizer chat_template ({trainer.tokenizer.chat_template!r}). "
|
||||
f"Use the shared [tokenizer] config to set chat_template for all components."
|
||||
)
|
||||
|
||||
+20
-6
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "prime-rl"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
description = "Async RL Training at Scale"
|
||||
readme = "README.md"
|
||||
requires-python = "~=3.12.0"
|
||||
@@ -33,7 +33,7 @@ dependencies = [
|
||||
"setproctitle>=1.3.0",
|
||||
"uvloop>=0.21.0",
|
||||
"torchtitan",
|
||||
"verifiers[harbor]>=0.2.2.dev76",
|
||||
"verifiers[harbor]>=0.3.0",
|
||||
"renderers",
|
||||
"dion",
|
||||
"tilelang>=0.1.8",
|
||||
@@ -59,8 +59,13 @@ env-server = "prime_rl.entrypoints.env_server:main"
|
||||
prime_rl = "prime_rl.inference.patches:apply_shared_vllm_patches"
|
||||
|
||||
[project.optional-dependencies]
|
||||
# Both wheels are the same flash-attn 2.8.3 / cu128 / torch 2.11 / cp312 build and carry
|
||||
# sm_80 / sm_90 / sm_100 / sm_120 cubins. `attn="auto"` picks FA4 on sm_100 and FA3 on
|
||||
# sm_90, so FA2 is the resolved backend on sm_120 (see `_resolve_attn_impl` in
|
||||
# trainer/model.py).
|
||||
flash-attn = [
|
||||
"flash-attn @ 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 ; platform_machine == 'x86_64'",
|
||||
"flash-attn @ https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.22/flash_attn-2.8.3+cu128torch2.11-cp312-cp312-linux_aarch64.whl ; platform_machine == 'aarch64'",
|
||||
]
|
||||
flash-attn-3 = ["flash_attn_3"]
|
||||
|
||||
@@ -123,13 +128,22 @@ override-dependencies = [
|
||||
"openenv-core",
|
||||
]
|
||||
|
||||
# Environment packages (research-environments + verifiers) are auto-discovered as
|
||||
# workspace members, so new envs need no per-package registration. Install them
|
||||
# with `uv sync --all-packages`.
|
||||
# research-environments packages are auto-discovered as workspace members, so new
|
||||
# envs there need no per-package registration. verifiers' example envs are opt-in:
|
||||
# only the ones prime-rl trains or tests on are listed, so an upstream example with
|
||||
# conflicting pins can't break the shared lock. Install them with
|
||||
# `uv sync --all-packages`.
|
||||
[tool.uv.workspace]
|
||||
members = [
|
||||
"deps/research-environments/environments/*/*",
|
||||
"deps/verifiers/environments/*",
|
||||
"deps/verifiers/environments/alphabet_sort_v1",
|
||||
"deps/verifiers/environments/color_codeword_v1",
|
||||
"deps/verifiers/environments/gsm8k_v1",
|
||||
"deps/verifiers/environments/kuhn_poker_v1",
|
||||
"deps/verifiers/environments/proposer_solver_v1",
|
||||
"deps/verifiers/environments/reverse_text_v1",
|
||||
"deps/verifiers/environments/wiki_search_v1",
|
||||
"deps/verifiers/environments/wordle_v1",
|
||||
]
|
||||
# tau2-synth-v1 and tau3-bench-v1 pin `tau2` forks/revs that conflict with the
|
||||
# canonical tau2-bench-v1; a workspace shares one lock, so these can't coexist.
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
# arm64 post-install fixups: rebuild flash-attn from source for the target GPU.
|
||||
#
|
||||
# Why this exists: pyproject.toml sets FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE to keep
|
||||
# `uv sync` fast; on x86_64 it pins a prebuilt wheel to fill in the binary, but no
|
||||
# such wheel exists for aarch64. Without this script, `import flash_attn` fails on
|
||||
# aarch64 with `ModuleNotFoundError: No module named 'flash_attn_2_cuda'`.
|
||||
#
|
||||
# Defaults preserve the existing Docker behavior (sm_100 / GB200). On a host with
|
||||
# `nvidia-smi` available, the compute capability is auto-detected from the local
|
||||
# GPU. Override via env vars if needed:
|
||||
# TORCH_CUDA_ARCH_LIST e.g. 9.0 (Hopper), 10.0 (Blackwell)
|
||||
# VENV_PATH path to the venv (default: $(pwd)/.venv)
|
||||
# MAX_JOBS parallel nvcc jobs (default: 4)
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z "${TORCH_CUDA_ARCH_LIST:-}" ]; then
|
||||
# Try to detect from the local GPU. Tolerate any failure mode (binary missing,
|
||||
# driver not loaded, Docker buildx without --gpus) and fall back to GB200.
|
||||
TORCH_CUDA_ARCH_LIST="$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader 2>/dev/null | head -1 | tr -d ' ' || true)"
|
||||
: "${TORCH_CUDA_ARCH_LIST:=10.0}"
|
||||
fi
|
||||
export TORCH_CUDA_ARCH_LIST
|
||||
|
||||
VENV_PATH="${VENV_PATH:-$(pwd)/.venv}"
|
||||
if [ ! -x "$VENV_PATH/bin/python" ]; then
|
||||
echo "ERROR: no python at $VENV_PATH/bin/python. Run from the project root or set VENV_PATH." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export MAX_JOBS="${MAX_JOBS:-4}"
|
||||
export FLASH_ATTENTION_FORCE_BUILD=TRUE
|
||||
export FLASH_ATTENTION_SKIP_CUDA_BUILD=FALSE
|
||||
|
||||
echo "=== building flash-attn from source (TORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST, MAX_JOBS=$MAX_JOBS) ==="
|
||||
echo " target venv: $VENV_PATH"
|
||||
# Run from /tmp so uv ignores the project's [tool.uv.extra-build-variables],
|
||||
# which sets FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE and would prevent kernel compilation.
|
||||
(cd /tmp && uv pip install --python "$VENV_PATH/bin/python" \
|
||||
"flash-attn==2.8.3" --no-build-isolation --no-binary flash-attn --no-cache --reinstall-package flash-attn)
|
||||
|
||||
echo "=== reinstalling flash-attn-cute (flash-attn overwrites it with a stub) ==="
|
||||
uv pip install --python "$VENV_PATH/bin/python" --reinstall --no-deps \
|
||||
"flash-attn-4 @ git+https://github.com/Dao-AILab/flash-attention.git@96bd151#subdirectory=flash_attn/cute"
|
||||
@@ -143,16 +143,6 @@ main() {
|
||||
log_info "Installing pre-commit hooks..."
|
||||
uv run pre-commit install
|
||||
|
||||
# aarch64 has no prebuilt flash-attn wheel; build it from source for the local GPU.
|
||||
# Without this, `import flash_attn` fails with `ModuleNotFoundError: flash_attn_2_cuda`.
|
||||
# Run last so no subsequent uv operation (which implicitly syncs against the lockfile)
|
||||
# rebuilds flash-attn from PyPI with FLASH_ATTENTION_SKIP_CUDA_BUILD=TRUE and undoes this.
|
||||
if [ "$(uname -m)" = "aarch64" ]; then
|
||||
log_info "aarch64 detected: building flash-attn from source (this takes 20-30 minutes)..."
|
||||
log_warn "Future 'uv sync --all-extras' or 'uv run' will remove this build. Use 'uv sync --inexact' or 'uv run --no-sync' to keep it."
|
||||
bash scripts/docker-arm64-post-install.sh
|
||||
fi
|
||||
|
||||
log_info "Installation completed!"
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ uv run rl @ base.toml --trainer @ trainer.toml --trainer.lr 1e-3 # mix
|
||||
|
||||
Resolution order: CLI > config files (left-to-right) > class defaults. Merging is deep — unset fields in an overlay are preserved from the base.
|
||||
|
||||
Naming: CLI uses kebab-case (`--model.max-model-len`); TOML uses snake_case (`max_model_len`).
|
||||
Naming: CLI uses kebab-case (`--vllm.max-model-len`); TOML uses snake_case (`max_model_len`).
|
||||
|
||||
## Inspect & validate
|
||||
|
||||
@@ -38,7 +38,7 @@ Incompatible combinations (e.g. CP requires flash attention) must raise in a `mo
|
||||
|
||||
**Booleans** — CLI `--flag` / `--no-flag`; TOML must be explicit (`enforce_eager = true`).
|
||||
|
||||
**None** — TOML has no null, use the string `"None"` (`max_model_len = "None"`); CLI: `--model.max-model-len None`.
|
||||
**None** — TOML has no null, use the string `"None"` (`max_model_len = "None"`); CLI: `--vllm.max-model-len None`.
|
||||
|
||||
**Lists** — TOML uses array of tables; later config files replace lists wholesale, so overlays must include the full desired list:
|
||||
|
||||
@@ -71,7 +71,9 @@ type = "subprocess"
|
||||
|
||||
CLI: `--orchestrator.train.source.0.env.taskset.id reverse-text-v1` or `--orchestrator.eval.source.0.env.taskset.id reverse-text-v1`.
|
||||
|
||||
**Dicts** — TOML uses a section; CLI takes a JSON string: `--vllm-extra '{"key1": "value1"}'`. This works for plain `dict` fields only — nested pydantic-model fields (e.g. `algo`) reject JSON strings; use dotted keys (`--orchestrator.algo.type max_rl`) or a TOML overlay file.
|
||||
**Dicts** — TOML uses a section; CLI takes a JSON string: `--trainer.env-vars '{"key1": "value1"}'`. This works for plain `dict` fields only — nested pydantic-model fields (e.g. `algo`) reject JSON strings; use dotted keys (`--orchestrator.algo.type max_rl`) or a TOML overlay file.
|
||||
|
||||
**vLLM pass-through** — `[inference.vllm]` uses vLLM's own argument names (`model`, `tensor_parallel_size`, `data_parallel_size`, `max_model_len`, ...) and forwards *any* key to the vLLM server, typed by prime-rl or not: `[inference.vllm] max_num_seqs = 256`, or `--inference.vllm.max-num-seqs 256` on the CLI. CLI values are JSON-coerced, so dict-valued vLLM args work as `--inference.vllm.compilation-config '{"cudagraph_mode": "NONE"}'`. Non-vLLM knobs (router, deployment, weight broadcast, kv-cache offload, env vars) stay on `[inference]` itself.
|
||||
|
||||
**Discriminated unions** — set the `type` field to pick the variant (`[orchestrator.algo] type = "max_rl"`). Omit `type` to keep the default variant.
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ uv sync --all-extras --all-packages # + all env packages (needed to train
|
||||
uv sync --package prime-rl --package gsm8k-v1 # core + just one env
|
||||
```
|
||||
|
||||
Environment packages under `deps/research-environments/environments/*/*` and `deps/verifiers/environments/*` are uv **workspace members**, auto-discovered — adding a new env needs no `pyproject.toml` change. They are opt-in: a plain `uv sync` / `--all-extras` does not install them (and would remove them if already present — re-run with `--all-packages`, or `--inexact` to keep them). Install all with `--all-packages`, or a subset with repeated `--package <env>` (include `--package prime-rl` to keep the core). If two envs pin conflicting transitive versions (all members share one lock), add the loser to `[tool.uv.workspace].exclude`.
|
||||
Environment packages are uv **workspace members**. Those under `deps/research-environments/environments/*/*` are auto-discovered — adding a new env there needs no `pyproject.toml` change. verifiers' example envs are enumerated explicitly in `[tool.uv.workspace].members` (only the ones prime-rl trains or tests on) — to use another, add its path to the list. Members are opt-in: a plain `uv sync` / `--all-extras` does not install them (and would remove them if already present — re-run with `--all-packages`, or `--inexact` to keep them). Install all with `--all-packages`, or a subset with repeated `--package <env>` (include `--package prime-rl` to keep the core). If two envs pin conflicting transitive versions (all members share one lock), add the loser to `[tool.uv.workspace].exclude`.
|
||||
|
||||
When bumping a package past the workspace-wide `exclude-newer = "7 days"` window, add it (and any newly-required transitives) to `[tool.uv.exclude-newer-package]` before refreshing `uv.lock`.
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ uv run sft @ examples/basic/reverse-text/sft.toml --dry-run
|
||||
OpenAI-compatible API plus prime-rl custom endpoints (`/update_weights`, `/load_lora_adapter`, `/init_broadcaster`). Always use this entrypoint — never `vllm serve` directly. It starts a `vllm-router` on `server.port` (default 8000, the client-facing URL) fronting the engine on `backend_port` (default 8100); admin endpoints must target the engine port directly.
|
||||
|
||||
```bash
|
||||
uv run inference --model.name Qwen/Qwen3-0.6B
|
||||
uv run inference --model.name Qwen/Qwen3-0.6B --model.enforce-eager
|
||||
uv run inference --vllm.model Qwen/Qwen3-0.6B
|
||||
uv run inference --vllm.model Qwen/Qwen3-0.6B --vllm.enforce-eager
|
||||
```
|
||||
|
||||
Smoke checks:
|
||||
|
||||
@@ -64,7 +64,7 @@ def write_slurm_script(config: InferenceConfig, config_path: Path, script_path:
|
||||
template = env.get_template(config.slurm.template_path.name)
|
||||
|
||||
is_disaggregated = config.deployment.type == "disaggregated"
|
||||
dp_per_node = config.deployment.gpus_per_node // config.parallel.tp
|
||||
dp_per_node = config.deployment.gpus_per_node // config.vllm.tensor_parallel_size
|
||||
|
||||
offload = config.kv_cache_offload
|
||||
is_mooncake = offload is not None and offload.type == "mooncake"
|
||||
@@ -100,7 +100,7 @@ def write_slurm_script(config: InferenceConfig, config_path: Path, script_path:
|
||||
num_decode_replicas=config.deployment.num_decode_replicas,
|
||||
prefill_port=config.deployment.prefill_port,
|
||||
decode_port=config.deployment.decode_port,
|
||||
data_parallel_rpc_port=config.data_parallel_rpc_port,
|
||||
data_parallel_rpc_port=config.vllm.data_parallel_rpc_port,
|
||||
use_deep_gemm=config.use_deep_gemm,
|
||||
prefill_env_vars=config.deployment.prefill_env_vars,
|
||||
decode_env_vars=config.deployment.decode_env_vars,
|
||||
@@ -110,8 +110,8 @@ def write_slurm_script(config: InferenceConfig, config_path: Path, script_path:
|
||||
elif is_multi_node:
|
||||
template_vars.update(
|
||||
backend_port=config.backend_port,
|
||||
data_parallel_rpc_port=config.data_parallel_rpc_port,
|
||||
enable_expert_parallel=config.enable_expert_parallel,
|
||||
data_parallel_rpc_port=config.vllm.data_parallel_rpc_port,
|
||||
enable_expert_parallel=config.vllm.enable_expert_parallel,
|
||||
infer_nodes_per_replica=config.deployment.num_nodes,
|
||||
)
|
||||
|
||||
@@ -170,7 +170,7 @@ def start_router(config: InferenceConfig) -> subprocess.Popen:
|
||||
"--worker-urls",
|
||||
f"http://{worker_host}:{config.backend_port}",
|
||||
"--intra-node-data-parallel-size",
|
||||
str(config.data_parallel_size_local or config.parallel.dp),
|
||||
str(config.vllm.data_parallel_size_local or config.vllm.data_parallel_size),
|
||||
"--request-id-headers",
|
||||
"x-session-id",
|
||||
"--worker-startup-timeout-secs",
|
||||
@@ -222,7 +222,7 @@ def inference_local(config: InferenceConfig):
|
||||
from prime_rl.inference.vllm.server import server # pyright: ignore
|
||||
|
||||
try:
|
||||
server(config, vllm_extra=config.vllm_extra)
|
||||
server(config)
|
||||
finally:
|
||||
if router_process is not None:
|
||||
router_stopping.set()
|
||||
|
||||
@@ -49,14 +49,24 @@ ENVS_DIR = "envs"
|
||||
|
||||
|
||||
def env_servers(config: RLConfig) -> list[tuple[str, EnvConfig, str]]:
|
||||
"""``(split, source, address)`` for every train/eval source. The launcher runs one
|
||||
env server per source at its deterministic address; the orchestrator connects there."""
|
||||
"""``(split, source, address)`` for every launcher-managed train/eval source. The
|
||||
launcher runs one env server per source at its deterministic address; the
|
||||
orchestrator connects there. A source with ``serve.address`` set is externally
|
||||
managed — its server runs elsewhere and only the orchestrator connects to it — so
|
||||
the launcher neither writes its TOML nor spawns a server for it."""
|
||||
addresses = config.orchestrator.env_addresses
|
||||
return [
|
||||
(split, source, addresses[(split, source.resolved_name)]) for split, source in config.orchestrator.env_sources
|
||||
(split, source, addresses[(split, source.resolved_name)])
|
||||
for split, source in config.orchestrator.env_sources
|
||||
if source.serve.address is None
|
||||
]
|
||||
|
||||
|
||||
def env_server_names(config: RLConfig, split: str) -> list[str]:
|
||||
"""Names of the launcher-managed env servers for one split."""
|
||||
return [source.resolved_name for source_split, source, _ in env_servers(config) if source_split == split]
|
||||
|
||||
|
||||
def get_physical_gpu_ids() -> list[int]:
|
||||
"""Return physical GPU IDs visible to the launcher."""
|
||||
raw_visible = os.environ.get("CUDA_VISIBLE_DEVICES")
|
||||
@@ -93,9 +103,10 @@ def write_subconfigs(config: RLConfig, output_dir: Path) -> None:
|
||||
with open(output_dir / INFERENCE_TOML, "wb") as f:
|
||||
tomli_w.dump(inference_dict, f)
|
||||
|
||||
# One EnvServerConfig TOML per source: `env-server @ <path>` binds at the source's
|
||||
# deterministic address, where the orchestrator connects. The source's env/serve/legacy
|
||||
# blocks carry over; its other knobs (sampling, algo, name, ...) are orchestrator-side.
|
||||
# One EnvServerConfig TOML per launcher-managed source: `env-server @ <path>` binds
|
||||
# at the source's deterministic address, where the orchestrator connects. The source's
|
||||
# env/serve/legacy blocks carry over; its other knobs (sampling, algo, name, ...) are
|
||||
# orchestrator-side.
|
||||
for split, source, address in env_servers(config):
|
||||
env_dir = output_dir / ENVS_DIR / split
|
||||
env_dir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -453,10 +464,9 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) ->
|
||||
else {}
|
||||
)
|
||||
|
||||
# Env servers launch next to the orchestrator, one per train/eval source.
|
||||
sources = config.orchestrator.env_sources
|
||||
train_env_names = [source.resolved_name for split, source in sources if split == "train"]
|
||||
eval_env_names = [source.resolved_name for split, source in sources if split == "eval"]
|
||||
# Env servers launch next to the orchestrator, one per launcher-managed train/eval source.
|
||||
train_env_names = env_server_names(config, "train")
|
||||
eval_env_names = env_server_names(config, "eval")
|
||||
|
||||
if config.deployment.type == "single_node":
|
||||
script = template.render(
|
||||
@@ -489,8 +499,8 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) ->
|
||||
router_port=config.inference.server.port,
|
||||
prefill_port=infer_deploy.prefill_port,
|
||||
decode_port=infer_deploy.decode_port,
|
||||
inference_tp=config.inference.parallel.tp,
|
||||
inference_data_parallel_rpc_port=config.inference.data_parallel_rpc_port,
|
||||
inference_tp=config.inference.vllm.tensor_parallel_size,
|
||||
inference_data_parallel_rpc_port=config.inference.vllm.data_parallel_rpc_port,
|
||||
use_deep_gemm=config.inference.use_deep_gemm,
|
||||
prefill_env_vars=infer_deploy.prefill_env_vars,
|
||||
decode_env_vars=infer_deploy.decode_env_vars,
|
||||
@@ -499,7 +509,7 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) ->
|
||||
inference_env_vars=inference_env_vars,
|
||||
prefill_vllm_extra_json=vllm_overrides_fragment(infer_deploy.prefill_vllm_overrides),
|
||||
decode_vllm_extra_json=vllm_overrides_fragment(infer_deploy.decode_vllm_overrides),
|
||||
dp_per_node=config.deployment.gpus_per_node // config.inference.parallel.tp,
|
||||
dp_per_node=config.deployment.gpus_per_node // config.inference.vllm.tensor_parallel_size,
|
||||
**mooncake_vars,
|
||||
use_nccl_broadcast=config.weight_broadcast is not None and config.weight_broadcast.type == "nccl",
|
||||
use_zmq_transport=config.rollout_transport is not None and config.rollout_transport.type == "zmq",
|
||||
@@ -524,10 +534,16 @@ def write_slurm_script(config: RLConfig, config_dir: Path, script_path: Path) ->
|
||||
router_port=config.inference.server.port if config.inference else 8000,
|
||||
infer_nodes_per_replica=config.deployment.infer_nodes_per_replica,
|
||||
backend_port=config.inference.backend_port if config.inference else 8100,
|
||||
inference_tp=config.inference.parallel.tp if config.inference else 1,
|
||||
inference_enable_expert_parallel=config.inference.enable_expert_parallel if config.inference else False,
|
||||
inference_data_parallel_rpc_port=config.inference.data_parallel_rpc_port if config.inference else 29600,
|
||||
dp_per_node=(config.deployment.gpus_per_node // config.inference.parallel.tp) if config.inference else 1,
|
||||
inference_tp=config.inference.vllm.tensor_parallel_size if config.inference else 1,
|
||||
inference_enable_expert_parallel=config.inference.vllm.enable_expert_parallel
|
||||
if config.inference
|
||||
else False,
|
||||
inference_data_parallel_rpc_port=config.inference.vllm.data_parallel_rpc_port
|
||||
if config.inference
|
||||
else 29600,
|
||||
dp_per_node=(config.deployment.gpus_per_node // config.inference.vllm.tensor_parallel_size)
|
||||
if config.inference
|
||||
else 1,
|
||||
**mooncake_vars,
|
||||
use_nccl_broadcast=config.weight_broadcast is not None and config.weight_broadcast.type == "nccl",
|
||||
use_zmq_transport=config.rollout_transport is not None and config.rollout_transport.type == "zmq",
|
||||
@@ -558,10 +574,8 @@ def rl_slurm(config: RLConfig):
|
||||
write_config(config, config_dir, exclude={"slurm", "dry_run", "clean_output_dir"})
|
||||
logger.info(f"Wrote config to {config_dir / RL_TOML}")
|
||||
|
||||
train_env_names = [env.resolved_name for env in config.orchestrator.train.source]
|
||||
eval_env_names = (
|
||||
[source.resolved_name for source in config.orchestrator.eval.source] if config.orchestrator.eval else []
|
||||
)
|
||||
train_env_names = env_server_names(config, "train")
|
||||
eval_env_names = env_server_names(config, "eval")
|
||||
|
||||
log_message = format_log_message(
|
||||
log_dir=log_dir,
|
||||
@@ -575,10 +589,8 @@ def rl_slurm(config: RLConfig):
|
||||
write_subconfigs(config, config_dir)
|
||||
logger.info(f"Wrote subconfigs to {config_dir}")
|
||||
|
||||
train_env_names = [env.resolved_name for env in config.orchestrator.train.source]
|
||||
eval_env_names = (
|
||||
[source.resolved_name for source in config.orchestrator.eval.source] if config.orchestrator.eval else []
|
||||
)
|
||||
train_env_names = env_server_names(config, "train")
|
||||
eval_env_names = env_server_names(config, "eval")
|
||||
|
||||
has_infer = config.deployment.infer_nodes_per_replica > 0
|
||||
log_message = format_log_message(
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import torch
|
||||
|
||||
from prime_rl.inference.vllm.padded_input_scrub import monkey_patch_vllm_padded_input_scrub
|
||||
|
||||
|
||||
def apply_shared_vllm_patches():
|
||||
"""vLLM general plugin: prime-rl patches that must run in every vLLM process.
|
||||
@@ -16,7 +14,6 @@ def apply_shared_vllm_patches():
|
||||
monkey_patch_nano_v3_reasoning_parser()
|
||||
monkey_patch_qwen3_coder_param_newline_trim()
|
||||
monkey_patch_minimax_m2_think_end_passthrough()
|
||||
monkey_patch_vllm_padded_input_scrub()
|
||||
monkey_patch_return_routed_experts_with_nixl_connector()
|
||||
monkey_patch_kv_xfer_finished_tolerate_freed()
|
||||
monkey_patch_online_fp8_parameter_cast()
|
||||
|
||||
@@ -10,14 +10,10 @@ def setup_vllm_env(config: InferenceConfig):
|
||||
# spawn is more robust in vLLM nightlies and Qwen3-VL (fork can deadlock with multithreaded processes)
|
||||
os.environ.setdefault("VLLM_WORKER_MULTIPROC_METHOD", "spawn")
|
||||
|
||||
# Force the V1 GPU model runner. vLLM 0.24.0 routes Llama/Mistral/Qwen3 plus MoE archs
|
||||
# (DeepseekV2, Qwen2Moe, GraniteMoe; the 0.23 MoE/quantized guard was removed) to the
|
||||
# V2 runner, which has no `_preprocess` hook for our padded-input scrub (see
|
||||
# inference/vllm/padded_input_scrub.py) and doesn't zero the padded decode tail
|
||||
# itself; that stale tail poisons CUDA-graph replay as NaN logits (reproduced on
|
||||
# Nemotron-Nano SWE, PR #2506; upstream fix vllm#42779 is still unmerged). V1 keeps
|
||||
# the scrub effective for every model and is also required for routed-experts capture
|
||||
# (the NIXL PD path rejects V2). setdefault so it stays overridable.
|
||||
# Force the V1 GPU model runner. vLLM routes Llama/Mistral/Qwen3 plus MoE archs
|
||||
# (DeepseekV2, Qwen2Moe, GraniteMoe) to the V2 runner by default, but V2 doesn't
|
||||
# support routed-experts capture (the NIXL PD path rejects it). setdefault so it
|
||||
# stays overridable.
|
||||
os.environ.setdefault("VLLM_USE_V2_MODEL_RUNNER", "0")
|
||||
|
||||
# vLLM 0.24.0 flipped VLLM_ENFORCE_STRICT_TOOL_CALLING's default to True, which
|
||||
@@ -30,7 +26,7 @@ def setup_vllm_env(config: InferenceConfig):
|
||||
os.environ["VLLM_USE_DEEP_GEMM"] = deep_gemm_enabled
|
||||
os.environ["VLLM_MOE_USE_DEEP_GEMM"] = deep_gemm_enabled
|
||||
|
||||
if config.enable_lora:
|
||||
if config.vllm.enable_lora:
|
||||
os.environ["VLLM_ALLOW_RUNTIME_LORA_UPDATING"] = "True"
|
||||
|
||||
if config.log.json_logging:
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import threading
|
||||
from collections.abc import Sequence
|
||||
from typing import Any
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
_INSTALL_LOCK = threading.Lock()
|
||||
_INSTALLED = False
|
||||
|
||||
|
||||
def monkey_patch_vllm_padded_input_scrub() -> None:
|
||||
"""Zero vLLM's padded model inputs before graph replay.
|
||||
|
||||
vLLM pads decode batches up to CUDA graph capture sizes. Some kernels read
|
||||
model-input tensors past the scheduled-token prefix, so stale values in the
|
||||
padded tail can affect replayed decode graphs. Keep this shim until the
|
||||
vLLM-side fix is available in the pinned runtime.
|
||||
|
||||
Remove this patch once https://github.com/vllm-project/vllm/pull/42779 is
|
||||
included in the vLLM release we pin/use.
|
||||
"""
|
||||
global _INSTALLED
|
||||
with _INSTALL_LOCK:
|
||||
if _INSTALLED:
|
||||
return
|
||||
|
||||
from vllm.v1.worker.gpu_model_runner import GPUModelRunner
|
||||
|
||||
if getattr(GPUModelRunner, "_prime_rl_padded_input_scrub", False):
|
||||
_INSTALLED = True
|
||||
return
|
||||
|
||||
original_preprocess = GPUModelRunner._preprocess
|
||||
|
||||
def _patched_preprocess(
|
||||
self: Any,
|
||||
scheduler_output: Any,
|
||||
num_input_tokens: int,
|
||||
intermediate_tensors: Any | None = None,
|
||||
) -> tuple[Any, ...]:
|
||||
result = original_preprocess(
|
||||
self,
|
||||
scheduler_output,
|
||||
num_input_tokens,
|
||||
intermediate_tensors,
|
||||
)
|
||||
|
||||
num_scheduled_tokens = int(scheduler_output.total_num_scheduled_tokens)
|
||||
_zero_padded_model_inputs(
|
||||
result,
|
||||
num_scheduled_tokens,
|
||||
int(num_input_tokens),
|
||||
)
|
||||
return result
|
||||
|
||||
GPUModelRunner._preprocess = _patched_preprocess
|
||||
GPUModelRunner._prime_rl_padded_input_scrub = True
|
||||
_INSTALLED = True
|
||||
|
||||
logger.warning("Enabled vLLM padded model-input scrub.")
|
||||
|
||||
|
||||
def _zero_padded_model_inputs(
|
||||
preprocess_result: Sequence[Any],
|
||||
num_scheduled_tokens: int,
|
||||
num_input_tokens: int,
|
||||
) -> None:
|
||||
"""Zero the model-input tail beyond scheduled tokens in-place."""
|
||||
if num_input_tokens <= num_scheduled_tokens:
|
||||
return
|
||||
|
||||
input_ids = preprocess_result[0]
|
||||
inputs_embeds = preprocess_result[1]
|
||||
positions = preprocess_result[2]
|
||||
pad_slice = slice(num_scheduled_tokens, num_input_tokens)
|
||||
|
||||
if input_ids is not None:
|
||||
input_ids[pad_slice].zero_()
|
||||
if inputs_embeds is not None:
|
||||
inputs_embeds[pad_slice].zero_()
|
||||
if positions is not None:
|
||||
if positions.ndim == 1:
|
||||
positions[pad_slice].zero_()
|
||||
else:
|
||||
positions[..., pad_slice].zero_()
|
||||
@@ -1,6 +1,5 @@
|
||||
import asyncio
|
||||
from argparse import Namespace
|
||||
from typing import Any
|
||||
|
||||
import uvloop
|
||||
from fastapi import APIRouter, Request
|
||||
@@ -25,7 +24,6 @@ from prime_rl.inference.patches import (
|
||||
monkey_patch_nano_v3_reasoning_parser,
|
||||
monkey_patch_strip_routed_experts_from_chat,
|
||||
monkey_patch_tokenize_params_validation,
|
||||
monkey_patch_vllm_padded_input_scrub,
|
||||
)
|
||||
|
||||
# NOTE: Fix harmony stop token propagation for GPT-OSS models
|
||||
@@ -37,9 +35,6 @@ monkey_patch_tokenize_params_validation()
|
||||
# NOTE: Register Nano V3 reasoning parser so configs can use
|
||||
# `reasoning_parser = "nano_v3"` without a vLLM plugin file.
|
||||
monkey_patch_nano_v3_reasoning_parser()
|
||||
# NOTE: Optional mitigation for vLLM padded decode inputs until the native fix
|
||||
# is available in our pinned runtime.
|
||||
monkey_patch_vllm_padded_input_scrub()
|
||||
# NOTE: routed_experts are consumed only via the serialized /generate path (router
|
||||
# replay). The chat-completions path encodes them as a base64 np.save string the PD
|
||||
# router cannot merge, which fails eval rollouts (they use chat completions). Strip
|
||||
@@ -215,20 +210,18 @@ vllm.v1.utils.run_api_server_worker_proc = custom_run_api_server_worker_proc
|
||||
# Adapted from vllm/entrypoints/cli/serve.py
|
||||
# Only difference we do some config translation (i.e. pass populated namespace
|
||||
# to `parse_args`) and additional arg validation
|
||||
def server(config: InferenceConfig, vllm_extra: dict[str, Any] | None = None):
|
||||
def server(config: InferenceConfig):
|
||||
import os
|
||||
|
||||
from vllm.entrypoints.cli.serve import run_headless, run_multi_api_server
|
||||
from vllm.entrypoints.openai.api_server import run_server
|
||||
|
||||
# Signal worker processes to disable LoRA on MoE layers when LoRA targets don't include experts
|
||||
if config.lora_target_modules and not any("expert" in m for m in config.lora_target_modules):
|
||||
lora_target_modules = config.vllm.lora_target_modules
|
||||
if lora_target_modules and not any("expert" in m for m in lora_target_modules):
|
||||
os.environ["PRIME_NO_MOE_LORA"] = "1"
|
||||
|
||||
namespace = config.to_vllm()
|
||||
if vllm_extra:
|
||||
for key, value in vllm_extra.items():
|
||||
setattr(namespace, key, value)
|
||||
namespace = config.to_namespace()
|
||||
|
||||
parser = FlexibleArgumentParser(description="vLLM OpenAI-Compatible RESTful API server.")
|
||||
parser = make_arg_parser(parser)
|
||||
|
||||
@@ -470,7 +470,11 @@ class Orchestrator:
|
||||
]
|
||||
|
||||
# Base-model eval (policy v0) — fires before any train rollouts, logged at the first
|
||||
# step, unless ``eval.skip_first_step=True`` (or this is a resume)
|
||||
# step, unless ``eval.skip_first_step=True``. On resume, defaults to assuming a clean
|
||||
# exit (evals already completed); set ``eval.retrigger_on_resume=True`` to also re-fire
|
||||
# interval-aligned evals at the checkpoint step (e.g. after a crash).
|
||||
if config.eval is not None and config.eval.retrigger_on_resume and self.resume_step is not None:
|
||||
self.maybe_trigger_eval(self.resume_step)
|
||||
self.maybe_trigger_eval(self.progress.step)
|
||||
|
||||
# Anchor step-time clock so the first step measures startup → first batch
|
||||
|
||||
@@ -23,9 +23,14 @@ launch_inference_rank() {
|
||||
mkdir -p "$rpcbase"
|
||||
local -a cmd=(uv run inference @ "$CONFIG_PATH"
|
||||
--server.host 0.0.0.0 --server.port "$port"
|
||||
--parallel.dp "$dp" --data-parallel-size-local 1 --api-server-count 1)
|
||||
[ -n "$rpc" ] && cmd+=(--data-parallel-rpc-port "$rpc")
|
||||
[ -n "$extra" ] && cmd+=(--vllm-extra "$extra")
|
||||
--vllm.data-parallel-size "$dp" --vllm.data-parallel-size-local 1 --vllm.api-server-count 1)
|
||||
[ -n "$rpc" ] && cmd+=(--vllm.data-parallel-rpc-port "$rpc")
|
||||
# Per-rank vLLM overrides go through a JSON file merged into [inference.vllm]
|
||||
# (dict-valued keys like compilation_config can't be inlined as CLI flags).
|
||||
if [ -n "$extra" ]; then
|
||||
printf '%s' "$extra" > "$rpcbase/vllm-overrides.json"
|
||||
cmd+=(--vllm @ "$rpcbase/vllm-overrides.json")
|
||||
fi
|
||||
if [ -n "$nixl" ]; then
|
||||
CUDA_VISIBLE_DEVICES="$gpus" VLLM_NIXL_SIDE_CHANNEL_PORT="$nixl" VLLM_RPC_BASE_PATH="$rpcbase" "${cmd[@]}" 2>&1 | tee -a "$log" &
|
||||
else
|
||||
|
||||
@@ -67,7 +67,9 @@ source .venv/bin/activate
|
||||
# all finish. `set -e` above aborts the job if any node's sync fails. Re-source .env
|
||||
# inside the task because unexported vars in .env don't cross srun even with normal
|
||||
# SLURM env propagation; otherwise uv would silently fall back to the shared .venv.
|
||||
srun --ntasks-per-node=1 bash -c 'cd $PROJECT_DIR && { [ -f .env ] && source .env || true; } && uv sync --all-extras --all-packages'
|
||||
srun --ntasks-per-node=1 bash -s <<'SYNC_SH'
|
||||
cd $PROJECT_DIR && { [ -f .env ] && source .env || true; } && uv sync --all-extras --all-packages
|
||||
SYNC_SH
|
||||
{% else %}
|
||||
# Shared (NFS) venv: one sync on the batch node populates it for all nodes.
|
||||
uv sync --all-extras --all-packages
|
||||
@@ -155,7 +157,13 @@ CLEANUP_SH
|
||||
# --kill-on-bad-exit=1 propagates a non-zero exit on any node to all other
|
||||
# tasks so a crashed router/engine terminates the SLURM job instead of leaving
|
||||
# the surviving ranks holding nodes.
|
||||
srun --kill-on-bad-exit=1 bash -c '
|
||||
#
|
||||
# The body goes to bash on stdin through a quoted heredoc instead of a
|
||||
# single-quoted `bash -c` argument: srun broadcasts stdin to every task, and the
|
||||
# quoted delimiter passes the script through verbatim, so apostrophes and quotes
|
||||
# (including in the shared _launch_*.sh.j2 includes) need no escaping. Nothing in
|
||||
# the body reads stdin, which would otherwise eat the rest of the script.
|
||||
srun --kill-on-bad-exit=1 bash -s <<'LAUNCH_SH'
|
||||
# pipefail ensures `cmd | tee log` propagates `cmd` failures, and the
|
||||
# wait/cleanup block at the end of this script surfaces background
|
||||
# process crashes (router) as task failures.
|
||||
@@ -220,9 +228,9 @@ srun --kill-on-bad-exit=1 bash -c '
|
||||
export VLLM_NIXL_SIDE_CHANNEL_PORT=5600
|
||||
|
||||
# The kv_transfer_config (NIXL transfer + any KV offload connector) is built in
|
||||
# InferenceConfig.to_vllm() from the per-node config, so it is no longer assembled here.
|
||||
# InferenceConfig.to_namespace() from the per-node config, so it is no longer assembled here.
|
||||
|
||||
DECODE_COMPILE_CFG='"'"'{"cudagraph_mode":"FULL_DECODE_ONLY"}'"'"'
|
||||
DECODE_COMPILE_CFG='{"cudagraph_mode":"FULL_DECODE_ONLY"}'
|
||||
|
||||
DP_PER_NODE={{ dp_per_node }}
|
||||
TP=$((GPUS_PER_NODE / DP_PER_NODE))
|
||||
@@ -293,7 +301,7 @@ srun --kill-on-bad-exit=1 bash -c '
|
||||
# External-LB: one vLLM API server per local DP rank (PORT + k), each pinned to its TP
|
||||
# slice of GPUs with a unique NIXL side-channel port. Each role is its own external-LB DP
|
||||
# group rooted on the role-replica head (HEAD_HOST); the router balances across the per-rank
|
||||
# endpoints. The kv_transfer_config is built in InferenceConfig.to_vllm() from the config.
|
||||
# endpoints. The kv_transfer_config is built in InferenceConfig.to_namespace() from the config.
|
||||
if [ "$ROLE_RANK" -eq 0 ]; then DP_ADDR=$LOCAL_IP; else DP_ADDR=$HEAD_HOST; fi
|
||||
for k in $(seq 0 $((DP_PER_NODE - 1))); do
|
||||
GLOBAL_RANK=$((ROLE_RANK * DP_PER_NODE + k))
|
||||
@@ -350,4 +358,4 @@ for pid in $(jobs -p); do
|
||||
kill -TERM $pid 2>/dev/null || true
|
||||
done
|
||||
exit $EXIT_CODE
|
||||
'
|
||||
LAUNCH_SH
|
||||
|
||||
@@ -135,7 +135,9 @@ source .venv/bin/activate
|
||||
# all finish. `set -e` above aborts the job if any node's sync fails. Re-source .env
|
||||
# inside the task because unexported vars in .env don't cross srun even with normal
|
||||
# SLURM env propagation; otherwise uv would silently fall back to the shared .venv.
|
||||
srun --ntasks-per-node=1 bash -c 'cd $PROJECT_DIR && { [ -f .env ] && source .env || true; } && uv sync --all-extras --all-packages'
|
||||
srun --ntasks-per-node=1 bash -s <<'SYNC_SH'
|
||||
cd $PROJECT_DIR && { [ -f .env ] && source .env || true; } && uv sync --all-extras --all-packages
|
||||
SYNC_SH
|
||||
{% else %}
|
||||
# Shared (NFS) venv: one sync on the batch node populates it for all nodes.
|
||||
uv sync --all-extras --all-packages
|
||||
@@ -183,7 +185,13 @@ CLEANUP_SH
|
||||
# --kill-on-bad-exit=1 propagates a non-zero exit on any node to all other
|
||||
# tasks so a crashed component terminates the SLURM job instead of leaving the
|
||||
# surviving ranks holding nodes.
|
||||
srun --kill-on-bad-exit=1 bash -c '
|
||||
#
|
||||
# The body goes to bash on stdin through a quoted heredoc instead of a
|
||||
# single-quoted `bash -c` argument: srun broadcasts stdin to every task, and the
|
||||
# quoted delimiter passes the script through verbatim, so apostrophes and quotes
|
||||
# (including in the shared _launch_*.sh.j2 includes) need no escaping. Nothing in
|
||||
# the body reads stdin, which would otherwise eat the rest of the script.
|
||||
srun --kill-on-bad-exit=1 bash -s <<'LAUNCH_SH'
|
||||
# pipefail ensures `cmd | tee log` propagates `cmd` failures, and the
|
||||
# wait/cleanup block at the end of this script surfaces background
|
||||
# process crashes (router, orchestrator) as task failures.
|
||||
@@ -258,9 +266,9 @@ if [ "$SLURM_PROCID" -lt "$NUM_INFER_NODES" ]; then
|
||||
export VLLM_NIXL_SIDE_CHANNEL_PORT=5600
|
||||
|
||||
# The kv_transfer_config (NIXL transfer + any KV offload connector) is built in
|
||||
# InferenceConfig.to_vllm() from the per-node config, so it is no longer assembled here.
|
||||
# InferenceConfig.to_namespace() from the per-node config, so it is no longer assembled here.
|
||||
|
||||
DECODE_COMPILE_CFG='"'"'{"cudagraph_mode":"FULL_DECODE_ONLY"}'"'"'
|
||||
DECODE_COMPILE_CFG='{"cudagraph_mode":"FULL_DECODE_ONLY"}'
|
||||
|
||||
REPLICA_BASE=$((REPLICA_IDX * NODES_PER_INFER_REPLICA))
|
||||
|
||||
@@ -323,7 +331,7 @@ if [ "$SLURM_PROCID" -lt "$NUM_INFER_NODES" ]; then
|
||||
# External-LB: one vLLM API server per local DP rank (PORT + k), each pinned to its TP
|
||||
# slice of GPUs with a unique NIXL side-channel port. Each role is its own external-LB DP
|
||||
# group rooted on the role-replica head (HEAD_HOST); the router balances across the per-rank
|
||||
# endpoints. The kv_transfer_config is built in InferenceConfig.to_vllm() from the config.
|
||||
# endpoints. The kv_transfer_config is built in InferenceConfig.to_namespace() from the config.
|
||||
if [ "$ROLE_RANK" -eq 0 ]; then DP_ADDR=$LOCAL_IP; else DP_ADDR=$HEAD_HOST; fi
|
||||
for k in $(seq 0 $((INFERENCE_DP_LOCAL - 1))); do
|
||||
GLOBAL_RANK=$((START_RANK + k))
|
||||
@@ -461,4 +469,4 @@ for pid in $REMAINING_PIDS; do
|
||||
kill -TERM $pid 2>/dev/null || true
|
||||
done
|
||||
exit $EXIT_CODE
|
||||
'
|
||||
LAUNCH_SH
|
||||
|
||||
@@ -54,7 +54,9 @@ source $PROJECT_DIR/.venv/bin/activate
|
||||
# all finish. `set -e` above aborts the job if any node's sync fails. Re-source .env
|
||||
# inside the task because unexported vars in .env don't cross srun even with normal
|
||||
# SLURM env propagation; otherwise uv would silently fall back to the shared .venv.
|
||||
srun --ntasks-per-node=1 bash -c 'cd $PROJECT_DIR && { [ -f .env ] && source .env || true; } && uv sync --all-extras --all-packages'
|
||||
srun --ntasks-per-node=1 bash -s <<'SYNC_SH'
|
||||
cd $PROJECT_DIR && { [ -f .env ] && source .env || true; } && uv sync --all-extras --all-packages
|
||||
SYNC_SH
|
||||
{% else %}
|
||||
# Shared (NFS) venv: one sync on the batch node populates it for all nodes.
|
||||
cd $PROJECT_DIR && uv sync --all-extras --all-packages
|
||||
@@ -94,7 +96,13 @@ CLEANUP_SH
|
||||
# --kill-on-bad-exit=1 propagates a non-zero exit on any node to all other
|
||||
# tasks so a single trainer crash terminates the entire SLURM job instead of
|
||||
# leaving the surviving ranks (and their nodes) idle.
|
||||
srun --kill-on-bad-exit=1 bash -c '
|
||||
#
|
||||
# The body goes to bash on stdin through a quoted heredoc instead of a
|
||||
# single-quoted `bash -c` argument: srun broadcasts stdin to every task, and the
|
||||
# quoted delimiter passes the script through verbatim, so apostrophes and quotes
|
||||
# need no escaping. Nothing in the body reads stdin, which would otherwise eat
|
||||
# the rest of the script.
|
||||
srun --kill-on-bad-exit=1 bash -s <<'LAUNCH_SH'
|
||||
set -o pipefail
|
||||
|
||||
# Setup environment
|
||||
@@ -130,4 +138,4 @@ srun --kill-on-bad-exit=1 bash -c '
|
||||
-m prime_rl.trainer.sft.train \
|
||||
@ $CONFIG_PATH \
|
||||
2>&1 | sed -u 's/^\[[a-zA-Z]*[0-9]*\]://' | tee -a $OUTPUT_DIR/logs/trainer/node_${TRAIN_NODE_RANK}.log
|
||||
'
|
||||
LAUNCH_SH
|
||||
|
||||
@@ -16,45 +16,8 @@ from __future__ import annotations
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
|
||||
|
||||
def _build_seq_idx(boundaries: list[int], seq_len: int, device: torch.device) -> torch.Tensor:
|
||||
"""Return the packed-document id for each token in a full CP sequence."""
|
||||
if boundaries[0] != 0 or boundaries[-1] != seq_len:
|
||||
raise ValueError(f"cu_seqlens must span the full sequence length {seq_len}, got {boundaries}")
|
||||
|
||||
seq_idx = torch.empty(seq_len, dtype=torch.int32, device=device)
|
||||
for sequence_id, (start, end) in enumerate(zip(boundaries[:-1], boundaries[1:])):
|
||||
if end <= start:
|
||||
raise ValueError(f"cu_seqlens must be strictly increasing, got {boundaries}")
|
||||
seq_idx[start:end] = sequence_id
|
||||
return seq_idx.unsqueeze(0)
|
||||
|
||||
|
||||
def _causal_conv1d_varlen(
|
||||
hidden_states: torch.Tensor,
|
||||
weight: torch.Tensor,
|
||||
bias: torch.Tensor | None,
|
||||
boundaries: list[int],
|
||||
) -> torch.Tensor:
|
||||
"""Apply a depthwise causal convolution independently to packed documents."""
|
||||
batch_size, _, channels = hidden_states.shape
|
||||
if batch_size != 1:
|
||||
raise ValueError(f"packed CP Mamba expects batch_size=1, got {batch_size}")
|
||||
|
||||
inputs = hidden_states.transpose(1, 2)
|
||||
outputs = []
|
||||
for start, end in zip(boundaries[:-1], boundaries[1:]):
|
||||
convolved = torch.nn.functional.conv1d(
|
||||
inputs[:, :, start:end],
|
||||
weight,
|
||||
bias,
|
||||
groups=channels,
|
||||
padding=weight.shape[2] - 1,
|
||||
)
|
||||
outputs.append(convolved[:, :, : end - start])
|
||||
|
||||
return torch.cat(outputs, dim=-1).transpose(1, 2)
|
||||
from fla.modules.conv import causal_conv1d as fla_causal_conv1d
|
||||
from fla.ops.utils import prepare_sequence_ids
|
||||
|
||||
|
||||
class _SeqToHeadParallel(torch.autograd.Function):
|
||||
@@ -180,8 +143,7 @@ def mamba_cp_forward(
|
||||
hidden_states_B_C = torch.cat([x_part, B_part, C_part], dim=-1)
|
||||
|
||||
full_seq_len = hidden_states_B_C.shape[1] # S (full sequence)
|
||||
boundaries = cu_seqlens.tolist()
|
||||
seq_idx = _build_seq_idx(boundaries, full_seq_len, hidden_states.device)
|
||||
seq_idx = prepare_sequence_ids(cu_seqlens).to(torch.int32).unsqueeze(0)
|
||||
|
||||
# ── 3. Local head dimensions ──
|
||||
local_num_heads = mixer.num_heads // cp_size
|
||||
@@ -216,9 +178,15 @@ def mamba_cp_forward(
|
||||
local_conv_weight = mixer.conv1d.weight[conv_indices]
|
||||
local_conv_bias = mixer.conv1d.bias[conv_indices] if mixer.conv1d.bias is not None else None
|
||||
|
||||
# ── 4. Conv1d on each packed document, local heads ──
|
||||
hidden_states_B_C = torch.nn.functional.silu(
|
||||
_causal_conv1d_varlen(hidden_states_B_C, local_conv_weight, local_conv_bias, boundaries)
|
||||
# ── 4. Causal conv1d on the full sequence, local heads ──
|
||||
# Must reset at sequence boundaries for packed batches, otherwise the
|
||||
# kernel-1 left pad leaks state across sequences.
|
||||
hidden_states_B_C, _ = fla_causal_conv1d(
|
||||
x=hidden_states_B_C,
|
||||
weight=local_conv_weight.squeeze(1),
|
||||
bias=local_conv_bias,
|
||||
activation=mixer.activation,
|
||||
cu_seqlens=cu_seqlens,
|
||||
)
|
||||
|
||||
local_groups_time_state_size = local_n_groups * mixer.ssm_state_size
|
||||
|
||||
@@ -68,11 +68,18 @@ def _replicate_kv_heads(t: torch.Tensor, cp_size: int) -> torch.Tensor:
|
||||
return t.repeat_interleave(cp_size // h, dim=1)
|
||||
|
||||
|
||||
@torch._dynamo.disable
|
||||
def _all_to_all_seq_to_head(t: torch.Tensor, cp_size: int, cp_group: dist.ProcessGroup) -> torch.Tensor:
|
||||
"""Redistribute [S_local, H, D] -> [S_global, H_local, D].
|
||||
|
||||
Splits the head dim into cp_size groups and exchanges them so each rank
|
||||
ends up with the full sequence but only H/cp_size heads. Differentiable.
|
||||
|
||||
Disabled for dynamo: the collective must execute eagerly so it is scheduled
|
||||
by the autograd engine in a consistent order across ranks, not reordered by
|
||||
the compiled backward graph. Otherwise FSDP's post_backward reduce-scatter
|
||||
and the all-to-all backward can interleave differently per rank, deadlocking
|
||||
NCCL (see PR #3186 job 1578).
|
||||
"""
|
||||
s_local, h, d = t.shape
|
||||
assert h % cp_size == 0, (
|
||||
@@ -90,6 +97,7 @@ def _all_to_all_seq_to_head(t: torch.Tensor, cp_size: int, cp_group: dist.Proces
|
||||
return out.reshape(cp_size * s_local, h_local, d)
|
||||
|
||||
|
||||
@torch._dynamo.disable
|
||||
def _all_to_all_head_to_seq(t: torch.Tensor, cp_size: int, cp_group: dist.ProcessGroup) -> torch.Tensor:
|
||||
"""Inverse of `_all_to_all_seq_to_head`: [S_global, H_local, D] -> [S_local, H, D]."""
|
||||
s_global, h_local, d = t.shape
|
||||
|
||||
@@ -10,6 +10,8 @@ from typing import Optional
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
from fla.modules.conv import causal_conv1d as fla_causal_conv1d
|
||||
from fla.ops.utils import prepare_sequence_ids
|
||||
from torch import Tensor, nn
|
||||
from transformers.generation import GenerationMixin
|
||||
from transformers.modeling_layers import GradientCheckpointingLayer
|
||||
@@ -40,10 +42,8 @@ def _patch_mamba2_use_triton_ssd():
|
||||
Triton kernels and mamba_ssm use fp32. This causes ~0.4 KL divergence.
|
||||
|
||||
This patch makes the mixer use mamba_chunk_scan_combined (Triton, fp32
|
||||
softplus) for the SSD computation, with PyTorch nn.Conv1d for convolution.
|
||||
Requires mamba_ssm installed; causal_conv1d should NOT be installed (it
|
||||
needs arch-specific CUDA compilation). The HF cuda_kernels_forward
|
||||
already falls back to PyTorch nn.Conv1d when causal_conv1d is absent.
|
||||
softplus) for the SSD computation, with fla's Triton causal_conv1d for
|
||||
convolution. Requires mamba_ssm installed.
|
||||
"""
|
||||
global _patch_applied
|
||||
if _patch_applied:
|
||||
@@ -68,7 +68,7 @@ def _patch_mamba2_use_triton_ssd():
|
||||
def _varlen_mamba_forward(self, hidden_states, cu_seqlens):
|
||||
"""Varlen-aware mamba forward. `cu_seqlens` is required: shape [num_seq+1],
|
||||
e.g. [0, s1, s1+s2, ...]. Handles packed batches by:
|
||||
- applying conv1d per-sequence (with kernel-1 leading zeros)
|
||||
- passing cu_seqlens to causal_conv1d (conv state resets at boundaries)
|
||||
- passing seq_idx to mamba_chunk_scan_combined (SSM state resets at boundaries)
|
||||
"""
|
||||
batch_size, seq_len, _ = hidden_states.shape
|
||||
@@ -86,20 +86,15 @@ def _patch_mamba2_use_triton_ssd():
|
||||
dim=-1,
|
||||
)
|
||||
|
||||
# 2. Per-sequence causal conv1d. self.conv1d already has padding=kernel-1 so
|
||||
# applying it to each segment independently gives the correct causal output
|
||||
# without cross-sequence history.
|
||||
hbc_t = hidden_states_B_C.transpose(1, 2) # (1, C, L)
|
||||
cu = cu_seqlens.tolist()
|
||||
conv_outs = []
|
||||
for i in range(len(cu) - 1):
|
||||
s, e = cu[i], cu[i + 1]
|
||||
if s == e:
|
||||
continue
|
||||
seg = hbc_t[:, :, s:e]
|
||||
conv_out = self.conv1d(seg)[:, :, : e - s]
|
||||
conv_outs.append(conv_out)
|
||||
hidden_states_B_C = self.act(torch.cat(conv_outs, dim=-1).transpose(1, 2))
|
||||
# 2. Causal conv1d — must reset at sequence boundaries for packed batches,
|
||||
# otherwise the kernel-1 left pad leaks state across sequences.
|
||||
hidden_states_B_C, _ = fla_causal_conv1d(
|
||||
x=hidden_states_B_C,
|
||||
weight=self.conv1d.weight.squeeze(1),
|
||||
bias=self.conv1d.bias,
|
||||
activation=self.activation,
|
||||
cu_seqlens=cu_seqlens,
|
||||
)
|
||||
|
||||
hidden_states, B, C = torch.split(
|
||||
hidden_states_B_C,
|
||||
@@ -108,12 +103,7 @@ def _patch_mamba2_use_triton_ssd():
|
||||
)
|
||||
|
||||
# 3. SSM with seq_idx so state resets at sequence boundaries
|
||||
seq_idx = torch.zeros(seq_len, dtype=torch.int32, device=hidden_states.device)
|
||||
for i in range(len(cu) - 1):
|
||||
s, e = cu[i], cu[i + 1]
|
||||
if e > s:
|
||||
seq_idx[s:e] = i
|
||||
seq_idx = seq_idx.unsqueeze(0) # (1, L)
|
||||
seq_idx = prepare_sequence_ids(cu_seqlens).to(torch.int32).unsqueeze(0)
|
||||
|
||||
scan_output = _mamba_chunk_scan_combined(
|
||||
hidden_states.view(batch_size, seq_len, -1, self.head_dim),
|
||||
|
||||
@@ -49,11 +49,11 @@ def ref_inference(output_dir: Path) -> Generator[subprocess.Popen, None, None]:
|
||||
"uv",
|
||||
"run",
|
||||
"inference",
|
||||
"--model.name",
|
||||
"--vllm.model",
|
||||
"PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL",
|
||||
"--server.port",
|
||||
str(REF_PORT),
|
||||
"--gpu-memory-utilization",
|
||||
"--vllm.gpu-memory-utilization",
|
||||
"0.4",
|
||||
]
|
||||
env = {**os.environ, "CUDA_VISIBLE_DEVICES": "0"}
|
||||
|
||||
@@ -48,11 +48,11 @@ def ref_inference(output_dir: Path) -> Generator[subprocess.Popen, None, None]:
|
||||
"uv",
|
||||
"run",
|
||||
"inference",
|
||||
"--model.name",
|
||||
"--vllm.model",
|
||||
"PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL",
|
||||
"--server.port",
|
||||
str(REF_PORT),
|
||||
"--gpu-memory-utilization",
|
||||
"--vllm.gpu-memory-utilization",
|
||||
"0.4",
|
||||
]
|
||||
env = {**os.environ, "CUDA_VISIBLE_DEVICES": "0"}
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
from types import SimpleNamespace
|
||||
|
||||
import torch
|
||||
|
||||
import prime_rl.inference.vllm.padded_input_scrub as padded_input_scrub
|
||||
from prime_rl.inference.vllm.padded_input_scrub import (
|
||||
_zero_padded_model_inputs,
|
||||
monkey_patch_vllm_padded_input_scrub,
|
||||
)
|
||||
|
||||
|
||||
def test_monkey_patch_preprocess_matches_vllm_preprocess_signature(monkeypatch):
|
||||
from vllm.v1.worker.gpu_model_runner import GPUModelRunner
|
||||
|
||||
calls = {}
|
||||
|
||||
def fake_preprocess(
|
||||
self,
|
||||
scheduler_output,
|
||||
num_input_tokens,
|
||||
intermediate_tensors=None,
|
||||
):
|
||||
calls["args"] = (
|
||||
self,
|
||||
scheduler_output,
|
||||
num_input_tokens,
|
||||
intermediate_tensors,
|
||||
)
|
||||
return (
|
||||
torch.tensor([10, 11, 12, 991, 992]),
|
||||
None,
|
||||
torch.tensor([0, 1, 2, 991, 992]),
|
||||
intermediate_tensors,
|
||||
{},
|
||||
None,
|
||||
)
|
||||
|
||||
monkeypatch.setattr(padded_input_scrub, "_INSTALLED", False)
|
||||
monkeypatch.setattr(GPUModelRunner, "_preprocess", fake_preprocess)
|
||||
monkeypatch.setattr(
|
||||
GPUModelRunner,
|
||||
"_prime_rl_padded_input_scrub",
|
||||
False,
|
||||
raising=False,
|
||||
)
|
||||
|
||||
monkey_patch_vllm_padded_input_scrub()
|
||||
|
||||
self = object()
|
||||
scheduler_output = SimpleNamespace(total_num_scheduled_tokens=3)
|
||||
intermediate_tensors = object()
|
||||
result = GPUModelRunner._preprocess(self, scheduler_output, 5, intermediate_tensors)
|
||||
|
||||
assert calls["args"] == (
|
||||
self,
|
||||
scheduler_output,
|
||||
5,
|
||||
intermediate_tensors,
|
||||
)
|
||||
assert result[0].tolist() == [10, 11, 12, 0, 0]
|
||||
assert result[2].tolist() == [0, 1, 2, 0, 0]
|
||||
|
||||
|
||||
def test_zero_padded_model_inputs_leaves_scheduled_prefix_intact():
|
||||
input_ids = torch.tensor([10, 11, 12, 991, 992])
|
||||
positions = torch.tensor([0, 1, 2, 991, 992])
|
||||
preprocess_result = (input_ids, None, positions, None, {}, None)
|
||||
|
||||
_zero_padded_model_inputs(
|
||||
preprocess_result,
|
||||
num_scheduled_tokens=3,
|
||||
num_input_tokens=5,
|
||||
)
|
||||
|
||||
assert input_ids.tolist() == [10, 11, 12, 0, 0]
|
||||
assert positions.tolist() == [0, 1, 2, 0, 0]
|
||||
|
||||
|
||||
def test_zero_padded_model_inputs_zeroes_embeddings_and_mrope_positions():
|
||||
inputs_embeds = torch.ones((5, 4))
|
||||
inputs_embeds[3:] = 7
|
||||
positions = torch.tensor(
|
||||
[
|
||||
[0, 1, 2, 991, 992],
|
||||
[0, 1, 2, 993, 994],
|
||||
[0, 1, 2, 995, 996],
|
||||
]
|
||||
)
|
||||
preprocess_result = (None, inputs_embeds, positions, None, {}, None)
|
||||
|
||||
_zero_padded_model_inputs(
|
||||
preprocess_result,
|
||||
num_scheduled_tokens=3,
|
||||
num_input_tokens=5,
|
||||
)
|
||||
|
||||
torch.testing.assert_close(inputs_embeds[:3], torch.ones((3, 4)))
|
||||
torch.testing.assert_close(inputs_embeds[3:], torch.zeros((2, 4)))
|
||||
assert positions.tolist() == [
|
||||
[0, 1, 2, 0, 0],
|
||||
[0, 1, 2, 0, 0],
|
||||
[0, 1, 2, 0, 0],
|
||||
]
|
||||
|
||||
|
||||
def test_zero_padded_model_inputs_noops_without_padding():
|
||||
input_ids = torch.tensor([10, 11, 12])
|
||||
positions = torch.tensor([0, 1, 2])
|
||||
preprocess_result = (input_ids, None, positions, None, {}, None)
|
||||
|
||||
_zero_padded_model_inputs(
|
||||
preprocess_result,
|
||||
num_scheduled_tokens=3,
|
||||
num_input_tokens=3,
|
||||
)
|
||||
|
||||
assert input_ids.tolist() == [10, 11, 12]
|
||||
assert positions.tolist() == [0, 1, 2]
|
||||
+14
-14
@@ -222,7 +222,7 @@ def test_single_node_auto_inference_ports_follow_server_port():
|
||||
{
|
||||
"trainer": {},
|
||||
"orchestrator": {},
|
||||
"inference": {"server": {"port": 8001}, "parallel": {"tp": 1}},
|
||||
"inference": {"server": {"port": 8001}, "vllm": {"tensor_parallel_size": 1}},
|
||||
"deployment": {
|
||||
"type": "single_node",
|
||||
"gpus_per_node": 4,
|
||||
@@ -233,7 +233,7 @@ def test_single_node_auto_inference_ports_follow_server_port():
|
||||
)
|
||||
|
||||
assert config.inference is not None
|
||||
assert config.inference.parallel.dp == 2
|
||||
assert config.inference.vllm.data_parallel_size == 2
|
||||
assert config.inference.backend_port == 8101
|
||||
assert config.orchestrator.model.client.admin_base_url == ["http://localhost:8101/v1"]
|
||||
|
||||
@@ -243,7 +243,7 @@ def test_multi_node_auto_inference_parallelism():
|
||||
{
|
||||
"trainer": {},
|
||||
"orchestrator": {},
|
||||
"inference": {"parallel": {"tp": 4}},
|
||||
"inference": {"vllm": {"tensor_parallel_size": 4}},
|
||||
"deployment": {
|
||||
"type": "multi_node",
|
||||
"gpus_per_node": 8,
|
||||
@@ -255,8 +255,8 @@ def test_multi_node_auto_inference_parallelism():
|
||||
)
|
||||
|
||||
assert config.inference is not None
|
||||
assert config.inference.data_parallel_size_local == 2
|
||||
assert config.inference.parallel.dp == 2
|
||||
assert config.inference.vllm.data_parallel_size_local == 2
|
||||
assert config.inference.vllm.data_parallel_size == 2
|
||||
|
||||
|
||||
def test_orchestrator_vlm_requires_renderer():
|
||||
@@ -324,7 +324,7 @@ def test_shared_model_name_propagates_to_subconfigs():
|
||||
)
|
||||
assert config.trainer.model.name == model_name
|
||||
assert config.orchestrator.model.name == model_name
|
||||
assert config.inference is not None and config.inference.model.name == model_name
|
||||
assert config.inference is not None and config.inference.vllm.model == model_name
|
||||
assert config.trainer.tokenizer.name == model_name
|
||||
assert config.orchestrator.tokenizer.name == model_name
|
||||
|
||||
@@ -468,7 +468,7 @@ def test_shared_and_sub_max_steps_conflict_raises():
|
||||
def test_trainer_chat_template_cascades_to_inference():
|
||||
"""``[trainer.tokenizer] chat_template`` set directly (no shared
|
||||
``[tokenizer] chat_template``) must still reach
|
||||
``inference.model.chat_template`` so vLLM's ``--chat-template`` is wired
|
||||
``inference.vllm.chat_template`` so vLLM's ``--chat-template`` is wired
|
||||
up. Regression: the original ``auto_setup_tokenizer`` cascaded this; the
|
||||
refactored propagator must keep doing it."""
|
||||
config = RLConfig.model_validate(
|
||||
@@ -482,7 +482,7 @@ def test_trainer_chat_template_cascades_to_inference():
|
||||
assert config.trainer.tokenizer.chat_template == "TPL"
|
||||
assert config.orchestrator.tokenizer.chat_template == "TPL"
|
||||
assert config.inference is not None
|
||||
assert config.inference.model.chat_template == "TPL"
|
||||
assert config.inference.vllm.chat_template == "TPL"
|
||||
|
||||
|
||||
def test_shared_wandb_fields_propagate_to_subconfigs():
|
||||
@@ -632,7 +632,7 @@ def test_orchestrator_explicit_default_renderer_with_unmapped_model():
|
||||
|
||||
|
||||
def test_shared_model_name_resolves_inference_parsers():
|
||||
"""Shared [model] name must reach inference.model BEFORE ModelConfig's after-validator
|
||||
"""Shared [model] name must reach inference.vllm BEFORE VllmConfig's after-validator
|
||||
runs auto_resolve_parsers — i.e. the parsers resolve from the propagated name, not
|
||||
from an empty default.
|
||||
"""
|
||||
@@ -645,20 +645,20 @@ def test_shared_model_name_resolves_inference_parsers():
|
||||
}
|
||||
)
|
||||
assert config.inference is not None
|
||||
assert config.inference.model.name == "Qwen/Qwen3-Coder-30B-A3B-Instruct"
|
||||
assert config.inference.model.tool_call_parser == "qwen3_coder"
|
||||
assert config.inference.vllm.model == "Qwen/Qwen3-Coder-30B-A3B-Instruct"
|
||||
assert config.inference.vllm.tool_call_parser == "qwen3_coder"
|
||||
|
||||
|
||||
def test_explicit_inference_parser_wins_over_auto():
|
||||
"""Explicit inference.model.tool_call_parser is preserved even when the shared model
|
||||
"""Explicit inference.vllm.tool_call_parser is preserved even when the shared model
|
||||
name would otherwise auto-resolve to something else."""
|
||||
config = RLConfig.model_validate(
|
||||
{
|
||||
"model": {"name": "Qwen/Qwen3-Coder-30B-A3B-Instruct"},
|
||||
"trainer": {},
|
||||
"orchestrator": {"renderer": {"name": "default"}},
|
||||
"inference": {"model": {"tool_call_parser": "hermes"}},
|
||||
"inference": {"vllm": {"tool_call_parser": "hermes"}},
|
||||
}
|
||||
)
|
||||
assert config.inference is not None
|
||||
assert config.inference.model.tool_call_parser == "hermes"
|
||||
assert config.inference.vllm.tool_call_parser == "hermes"
|
||||
|
||||
+42
-18
@@ -5,6 +5,11 @@ from prime_rl.utils.parsers import resolve_reasoning_parser, resolve_tool_call_p
|
||||
|
||||
# (model_name, expected_tool_call_parser, expected_reasoning_parser)
|
||||
EXPECTED_PARSERS: list[tuple[str, str | None, str | None]] = [
|
||||
# Arcee Trinity
|
||||
("arcee-ai/Trinity-Large-Thinking", "qwen3_coder", "deepseek_r1"),
|
||||
("arcee-ai/Trinity-Large-Preview", "hermes", None),
|
||||
("arcee-ai/Trinity-Mini", "hermes", "deepseek_r1"),
|
||||
("arcee-ai/Trinity-Nano-Preview", "hermes", "deepseek_r1"),
|
||||
# DeepSeek
|
||||
("deepseek-ai/DeepSeek-V3.2", "deepseek_v32", "deepseek_r1"),
|
||||
("deepseek-ai/DeepSeek-V3.2-Exp", "deepseek_v32", "deepseek_r1"),
|
||||
@@ -33,6 +38,14 @@ EXPECTED_PARSERS: list[tuple[str, str | None, str | None]] = [
|
||||
("MiniMaxAI/MiniMax-M2", "minimax_m2", "minimax_m2_append_think"),
|
||||
("MiniMaxAI/MiniMax-M2.1", "minimax_m2", "minimax_m2_append_think"),
|
||||
("MiniMaxAI/MiniMax-M2.5", "minimax_m2", "minimax_m2_append_think"),
|
||||
# gpt-oss (reasoning handled natively by vLLM's harmony path)
|
||||
("openai/gpt-oss-20b", "openai", None),
|
||||
("openai/gpt-oss-120b", "openai", None),
|
||||
# Poolside Laguna
|
||||
("poolside/Laguna-S-2.1", "poolside_v1", "poolside_v1"),
|
||||
("poolside/Laguna-S-2.1-FP8", "poolside_v1", "poolside_v1"),
|
||||
("poolside/Laguna-XS-2.1", "poolside_v1", "poolside_v1"),
|
||||
("poolside/Laguna-M.1", "poolside_v1", "poolside_v1"),
|
||||
# INTELLECT-3
|
||||
("PrimeIntellect/INTELLECT-3", "qwen3_coder", "deepseek_r1"),
|
||||
("PrimeIntellect/INTELLECT-3-FP8", "qwen3_coder", "deepseek_r1"),
|
||||
@@ -91,46 +104,57 @@ def test_resolve_reasoning_parser(model_name: str, expected_tool_call: str | Non
|
||||
|
||||
|
||||
def test_inference_config_resolves_parsers_from_model_name():
|
||||
"""InferenceConfig.ModelConfig.auto_resolve_parsers fires when parsers default to 'auto'."""
|
||||
config = InferenceConfig(model={"name": "deepseek-ai/DeepSeek-V3.2"})
|
||||
assert config.model.tool_call_parser == "deepseek_v32"
|
||||
assert config.model.reasoning_parser == "deepseek_r1"
|
||||
"""VllmConfig.auto_resolve_parsers fires when parsers default to 'auto'."""
|
||||
config = InferenceConfig(vllm={"model": "deepseek-ai/DeepSeek-V3.2"})
|
||||
assert config.vllm.tool_call_parser == "deepseek_v32"
|
||||
assert config.vllm.reasoning_parser == "deepseek_r1"
|
||||
|
||||
|
||||
def test_inference_config_explicit_parser_not_overridden():
|
||||
config = InferenceConfig(model={"name": "Qwen/Qwen3-4B", "tool_call_parser": "my_parser"})
|
||||
assert config.model.tool_call_parser == "my_parser"
|
||||
config = InferenceConfig(vllm={"model": "Qwen/Qwen3-4B", "tool_call_parser": "my_parser"})
|
||||
assert config.vllm.tool_call_parser == "my_parser"
|
||||
|
||||
|
||||
def test_inference_config_none_disables_parser():
|
||||
config = InferenceConfig(
|
||||
model={"name": "Qwen/Qwen3-4B", "tool_call_parser": None, "reasoning_parser": None},
|
||||
vllm={"model": "Qwen/Qwen3-4B", "tool_call_parser": None, "reasoning_parser": None},
|
||||
)
|
||||
assert config.model.tool_call_parser is None
|
||||
assert config.model.reasoning_parser is None
|
||||
assert config.vllm.tool_call_parser is None
|
||||
assert config.vllm.reasoning_parser is None
|
||||
|
||||
|
||||
def test_to_vllm_resolves_parsers():
|
||||
config = InferenceConfig(model={"name": "deepseek-ai/DeepSeek-V3.2"})
|
||||
ns = config.to_vllm()
|
||||
def test_to_namespace_resolves_parsers():
|
||||
config = InferenceConfig(vllm={"model": "deepseek-ai/DeepSeek-V3.2"})
|
||||
ns = config.to_namespace()
|
||||
assert ns.tool_call_parser == "deepseek_v32"
|
||||
assert ns.reasoning_parser == "deepseek_r1"
|
||||
assert ns.enable_auto_tool_choice is True
|
||||
|
||||
|
||||
def test_to_vllm_none_strips_parser_attrs_from_namespace():
|
||||
def test_to_namespace_none_strips_parser_attrs_from_namespace():
|
||||
"""vLLM doesn't accept None for these — they must be removed, not passed through."""
|
||||
config = InferenceConfig(
|
||||
model={"name": "Qwen/Qwen3-4B", "tool_call_parser": None, "reasoning_parser": None},
|
||||
vllm={"model": "Qwen/Qwen3-4B", "tool_call_parser": None, "reasoning_parser": None},
|
||||
)
|
||||
ns = config.to_vllm()
|
||||
ns = config.to_namespace()
|
||||
assert not hasattr(ns, "tool_call_parser")
|
||||
assert not hasattr(ns, "reasoning_parser")
|
||||
assert ns.enable_auto_tool_choice is False
|
||||
|
||||
|
||||
def test_to_vllm_unknown_model_disables_auto_tool_choice():
|
||||
config = InferenceConfig(model={"name": "some/unknown-model"})
|
||||
ns = config.to_vllm()
|
||||
def test_to_namespace_unknown_model_disables_auto_tool_choice():
|
||||
config = InferenceConfig(vllm={"model": "some/unknown-model"})
|
||||
ns = config.to_namespace()
|
||||
assert not hasattr(ns, "tool_call_parser")
|
||||
assert ns.enable_auto_tool_choice is False
|
||||
|
||||
|
||||
def test_to_namespace_passes_through_unknown_args():
|
||||
"""Untyped [inference.vllm] keys land on the namespace verbatim, with CLI-style
|
||||
string values JSON-coerced."""
|
||||
config = InferenceConfig(
|
||||
vllm={"model": "Qwen/Qwen3-4B", "max_num_seqs": "256", "kv-cache-dtype": "fp8"},
|
||||
)
|
||||
ns = config.to_namespace()
|
||||
assert ns.max_num_seqs == 256
|
||||
assert ns.kv_cache_dtype == "fp8"
|
||||
|
||||
@@ -6,6 +6,8 @@ import torch
|
||||
|
||||
from prime_rl.trainer.models.layers import cp_mamba
|
||||
|
||||
pytestmark = [pytest.mark.gpu]
|
||||
|
||||
|
||||
class _FakeMixer(torch.nn.Module):
|
||||
def __init__(self):
|
||||
@@ -19,6 +21,7 @@ class _FakeMixer(torch.nn.Module):
|
||||
self.chunk_size = 1
|
||||
self.time_step_limit = None
|
||||
self.variance_epsilon = 1e-5
|
||||
self.activation = "silu"
|
||||
|
||||
self.in_proj = torch.nn.Linear(1, 5, bias=False)
|
||||
self.in_proj.weight.data.copy_(torch.tensor([[1.0], [1.0], [1.0], [1.0], [1.0]]))
|
||||
@@ -27,7 +30,9 @@ class _FakeMixer(torch.nn.Module):
|
||||
self.dt_bias = torch.nn.Parameter(torch.zeros(1))
|
||||
self.conv1d = torch.nn.Conv1d(3, 3, kernel_size=2, groups=3, bias=False)
|
||||
self.conv1d.weight.data.fill_(1.0)
|
||||
self.norm = types.SimpleNamespace(weight=torch.ones(1), variance_epsilon=self.variance_epsilon, group_size=1)
|
||||
self.norm = types.SimpleNamespace(
|
||||
weight=torch.ones(1, device="cuda"), variance_epsilon=self.variance_epsilon, group_size=1
|
||||
)
|
||||
self.out_proj = torch.nn.Identity()
|
||||
|
||||
|
||||
@@ -52,20 +57,29 @@ def test_mamba_cp_forward_resets_conv_and_scan_at_packed_boundaries(monkeypatch)
|
||||
monkeypatch.setattr(cp_mamba, "seq_to_head_parallel", lambda value, *_: value)
|
||||
monkeypatch.setattr(cp_mamba, "head_to_seq_parallel", lambda value, *_: value)
|
||||
|
||||
mixer = _FakeMixer()
|
||||
cu_seqlens = torch.tensor([0, 2, 4], dtype=torch.int32)
|
||||
first = torch.tensor([[[1.0], [2.0], [3.0], [4.0]]])
|
||||
mixer = _FakeMixer().cuda()
|
||||
cu_seqlens = torch.tensor([0, 2, 4], dtype=torch.int32, device="cuda")
|
||||
first = torch.tensor([[[1.0], [2.0], [3.0], [4.0]]], device="cuda")
|
||||
second = first.clone()
|
||||
second[0, 1, 0] = 200.0
|
||||
|
||||
first_out = cp_mamba.mamba_cp_forward(mixer, first, None, 0, 1, cu_seqlens)
|
||||
second_out = cp_mamba.mamba_cp_forward(mixer, second, None, 0, 1, cu_seqlens)
|
||||
|
||||
assert torch.equal(seen_seq_idx[0], torch.tensor([[0, 0, 1, 1]], dtype=torch.int32))
|
||||
assert torch.equal(seen_seq_idx[0], torch.tensor([[0, 0, 1, 1]], dtype=torch.int32, device="cuda"))
|
||||
assert torch.equal(seen_seq_idx[1], seen_seq_idx[0])
|
||||
torch.testing.assert_close(first_out[:, 2:], second_out[:, 2:])
|
||||
|
||||
|
||||
def test_mamba_cp_forward_rejects_local_boundaries():
|
||||
with pytest.raises(ValueError, match="full sequence length 4"):
|
||||
cp_mamba._build_seq_idx([0, 2], 4, torch.device("cpu"))
|
||||
def test_mamba_cp_forward_builds_seq_idx_for_uneven_packs(monkeypatch):
|
||||
seen_seq_idx: list[torch.Tensor] = []
|
||||
_install_fake_scan(monkeypatch, seen_seq_idx)
|
||||
monkeypatch.setattr(cp_mamba, "seq_to_head_parallel", lambda value, *_: value)
|
||||
monkeypatch.setattr(cp_mamba, "head_to_seq_parallel", lambda value, *_: value)
|
||||
|
||||
cu_seqlens = torch.tensor([0, 1, 4, 6], dtype=torch.int32, device="cuda")
|
||||
hidden_states = torch.arange(6, dtype=torch.float32, device="cuda").reshape(1, 6, 1)
|
||||
|
||||
cp_mamba.mamba_cp_forward(_FakeMixer().cuda(), hidden_states, None, 0, 1, cu_seqlens)
|
||||
|
||||
assert torch.equal(seen_seq_idx[0], torch.tensor([[0, 1, 1, 1, 2, 2]], dtype=torch.int32, device="cuda"))
|
||||
|
||||
@@ -47,17 +47,13 @@ members = [
|
||||
"browsecomp-v1",
|
||||
"charxiv-v1",
|
||||
"clbench-v1",
|
||||
"code-golf-v1",
|
||||
"color-codeword-v1",
|
||||
"compact",
|
||||
"deepdive-v1",
|
||||
"deepseek-prover-v1",
|
||||
"deepwiki-v1",
|
||||
"enterprise-ops-gym-v1",
|
||||
"forth-lang-v1",
|
||||
"frontierscience-v1",
|
||||
"general-agent-v1",
|
||||
"glossary-v1",
|
||||
"goedel-pset-v1",
|
||||
"gpqa-v1",
|
||||
"graphwalks-v1",
|
||||
@@ -81,6 +77,7 @@ members = [
|
||||
"math500-v1",
|
||||
"mcp-atlas-v1",
|
||||
"minif2f-v1",
|
||||
"mmk12-v1",
|
||||
"mmlu-pro-v1",
|
||||
"mmmu-pro-v1",
|
||||
"mmmu-v1",
|
||||
@@ -91,7 +88,6 @@ members = [
|
||||
"oolong-pairs-v1",
|
||||
"oolong-real-v1",
|
||||
"oolong-synth-v1",
|
||||
"openenv-wordle-v1",
|
||||
"openseeker-v1",
|
||||
"openswe-v1",
|
||||
"openthoughts-tblite-v1",
|
||||
@@ -109,7 +105,6 @@ members = [
|
||||
"s1-deepresearch-v1",
|
||||
"scaleswe-v1",
|
||||
"scicode-v1",
|
||||
"scratchpad-v1",
|
||||
"senior-swe-bench-v1",
|
||||
"simpleqa-v1",
|
||||
"simpleqa-verified-v1",
|
||||
@@ -209,18 +204,6 @@ requires-dist = [
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aiofile"
|
||||
version = "3.11.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "caio" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/48/41/2fea7e193e061ce54eacc3b7bc0e6a99e4fcff43c78cf0a76dd781ed8334/aiofile-3.11.1.tar.gz", hash = "sha256:1f91912c6643d2a4e49ca4ae3514f0bf3867ce948a36d99a6411b8f4755f4cf9", size = 19342, upload-time = "2026-05-16T08:18:33.538Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/67/cd/0d76dfc5de72bde52f55f53e925c7d152d9c7906634ec1e0cbc7e8d4ad93/aiofile-3.11.1-py3-none-any.whl", hash = "sha256:ce77d14ac07f77bc2b757834a5c129321f3f705c474593deed5ab209079a52c9", size = 20446, upload-time = "2026-05-16T08:18:32.051Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aiofiles"
|
||||
version = "25.1.0"
|
||||
@@ -446,19 +429,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "authlib"
|
||||
version = "1.7.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cryptography" },
|
||||
{ name = "joserfc" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/36/98/7d93f30d029643c0275dbc0bd6d5a6f670661ee6c9a94d93af7ab4887600/authlib-1.7.2.tar.gz", hash = "sha256:2cea25fefcd4e7173bdf1372c0afc265c8034b23a8cd5dcb6a9164b826c64231", size = 176511, upload-time = "2026-05-06T08:10:23.116Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/fb/95/adcb68e20c34162e9135f370d6e31737719c2b6f94bc953fe7ed1f10fe21/authlib-1.7.2-py2.py3-none-any.whl", hash = "sha256:3e1faedc9d87e7d56a164eca3ccb6ace0d61b94abe83e92242f8dc8bba9b4a9f", size = 259548, upload-time = "2026-05-06T08:10:21.436Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "automation-bench"
|
||||
version = "1.0.5"
|
||||
@@ -702,18 +672,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/dc/8c/5f7e73fd66b28f0705bc55d7060d41ef72328b656b86ca53e75765b3ba2c/botocore-1.43.40-py3-none-any.whl", hash = "sha256:0bc9d352267c9e48415c5d7bb61ff05c3f193eac2fc7e69cfd229a05fbab67d6", size = 15323870, upload-time = "2026-07-03T00:28:12.56Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
version = "1.2.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f7/16/c92ca344d646e71a43b8bb353f0a6490d7f6e06210f8554c8f874e454285/brotli-1.2.0.tar.gz", hash = "sha256:e310f77e41941c13340a95976fe66a8a95b01e783d430eeaf7a2f87e0a57dd0a", size = 7388632, upload-time = "2025-11-05T18:39:42.86Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/3d/6f/feba03130d5fceadfa3a1bb102cb14650798c848b1df2a808356f939bb16/brotli-1.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:acec55bb7c90f1dfc476126f9711a8e81c9af7fb617409a9ee2953115343f08d", size = 1528071, upload-time = "2025-11-05T18:38:26.081Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/a7/03aa61fbc3c5cbf99b44d158665f9b0dd3d8059be16c460208d9e385c837/brotli-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:072e7624b1fc4d601036ab3f4f27942ef772887e876beff0301d261210bca97f", size = 1419762, upload-time = "2025-11-05T18:38:28.295Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/21/1b/0374a89ee27d152a5069c356c96b93afd1b94eae83f1e004b57eb6ce2f10/brotli-1.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:adedc4a67e15327dfdd04884873c6d5a01d3e3b6f61406f99b1ed4865a2f6d28", size = 1484494, upload-time = "2025-11-05T18:38:29.29Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d5/3b/39e13ce78a8e9a621c5df3aeb5fd181fcc8caba8c48a194cd629771f6828/brotli-1.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:af43b8711a8264bb4e7d6d9a6d004c3a2019c04c01127a868709ec29962b6036", size = 1487913, upload-time = "2025-11-05T18:38:31.618Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "browsecomp-plus-v1"
|
||||
version = "0.1.0"
|
||||
@@ -790,18 +748,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/8c/7b/1fc1c09cc0756cf25861a3be10565915953876da48bb228fb9a672b20a42/cachetools-7.1.4-py3-none-any.whl", hash = "sha256:323dc4127934744db5b54eb4924482d7edafbf9554e820d1531c2e08c0e4ef54", size = 16761, upload-time = "2026-05-21T22:40:41.845Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "caio"
|
||||
version = "0.9.25"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/92/88/b8527e1b00c1811db339a1df8bd1ae49d146fcea9d6a5c40e3a80aaeb38d/caio-0.9.25.tar.gz", hash = "sha256:16498e7f81d1d0f5a4c0ad3f2540e65fe25691376e0a5bd367f558067113ed10", size = 26781, upload-time = "2025-12-26T15:21:36.501Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a3/2b/21288691f16d479945968a0a4f2856818c1c5be56881d51d4dac9b255d26/caio-0.9.25-cp312-cp312-manylinux2010_x86_64.manylinux2014_x86_64.manylinux_2_12_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:97084e4e30dfa598449d874c4d8e0c8d5ea17d2f752ef5e48e150ff9d240cd64", size = 82012, upload-time = "2025-12-26T15:22:20.983Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/c4/8a1b580875303500a9c12b9e0af58cb82e47f5bcf888c2457742a138273c/caio-0.9.25-cp312-cp312-manylinux_2_34_aarch64.whl", hash = "sha256:4fa69eba47e0f041b9d4f336e2ad40740681c43e686b18b191b6c5f4c5544bfb", size = 81502, upload-time = "2026-03-04T22:08:22.381Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/d1/1c/0fe770b8ffc8362c48134d1592d653a81a3d8748d764bec33864db36319d/caio-0.9.25-cp312-cp312-manylinux_2_34_x86_64.whl", hash = "sha256:6bebf6f079f1341d19f7386db9b8b1f07e8cc15ae13bfdaff573371ba0575d69", size = 80200, upload-time = "2026-03-04T22:08:23.382Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/86/93/1f76c8d1bafe3b0614e06b2195784a3765bbf7b0a067661af9e2dd47fc33/caio-0.9.25-py3-none-any.whl", hash = "sha256:06c0bb02d6b929119b1cfbe1ca403c768b2013a369e2db46bfa2a5761cf82e40", size = 19087, upload-time = "2025-12-26T15:22:00.221Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "catalogue"
|
||||
version = "2.0.10"
|
||||
@@ -986,17 +932,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/88/39/799be3f2f0f38cc727ee3b4f1445fe6d5e4133064ec2e4115069418a5bb6/cloudpickle-3.1.2-py3-none-any.whl", hash = "sha256:9acb47f6afd73f60dc1df93bb801b472f05ff42fa6c84167d25cb206be1fbf4a", size = 22228, upload-time = "2025-11-03T09:25:25.534Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "code-golf-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/verifiers/environments/code_golf_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers" }]
|
||||
|
||||
[[package]]
|
||||
name = "cohere"
|
||||
version = "7.0.5"
|
||||
@@ -1040,17 +975,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/60/97/891a0971e1e4a8c5d2b20bbe0e524dc04548d2307fee33cdeba148fd4fc7/comm-0.2.3-py3-none-any.whl", hash = "sha256:c615d91d75f7f04f095b30d1c1711babd43bdc6419c1be9886a85f2f4e489417", size = 7294, upload-time = "2025-07-25T14:02:02.896Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "compact"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/verifiers/environments/compact" }
|
||||
dependencies = [
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers" }]
|
||||
|
||||
[[package]]
|
||||
name = "compressed-tensors"
|
||||
version = "0.17.0"
|
||||
@@ -1225,21 +1149,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cyclopts"
|
||||
version = "4.21.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "attrs" },
|
||||
{ name = "docstring-parser" },
|
||||
{ name = "rich" },
|
||||
{ name = "rich-rst" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d9/53/977540be379b0c82550df872912446def343ab0dfa138b8726120427f83d/cyclopts-4.21.0.tar.gz", hash = "sha256:477c18c791c924cca4836f79fce000a7bae45f551e340d9e1654e102c6d9ab9d", size = 190914, upload-time = "2026-07-09T19:07:07.154Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b4/f6/1c671874560a70d902dd57028a75411c176910de2df3d6a6a533de424131/cyclopts-4.21.0-py3-none-any.whl", hash = "sha256:ded3ddb15b0c815f44d245011fc4cdd5a4809a3bb8202869e9e02195a87c0e18", size = 230066, upload-time = "2026-07-09T19:07:05.326Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cymem"
|
||||
version = "2.0.13"
|
||||
@@ -1437,17 +1346,6 @@ requires-dist = [
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deepwiki-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/verifiers/environments/deepwiki_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers" }]
|
||||
|
||||
[[package]]
|
||||
name = "deprecation"
|
||||
version = "2.1.0"
|
||||
@@ -1637,18 +1535,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/50/a7/bb99bf5e6f78736ddb53480f2c3ff3702ffe2196a7c5e1661c03081d398e/eval_type_backport-0.4.0-py3-none-any.whl", hash = "sha256:ad5e2a8db71b6696a56eafb938b0f5a337d3217f256b8e158b469422b4772b20", size = 6432, upload-time = "2026-06-02T13:22:04.827Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "exceptiongroup"
|
||||
version = "1.3.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "executing"
|
||||
version = "2.2.1"
|
||||
@@ -1793,69 +1679,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/17/69/95f68b2772acb953ea20e699276c7847462605544ebf99fa5896fbb18c72/fastcore-1.14.1-py3-none-any.whl", hash = "sha256:f7947eb42da7ab064fdf8353e5f73ef457b468c6ed66ffacf97558c535e92074", size = 106532, upload-time = "2026-07-04T13:20:07.027Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastmcp"
|
||||
version = "3.4.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "fastmcp-slim", extra = ["client", "server"] },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/9c/f7/5188565d1b93ad611cbd80bf473e7ad669d1f3b689c4bedcd304e1ec3472/fastmcp-3.4.4.tar.gz", hash = "sha256:378202e26ec15b23819d9a1c0d1b0ebda096bc712720532010a0b82a45c2b1df", size = 28796458, upload-time = "2026-07-09T00:32:41.352Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/5f/67/3cef84ba38a23dca1e1e776bfda8a35ab3c7a6c94a8ca81d0715de6dd3c5/fastmcp-3.4.4-py3-none-any.whl", hash = "sha256:f86f208713212260068cf55c32936839eee856fefc7808e18a032f31eb0f718e", size = 8019, upload-time = "2026-07-09T00:32:39.411Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastmcp-slim"
|
||||
version = "3.4.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "platformdirs" },
|
||||
{ name = "pydantic", extra = ["email"] },
|
||||
{ name = "pydantic-settings" },
|
||||
{ name = "python-dotenv" },
|
||||
{ name = "rich" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/45/79/f35661c6a1d76dfbe17a079f912d96fffcfdd40fad5a9144bb9e7dfb1fdf/fastmcp_slim-3.4.4.tar.gz", hash = "sha256:dcaa3e0be2127d7eacdce592c2ef0039204923dc0ec396454615cb4a3275b078", size = 590203, upload-time = "2026-07-09T00:32:20.531Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/16/91/321e0b2e9ed70d0628b17ddaec76fc7b09f3e1d5d290f70bf101a2890142/fastmcp_slim-3.4.4-py3-none-any.whl", hash = "sha256:9d3a6327b9ee835188eb7323fc3b5d4cd061631b48da8ece56794bb538972505", size = 765158, upload-time = "2026-07-09T00:32:19.11Z" },
|
||||
]
|
||||
|
||||
[package.optional-dependencies]
|
||||
client = [
|
||||
{ name = "authlib" },
|
||||
{ name = "exceptiongroup" },
|
||||
{ name = "httpx" },
|
||||
{ name = "mcp" },
|
||||
{ name = "opentelemetry-api" },
|
||||
{ name = "py-key-value-aio", extra = ["filetree", "keyring", "memory"] },
|
||||
{ name = "starlette" },
|
||||
]
|
||||
server = [
|
||||
{ name = "authlib" },
|
||||
{ name = "cyclopts" },
|
||||
{ name = "exceptiongroup" },
|
||||
{ name = "griffelib" },
|
||||
{ name = "httpx" },
|
||||
{ name = "joserfc" },
|
||||
{ name = "jsonref" },
|
||||
{ name = "jsonschema-path" },
|
||||
{ name = "mcp" },
|
||||
{ name = "openapi-pydantic" },
|
||||
{ name = "opentelemetry-api" },
|
||||
{ name = "packaging" },
|
||||
{ name = "py-key-value-aio", extra = ["filetree", "keyring", "memory"] },
|
||||
{ name = "pyperclip" },
|
||||
{ name = "python-multipart" },
|
||||
{ name = "pyyaml" },
|
||||
{ name = "starlette" },
|
||||
{ name = "uncalled-for" },
|
||||
{ name = "uvicorn" },
|
||||
{ name = "watchfiles" },
|
||||
{ name = "websockets" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fastsafetensors"
|
||||
version = "0.3.2"
|
||||
@@ -1890,10 +1713,34 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/06/79/b4c714bef36bc4ec2beeae1e0c124f0223888cd8c6feb1cdc56038116920/filelock-3.32.0-py3-none-any.whl", hash = "sha256:d396bea984af47333ef05e50eae7eff88c84256de6112aea0ec48a233c064fe3", size = 97732, upload-time = "2026-07-21T13:17:41.55Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flash-attn"
|
||||
version = "2.8.3+cu128torch2.11"
|
||||
source = { url = "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.22/flash_attn-2.8.3+cu128torch2.11-cp312-cp312-linux_aarch64.whl" }
|
||||
resolution-markers = [
|
||||
"platform_machine == 'aarch64' and sys_platform == 'linux'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "einops" },
|
||||
{ name = "torch" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.22/flash_attn-2.8.3+cu128torch2.11-cp312-cp312-linux_aarch64.whl", hash = "sha256:60331d8bd46aa7a5b708976b76586138e807e6c83289b7bf2b1a688fa5f92bad" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "einops" },
|
||||
{ name = "torch" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flash-attn"
|
||||
version = "2.8.3+cu128torch2.11"
|
||||
source = { 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" }
|
||||
resolution-markers = [
|
||||
"platform_machine == 'x86_64' and sys_platform == 'linux'",
|
||||
]
|
||||
dependencies = [
|
||||
{ name = "einops" },
|
||||
{ name = "torch" },
|
||||
@@ -2140,17 +1987,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/20/7a/1c6e3562dfd8950adbb11ffbc65d21e7c89d01a6e4f137fa981056de25c5/gitpython-3.1.50-py3-none-any.whl", hash = "sha256:d352abe2908d07355014abdd21ddf798c2a961469239afec4962e9da884858f9", size = 212507, upload-time = "2026-05-06T04:01:23.799Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glossary-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/verifiers/environments/glossary_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers" }]
|
||||
|
||||
[[package]]
|
||||
name = "goedel-pset-v1"
|
||||
version = "0.1.0"
|
||||
@@ -2243,60 +2079,6 @@ requires-dist = [
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gradio"
|
||||
version = "6.20.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "anyio" },
|
||||
{ name = "brotli" },
|
||||
{ name = "fastapi" },
|
||||
{ name = "gradio-client" },
|
||||
{ name = "groovy" },
|
||||
{ name = "hf-gradio" },
|
||||
{ name = "httpx" },
|
||||
{ name = "huggingface-hub" },
|
||||
{ name = "jinja2" },
|
||||
{ name = "markupsafe" },
|
||||
{ name = "numpy" },
|
||||
{ name = "orjson" },
|
||||
{ name = "packaging" },
|
||||
{ name = "pandas" },
|
||||
{ name = "pillow" },
|
||||
{ name = "pydantic" },
|
||||
{ name = "pydub" },
|
||||
{ name = "python-multipart" },
|
||||
{ name = "pytz" },
|
||||
{ name = "pyyaml" },
|
||||
{ name = "safehttpx" },
|
||||
{ name = "semantic-version" },
|
||||
{ name = "starlette" },
|
||||
{ name = "tomlkit" },
|
||||
{ name = "typer" },
|
||||
{ name = "typing-extensions" },
|
||||
{ name = "uvicorn" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f8/96/3618f8a189180ab3d4e5f8b258fd92e419eda9f49b6ab4dd50c6782cda33/gradio-6.20.0.tar.gz", hash = "sha256:8672866e9225a1f8297325a6742bb525a3a0ddc8aa4d75d99beb10a27ea2915f", size = 44844340, upload-time = "2026-07-07T18:53:57.402Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/d7/f4/7dc4540836e326391a9d1ba20193d795d5a4582839b60f5c10397f5120bb/gradio-6.20.0-py3-none-any.whl", hash = "sha256:91d2ec29c37917d55b18dba87aa15bb15c4796d84dce9a9ef4ec7d87453a7fee", size = 30964820, upload-time = "2026-07-07T18:53:52.403Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gradio-client"
|
||||
version = "2.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "fsspec" },
|
||||
{ name = "httpx" },
|
||||
{ name = "huggingface-hub" },
|
||||
{ name = "packaging" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e8/e6/6b6029f5fe2ad7f1211105d530e34d991014c2cae463f9223033031cfc4f/gradio_client-2.5.0.tar.gz", hash = "sha256:4cde99bad62149595c30c90876ca2e405e3a13687ecf895474f3412cb476673d", size = 59013, upload-time = "2026-04-20T23:16:21.518Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/78/81/0a861b8e1ff42960139c6cd4c7dd591292fa09ea1ae2d87677441cba4c00/gradio_client-2.5.0-py3-none-any.whl", hash = "sha256:d43e2179c29076292a76485ad7ed2e6eaa19d14ac58283bd7f5beabfe4ca958c", size = 59952, upload-time = "2026-04-20T23:16:20.186Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "graphwalks-v1"
|
||||
version = "0.1.0"
|
||||
@@ -2321,15 +2103,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/11/8c/c9138d881c79aa0ea9ed83cbd58d5ca75624378b38cee225dcf5c42cc91f/griffelib-2.0.2-py3-none-any.whl", hash = "sha256:925c857658fb1ba40c0772c37acbc2ab650bd794d9c1b9726922e36ea4117ea1", size = 142357, upload-time = "2026-03-27T11:34:46.275Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "groovy"
|
||||
version = "0.1.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/52/36/bbdede67400277bef33d3ec0e6a31750da972c469f75966b4930c753218f/groovy-0.1.2.tar.gz", hash = "sha256:25c1dc09b3f9d7e292458aa762c6beb96ea037071bf5e917fc81fb78d2231083", size = 17325, upload-time = "2025-02-28T20:24:56.068Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/28/27/3d6dcadc8a3214d8522c1e7f6a19554e33659be44546d44a2f7572ac7d2a/groovy-0.1.2-py3-none-any.whl", hash = "sha256:7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64", size = 14090, upload-time = "2025-02-28T20:24:55.152Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "grpcio"
|
||||
version = "1.80.0"
|
||||
@@ -2438,19 +2211,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/76/03/b6617f32385295729f3af0ae0d512cf87ba4793b9ce462ea020d776a9025/harbor-0.20.0-py3-none-any.whl", hash = "sha256:4b7e48223aea2384cdb8c9eff35eaebd482fc9b1ec09f8193a121c47356ff19a", size = 1792416, upload-time = "2026-07-18T21:25:19.206Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hf-gradio"
|
||||
version = "0.4.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "gradio-client" },
|
||||
{ name = "typer" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ce/86/c9694b7cfada5780e75769e60dc161a161f4dd7fc91b61db5e3a3338bef9/hf_gradio-0.4.1.tar.gz", hash = "sha256:a017d942618f0d495a58ee4563047fa04bef614c00e0cb789a9a6d0633cffa7b", size = 6560, upload-time = "2026-04-22T14:01:32.334Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/30/2d/afff2ee87e75d8eb85c92bb8cf0e15b05c23c2ebd8fd8dec781d8601ed7f/hf_gradio-0.4.1-py3-none-any.whl", hash = "sha256:76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3", size = 4482, upload-time = "2026-04-17T19:53:31.827Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hf-xet"
|
||||
version = "1.5.0"
|
||||
@@ -2928,39 +2688,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/3e/95/c7c34aa53c16353c56d0b802fba48d5f5caa2cdee7958acbcb795c830416/isort-8.0.1-py3-none-any.whl", hash = "sha256:28b89bc70f751b559aeca209e6120393d43fbe2490de0559662be7a9787e3d75", size = 89733, upload-time = "2026-02-28T10:08:19.466Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jaraco-classes"
|
||||
version = "3.4.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "more-itertools" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd", size = 11780, upload-time = "2024-03-31T07:27:36.643Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/7f/66/b15ce62552d84bbfcec9a4873ab79d993a1dd4edb922cbfccae192bd5b5f/jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790", size = 6777, upload-time = "2024-03-31T07:27:34.792Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jaraco-context"
|
||||
version = "6.1.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/af/50/4763cd07e722bb6285316d390a164bc7e479db9d90daa769f22578f698b4/jaraco_context-6.1.2.tar.gz", hash = "sha256:f1a6c9d391e661cc5b8d39861ff077a7dc24dc23833ccee564b234b81c82dfe3", size = 16801, upload-time = "2026-03-20T22:13:33.922Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/f2/58/bc8954bda5fcda97bd7c19be11b85f91973d67a706ed4a3aec33e7de22db/jaraco_context-6.1.2-py3-none-any.whl", hash = "sha256:bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535", size = 7871, upload-time = "2026-03-20T22:13:32.808Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jaraco-functools"
|
||||
version = "4.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "more-itertools" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/36/cf/ea4ef2920830dea3f5ab2ea4da6fb67724e6dca80ee2553788c3607243d0/jaraco_functools-4.5.0.tar.gz", hash = "sha256:3bb5665ea4a020cf78a7040e89154c77edadb3ca74f366479669c5999aa70b03", size = 20272, upload-time = "2026-05-15T21:34:10.025Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/96/9a/982e48afcffcd727a9144506720ffd4224b6b7e355c98641866f38b7c043/jaraco_functools-4.5.0-py3-none-any.whl", hash = "sha256:79ce39246eddbde4b3a03b77ea5f0f7878dc669b166a66cf3fa8e266aa3fa2f4", size = 10594, upload-time = "2026-05-15T21:34:08.595Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jaxtyping"
|
||||
version = "0.3.10"
|
||||
@@ -2985,15 +2712,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/9a/93/242e2eab5fe682ffcb8b0084bde703a41d51e17ee0f3a31ff0d9d813620a/jedi-0.20.0-py2.py3-none-any.whl", hash = "sha256:7bdd9c2634f56713299976f4cbd59cb3fa92165cc5e05ea811fb253480728b67", size = 4884812, upload-time = "2026-05-01T23:38:43.919Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jeepney"
|
||||
version = "0.9.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz", hash = "sha256:cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732", size = 106758, upload-time = "2025-02-27T18:51:01.684Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b2/a3/e137168c9c44d18eff0376253da9f1e9234d0239e0ee230d2fee6cea8e55/jeepney-0.9.0-py3-none-any.whl", hash = "sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", size = 49010, upload-time = "2025-02-27T18:51:00.104Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jinja2"
|
||||
version = "3.1.6"
|
||||
@@ -3038,18 +2756,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/7b/91/984aca2ec129e2757d1e4e3c81c3fcda9d0f85b74670a094cc443d9ee949/joblib-1.5.3-py3-none-any.whl", hash = "sha256:5fc3c5039fc5ca8c0276333a188bbd59d6b7ab37fe6632daa76bc7f9ec18e713", size = 309071, upload-time = "2025-12-15T08:41:44.973Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "joserfc"
|
||||
version = "1.7.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cryptography" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/d4/c6/b1cac0280f8efc57626ea8804866b37099f23cae11b1485a42b213245e31/joserfc-1.7.3.tar.gz", hash = "sha256:116955c2587139dba20621fd0bd7fc9255fa960c9fe7f43c43ebef2e801dcfcf", size = 233821, upload-time = "2026-07-08T12:41:42.66Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/7d/f5/650b59d1b74f5befb7a7a7e7d7c92a26b94256df3541e2b4914152cd177a/joserfc-1.7.3-py3-none-any.whl", hash = "sha256:7c39f3f2c943dbc03122747fa8ebbd8e156e54904cf25651b452f4d2634a6075", size = 70982, upload-time = "2026-07-08T12:41:41.521Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "json5"
|
||||
version = "0.15.0"
|
||||
@@ -3071,15 +2777,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/f8/62/d9ba6323b9202dd2fe166beab8a86d29465c41a0288cbe229fac60c1ab8d/jsonlines-4.0.0-py3-none-any.whl", hash = "sha256:185b334ff2ca5a91362993f42e83588a360cf95ce4b71a73548502bda52a7c55", size = 8701, upload-time = "2023-09-01T12:34:42.563Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonref"
|
||||
version = "1.1.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/aa/0d/c1f3277e90ccdb50d33ed5ba1ec5b3f0a242ed8c1b1a85d3afeb68464dca/jsonref-1.1.0.tar.gz", hash = "sha256:32fe8e1d85af0fdefbebce950af85590b22b60f9e95443176adbde4e1ecea552", size = 8814, upload-time = "2023-01-16T16:10:04.455Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/0c/ec/e1db9922bceb168197a558a2b8c03a7963f1afe93517ddd3cf99f202f996/jsonref-1.1.0-py3-none-any.whl", hash = "sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9", size = 9425, upload-time = "2023-01-16T16:10:02.255Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonschema"
|
||||
version = "4.26.0"
|
||||
@@ -3095,21 +2792,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", size = 90630, upload-time = "2026-01-07T13:41:05.306Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonschema-path"
|
||||
version = "0.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "attrs" },
|
||||
{ name = "pathable" },
|
||||
{ name = "pyyaml" },
|
||||
{ name = "referencing" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/39/79/cd02a4df6d9270efdc7d3feefe6edd730b0820c39eeaa107a2faee8322d5/jsonschema_path-0.5.0.tar.gz", hash = "sha256:493b156ba895c97602655b620a8456caa2ce08c1aa389f5a7addec065e6e855c", size = 19597, upload-time = "2026-05-19T20:45:00.971Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/04/2c/9e69d73c4297508be9e3b64a970ea3971b3eb8db64ffc5802d40bd25981f/jsonschema_path-0.5.0-py3-none-any.whl", hash = "sha256:2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2", size = 24077, upload-time = "2026-05-19T20:44:59.225Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonschema-specifications"
|
||||
version = "2025.9.1"
|
||||
@@ -3197,22 +2879,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/87/ea/fe955e157094d93fe20919441dc709ba7afbcf933de5896b546d5c217938/kernels_data-0.14.1-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ec694ae26ed8569f613e5cd4269222210cb57b1c16cf8b0c5acbf0082324804f", size = 1414055, upload-time = "2026-05-14T06:41:14.424Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "keyring"
|
||||
version = "25.7.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "jaraco-classes" },
|
||||
{ name = "jaraco-context" },
|
||||
{ name = "jaraco-functools" },
|
||||
{ name = "jeepney" },
|
||||
{ name = "secretstorage" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/43/4b/674af6ef2f97d56f0ab5153bf0bfa28ccb6c3ed4d1babf4305449668807b/keyring-25.7.0.tar.gz", hash = "sha256:fe01bd85eb3f8fb3dd0405defdeac9a5b4f6f0439edbb3149577f244a2e8245b", size = 63516, upload-time = "2025-11-16T16:26:09.482Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl", hash = "sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", size = 39160, upload-time = "2025-11-16T16:26:08.402Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kimina-v1"
|
||||
version = "0.1.0"
|
||||
@@ -3791,6 +3457,25 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/3b/ac/ca8e0c19a34f5b71390171d2ff0b9f7f187550d66801a731bb68925126a4/mmh3-5.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3d74a03fb57757ece25aa4b3c1c60157a1cece37a020542785f942e2f827eed5", size = 97507, upload-time = "2026-03-05T15:54:37.804Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mmk12-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/multimodal/mmk12_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets" },
|
||||
{ name = "math-verify" },
|
||||
{ name = "pillow" },
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "math-verify" },
|
||||
{ name = "pillow" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mmlu-pro-v1"
|
||||
version = "0.1.0"
|
||||
@@ -4583,18 +4268,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/60/c3/3d1e01e2dba517a91760e4a03e4f20ffc75039a6fe584d0e6f9b5c78fd15/openai_harmony-0.0.8-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:007b0476a1f331f8130783f901f1da6f5a7057af1a4891f1b6a31dec364189b5", size = 3205080, upload-time = "2025-11-05T19:07:05.078Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openapi-pydantic"
|
||||
version = "0.5.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "pydantic" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/02/2e/58d83848dd1a79cb92ed8e63f6ba901ca282c5f09d04af9423ec26c56fd7/openapi_pydantic-0.5.1.tar.gz", hash = "sha256:ff6835af6bde7a459fb93eb93bb92b8749b754fc6e51b2f1590a19dc3005ee0d", size = 60892, upload-time = "2025-01-08T19:29:27.083Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/12/cf/03675d8bd8ecbf4445504d8071adab19f5f993676795708e36402ab38263/openapi_pydantic-0.5.1-py3-none-any.whl", hash = "sha256:a3a09ef4586f5bd760a8df7f43028b60cafb6d9f61de2acba9574766255ab146", size = 96381, upload-time = "2025-01-08T19:29:25.275Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opencv-python-headless"
|
||||
version = "4.13.0.92"
|
||||
@@ -4609,44 +4282,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/4b/33/b5db29a6c00eb8f50708110d8d453747ca125c8b805bc437b289dbdcc057/opencv_python_headless-4.13.0.92-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:0bd48544f77c68b2941392fcdf9bcd2b9cdf00e98cb8c29b2455d194763cf99e", size = 60391106, upload-time = "2026-02-05T10:30:14.236Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openenv"
|
||||
version = "0.4.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "fastapi" },
|
||||
{ name = "fastmcp" },
|
||||
{ name = "gradio" },
|
||||
{ name = "httpx" },
|
||||
{ name = "huggingface-hub" },
|
||||
{ name = "openai" },
|
||||
{ name = "pydantic" },
|
||||
{ name = "pyyaml" },
|
||||
{ name = "requests" },
|
||||
{ name = "rich" },
|
||||
{ name = "tomli" },
|
||||
{ name = "tomli-w" },
|
||||
{ name = "typer" },
|
||||
{ name = "typing-extensions" },
|
||||
{ name = "uvicorn" },
|
||||
{ name = "websockets" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/0e/38/5552b1b208c8b8971a1895a74f3b9e52f824059d3aa5d08992088931d969/openenv-0.4.1.tar.gz", hash = "sha256:08c7c13455854beee5c8f311f57d95180772e3e9ac9c85278d681864488016a3", size = 201919, upload-time = "2026-07-03T11:37:24.139Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/14/18/787ddb930e29705479fdd0a58b2ca7fa243c9441f8f1ece33629f8d82b8b/openenv-0.4.1-py3-none-any.whl", hash = "sha256:24c46788c80fa322b34b8e1f8b3adfe42fb8ceec7df99a8b96b44eea0a295921", size = 236036, upload-time = "2026-07-03T11:37:22.607Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openenv-wordle-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/verifiers/environments/openenv_wordle_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers", extra = ["openenv"] },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", extras = ["openenv"] }]
|
||||
|
||||
[[package]]
|
||||
name = "openseeker-v1"
|
||||
version = "0.1.0"
|
||||
@@ -4915,15 +4550,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/42/32/658973117bf0fd82a24abbfb94fe73a5e86216e49342985e10acce54775a/partial_json_parser-0.2.1.1.post7-py3-none-any.whl", hash = "sha256:145119e5eabcf80cbb13844a6b50a85c68bf99d376f8ed771e2a3c3b03e653ae", size = 10877, upload-time = "2025-11-17T07:27:40.457Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pathable"
|
||||
version = "0.6.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/66/f3/5a20387de9bcd0607871bfc2198ee0e15836da7baa4592ccd7f24c27c986/pathable-0.6.0.tar.gz", hash = "sha256:6404b8b82aef5ff0fd478934137128b99b12212ba35afdde5525ca4f8388ea58", size = 18970, upload-time = "2026-05-19T18:15:11.911Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a2/e8/6d75ffd9784bce2e93d1ae4415649427e39a53bb172d4672b2b59c6f0a7b/pathable-0.6.0-py3-none-any.whl", hash = "sha256:82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566", size = 18983, upload-time = "2026-05-19T18:15:10.728Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pathspec"
|
||||
version = "1.1.1"
|
||||
@@ -5153,7 +4779,7 @@ dev = [
|
||||
|
||||
[[package]]
|
||||
name = "prime-rl"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
source = { editable = "." }
|
||||
dependencies = [
|
||||
{ name = "aiolimiter" },
|
||||
@@ -5205,7 +4831,8 @@ all = [
|
||||
{ name = "deep-ep", version = "1.2.1+29d31c0", source = { 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" }, 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", version = "2.8.3+cu128torch2.11", source = { url = "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.22/flash_attn-2.8.3+cu128torch2.11-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
|
||||
{ name = "flash-attn", version = "2.8.3+cu128torch2.11", source = { 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" }, marker = "platform_machine == 'x86_64'" },
|
||||
{ name = "flash-attn-3" },
|
||||
{ name = "flash-attn-4" },
|
||||
{ name = "nixl" },
|
||||
@@ -5225,7 +4852,8 @@ disagg = [
|
||||
{ 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'" },
|
||||
{ name = "flash-attn", version = "2.8.3+cu128torch2.11", source = { url = "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.22/flash_attn-2.8.3+cu128torch2.11-cp312-cp312-linux_aarch64.whl" }, marker = "platform_machine != 'x86_64'" },
|
||||
{ name = "flash-attn", version = "2.8.3+cu128torch2.11", source = { 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" }, marker = "platform_machine == 'x86_64'" },
|
||||
]
|
||||
flash-attn-3 = [
|
||||
{ name = "flash-attn-3" },
|
||||
@@ -5264,6 +4892,7 @@ requires-dist = [
|
||||
{ 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 == 'aarch64' and extra == 'flash-attn'", url = "https://github.com/mjun0812/flash-attention-prebuild-wheels/releases/download/v0.9.22/flash_attn-2.8.3+cu128torch2.11-cp312-cp312-linux_aarch64.whl" },
|
||||
{ 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" },
|
||||
{ name = "flash-attn-3", marker = "extra == 'flash-attn-3'", index = "https://download.pytorch.org/whl/test/cu128" },
|
||||
{ name = "flash-attn-4", marker = "extra == 'flash-attn-cute'", git = "https://github.com/Dao-AILab/flash-attention.git?subdirectory=flash_attn%2Fcute&rev=96bd151" },
|
||||
@@ -5349,15 +4978,15 @@ dependencies = [
|
||||
requires-dist = [
|
||||
{ name = "prime-pydantic-config", specifier = ">=0.4.2" },
|
||||
{ name = "pydantic", specifier = ">=1.10.13" },
|
||||
{ name = "renderers", specifier = ">=0.1.9.dev10" },
|
||||
{ name = "renderers", specifier = ">=0.1.9" },
|
||||
{ name = "tomli", specifier = ">=2.2.1" },
|
||||
{ name = "tomli-w", specifier = ">=1.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev76" },
|
||||
{ name = "verifiers", specifier = ">=0.3.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prime-sandboxes"
|
||||
version = "0.2.33"
|
||||
version = "0.2.35"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "aiofiles" },
|
||||
@@ -5367,9 +4996,9 @@ dependencies = [
|
||||
{ name = "pydantic" },
|
||||
{ name = "tenacity" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/15/a9/880685cefd503aa92d2b49da46b60ba807015f8839c344a83d8c5bc02f30/prime_sandboxes-0.2.33.tar.gz", hash = "sha256:4253a3c345ccf6c07b41a81790f8515763333f094d20bc405a257432461e81d8", size = 81228, upload-time = "2026-07-22T23:23:55.715Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/57/cc/287c0db192ddbe003bd5882d1aab5461cdb3912d0c92db7b39734a9e828e/prime_sandboxes-0.2.35.tar.gz", hash = "sha256:e716bfccdcb51aefd5e2d48fdfc3a79bea8c6825bce1871f49f095ced03efc94", size = 86226, upload-time = "2026-08-05T14:29:53.33Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/f8/1b/10b1044b8aaef561c32a34140f4a13c7310f73f92f9546337e2e8e6a5239/prime_sandboxes-0.2.33-py3-none-any.whl", hash = "sha256:92c9647557e76191ba926ac8ed01708de9ec4450142131b673cd5cf8d9d7ea56", size = 42773, upload-time = "2026-07-22T23:23:54.381Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/25/07/c186395925f780b1a18b350f562ebc4e8a64a182c37bd1e3db3948f297e2/prime_sandboxes-0.2.35-py3-none-any.whl", hash = "sha256:29d7057532b21545be5938d3aee822ae3a54085a45934d5c3ac55190e06c5bbb", size = 47189, upload-time = "2026-08-05T14:29:52.142Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5560,31 +5189,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl", hash = "sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5", size = 22335, upload-time = "2022-10-25T20:38:27.636Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "py-key-value-aio"
|
||||
version = "0.4.5"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "beartype" },
|
||||
{ name = "typing-extensions" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/fb/e2/d689d922894a7ecde73b6daeaf9b13dab5aae06fe6aaaf7514722644d382/py_key_value_aio-0.4.5.tar.gz", hash = "sha256:c6563a2c6abe5da5e20f4f9e875c2a9b425a2244a54fadbf46cf140a9eea45d7", size = 107547, upload-time = "2026-05-27T16:37:08.107Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/f6/95/b8ba862968712caa12a19666175334fa979e1f198b896a430adb3bacfe87/py_key_value_aio-0.4.5-py3-none-any.whl", hash = "sha256:ab862adbcb8c72547d1c57821f22cbbb71ab86509039c96f36e914e0336c8dd7", size = 170005, upload-time = "2026-05-27T16:37:06.629Z" },
|
||||
]
|
||||
|
||||
[package.optional-dependencies]
|
||||
filetree = [
|
||||
{ name = "aiofile" },
|
||||
{ name = "anyio" },
|
||||
]
|
||||
keyring = [
|
||||
{ name = "keyring" },
|
||||
]
|
||||
memory = [
|
||||
{ name = "cachetools" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pyarrow"
|
||||
version = "24.0.0"
|
||||
@@ -5731,15 +5335,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/ae/8d/f1af3832f5e6eb13ba94ee809e72b8ecb5eef226d27ee0bef7d963d943c7/pydantic_settings-2.14.1-py3-none-any.whl", hash = "sha256:6e3c7edfd8277687cdc598f56e5cff0e9bfff0910a3749deaa8d4401c3a2b9de", size = 60964, upload-time = "2026-05-08T13:40:04.958Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pydub"
|
||||
version = "0.25.1"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/fe/9a/e6bca0eed82db26562c73b5076539a4a08d3cffd19c3cc5913a3e61145fd/pydub-0.25.1.tar.gz", hash = "sha256:980a33ce9949cab2a569606b65674d748ecbca4f0796887fd6f46173a7b0d30f", size = 38326, upload-time = "2021-03-10T02:09:54.659Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl", hash = "sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6", size = 32327, upload-time = "2021-03-10T02:09:53.503Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pyelftools"
|
||||
version = "0.32"
|
||||
@@ -5826,15 +5421,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/10/bd/c038d7cc38edc1aa5bf91ab8068b63d4308c66c4c8bb3cbba7dfbc049f9c/pyparsing-3.3.2-py3-none-any.whl", hash = "sha256:850ba148bd908d7e2411587e247a1e4f0327839c40e2e5e6d05a007ecc69911d", size = 122781, upload-time = "2026-01-21T03:57:55.912Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pyperclip"
|
||||
version = "1.11.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e8/52/d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51/pyperclip-1.11.0.tar.gz", hash = "sha256:244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6", size = 12185, upload-time = "2025-09-26T14:40:37.245Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/df/80/fc9d01d5ed37ba4c42ca2b55b4339ae6e200b456be3a1aaddf4a9fa99b8c/pyperclip-1.11.0-py3-none-any.whl", hash = "sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273", size = 11063, upload-time = "2025-09-26T14:40:36.069Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pypika"
|
||||
version = "0.51.1"
|
||||
@@ -5990,15 +5576,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/76/9c/9020b700199b09ebdfc6dbadae81641a49555c4ee21dedbe2aa98af601b5/pytrec_eval_terrier-0.5.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3f02118dadd3c09b71462bb26e405e49bd10fe0c60bcc169fcd31454a4256dc2", size = 1327965, upload-time = "2025-10-20T16:54:18.743Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pytz"
|
||||
version = "2026.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ff/46/dd499ec9038423421951e4fad73051febaa13d2df82b4064f87af8b8c0c3/pytz-2026.2.tar.gz", hash = "sha256:0e60b47b29f21574376f218fe21abc009894a2321ea16c6754f3cad6eb7cdd6a", size = 320861, upload-time = "2026-05-04T01:35:29.667Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/ec/dd/96da98f892250475bdf2328112d7468abdd4acc7b902b6af23f4ed958ea0/pytz-2026.2-py2.py3-none-any.whl", hash = "sha256:04156e608bee23d3792fd45c94ae47fae1036688e75032eea2e3bf0323d1f126", size = 510141, upload-time = "2026-05-04T01:35:27.408Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pyyaml"
|
||||
version = "6.0.3"
|
||||
@@ -6256,19 +5833,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rich-rst"
|
||||
version = "2.1.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "pygments" },
|
||||
{ name = "rich" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e2/d6/d0b9fafc73b65767200da027acab1db1bdb1048f4fea5ebf659df01c700e/rich_rst-2.1.0.tar.gz", hash = "sha256:f4d117b49697f338769759fa5cacf5197da4888b347b9fda2e50aef5cd8d93bd", size = 302732, upload-time = "2026-07-05T02:59:44.308Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/2a/68/1fc93dd759605b5d00fc98b50200739e41ed32bd22d6ba35ca6c3932371b/rich_rst-2.1.0-py3-none-any.whl", hash = "sha256:7ecd1343ee12c879d0e7ae74c3eb6d263b023d2929c6d114212eb1fd91057255", size = 272987, upload-time = "2026-07-05T02:59:42.792Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rich-toolkit"
|
||||
version = "0.19.10"
|
||||
@@ -6355,18 +5919,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/46/5f/4c174edad94f82de888ac00a5ddd8d07b35609b6c94f0bdf4d74af57703e/s3transfer-0.19.0-py3-none-any.whl", hash = "sha256:777cc2415536f1debadb5c2ef7779275d0fc0fe0e042411cdd6caebeb2685262", size = 90101, upload-time = "2026-06-16T19:44:50.439Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "safehttpx"
|
||||
version = "0.1.7"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "httpx" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/89/d1/4282284d9cf1ee873607a46442da977fc3c985059315ab23610be31d5885/safehttpx-0.1.7.tar.gz", hash = "sha256:db201c0978c41eddb8bb480f3eee59dd67304fdd91646035e9d9a720049a9d23", size = 10385, upload-time = "2025-10-24T18:30:09.783Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/2e/a3/0f0b7d78e2f1eb9e8e1afbff1d2bff8d60144aee17aca51c065b516743dd/safehttpx-0.1.7-py3-none-any.whl", hash = "sha256:c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde", size = 8959, upload-time = "2025-10-24T18:30:08.733Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "safetensors"
|
||||
version = "0.7.0"
|
||||
@@ -6454,17 +6006,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/65/94/7698add8f276dbab7a9de9fb6b0e02fc13ee61d51c7c3f85ac28b65e1239/scipy-1.17.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f590cd684941912d10becc07325a3eeb77886fe981415660d9265c4c418d0bea", size = 37625856, upload-time = "2026-02-23T00:19:00.307Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scratchpad-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/verifiers/environments/scratchpad_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers" }]
|
||||
|
||||
[[package]]
|
||||
name = "seaborn"
|
||||
version = "0.13.2"
|
||||
@@ -6479,28 +6020,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/83/11/00d3c3dfc25ad54e731d91449895a79e4bf2384dc3ac01809010ba88f6d5/seaborn-0.13.2-py3-none-any.whl", hash = "sha256:636f8336facf092165e27924f223d3c62ca560b1f2bb5dff7ab7fad265361987", size = 294914, upload-time = "2024-01-25T13:21:49.598Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "secretstorage"
|
||||
version = "3.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cryptography" },
|
||||
{ name = "jeepney" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/1c/03/e834bcd866f2f8a49a85eaff47340affa3bfa391ee9912a952a1faa68c7b/secretstorage-3.5.0.tar.gz", hash = "sha256:f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be", size = 19884, upload-time = "2025-11-23T19:02:53.191Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl", hash = "sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", size = 15554, upload-time = "2025-11-23T19:02:51.545Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semantic-version"
|
||||
version = "2.10.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/7d/31/f2289ce78b9b473d582568c234e104d2a342fd658cc288a7553d83bb8595/semantic_version-2.10.0.tar.gz", hash = "sha256:bdabb6d336998cbb378d4b9db3a4b56a1e3235701dc05ea2690d9a997ed5041c", size = 52289, upload-time = "2022-05-26T13:35:23.454Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl", hash = "sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177", size = 15552, upload-time = "2022-05-26T13:35:21.206Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "senior-swe-bench-v1"
|
||||
version = "0.1.1"
|
||||
@@ -7757,15 +7276,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/61/73/d21edf5b204d1467e06500080a50f79d49ef2b997c79123a536d4a17d97c/uc_micro_py-2.0.0-py3-none-any.whl", hash = "sha256:3603a3859af53e5a39bc7677713c78ea6589ff188d70f4fee165db88e22b242c", size = 6383, upload-time = "2026-03-01T06:31:26.257Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uncalled-for"
|
||||
version = "0.3.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/b5/82/345cc927f7fbdae6065e7768759932fcc827fc20b29b45dfbafa2f1f7da4/uncalled_for-0.3.2.tar.gz", hash = "sha256:89f5dbcd71e2b8f47c030b1fa302e6cce2ec795d1ac565eeb6525c5fe55cb8a2", size = 50032, upload-time = "2026-05-06T13:38:25.204Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/3b/25/2c87754f3a9e692315f7b811244090e68f362979fc8886b3fbd2985a1d8c/uncalled_for-0.3.2-py3-none-any.whl", hash = "sha256:0ff60b142c7d1f8070bde9d42afaa70aedc77dcc10998c227687e9c15713418e", size = 11444, upload-time = "2026-05-06T13:38:24.025Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unidiff"
|
||||
version = "0.7.5"
|
||||
@@ -7896,9 +7406,6 @@ dependencies = [
|
||||
harbor = [
|
||||
{ name = "harbor" },
|
||||
]
|
||||
openenv = [
|
||||
{ name = "openenv" },
|
||||
]
|
||||
ta = [
|
||||
{ name = "nltk" },
|
||||
{ name = "textarena" },
|
||||
@@ -7918,6 +7425,7 @@ requires-dist = [
|
||||
{ name = "mcp", specifier = ">=1.24.0,<2" },
|
||||
{ name = "modal", marker = "extra == 'modal'", specifier = ">=1.4.0" },
|
||||
{ name = "msgpack", specifier = ">=1.1.2" },
|
||||
{ name = "nemo-gym", marker = "python_full_version >= '3.12' and extra == 'nemo-gym'", specifier = "==0.4.0" },
|
||||
{ name = "nest-asyncio", marker = "extra == 'notebook'", specifier = ">=1.6.0" },
|
||||
{ name = "nltk", marker = "extra == 'ta'", specifier = ">=3.9.2" },
|
||||
{ name = "numpy", specifier = ">=2.1.0" },
|
||||
@@ -7925,13 +7433,13 @@ requires-dist = [
|
||||
{ name = "openai-agents", specifier = ">=0.8.2" },
|
||||
{ name = "openenv", marker = "extra == 'openenv'", specifier = ">=0.4.1" },
|
||||
{ name = "prime-pydantic-config", extras = ["toml"], specifier = ">=0.4.2" },
|
||||
{ name = "prime-sandboxes", specifier = ">=0.2.33" },
|
||||
{ name = "prime-sandboxes", specifier = ">=0.2.35" },
|
||||
{ name = "prime-tunnel", specifier = ">=0.1.8" },
|
||||
{ name = "pydantic", specifier = ">=2.12.3" },
|
||||
{ name = "python-dotenv", marker = "extra == 'browser'", specifier = ">=1.0.0" },
|
||||
{ name = "pyzmq", specifier = ">=27.1.0" },
|
||||
{ name = "reasoning-gym", marker = "extra == 'rg'", specifier = ">=0.1.8" },
|
||||
{ name = "renderers", specifier = ">=0.1.9.dev9" },
|
||||
{ name = "renderers", specifier = ">=0.1.9" },
|
||||
{ name = "requests" },
|
||||
{ name = "rich", specifier = ">=11.0.0" },
|
||||
{ name = "setproctitle", specifier = ">=1.3.0" },
|
||||
@@ -7942,7 +7450,7 @@ requires-dist = [
|
||||
{ name = "typing-extensions", specifier = ">=4.12.2" },
|
||||
{ name = "uvloop", marker = "platform_python_implementation != 'PyPy' and sys_platform != 'cygwin' and sys_platform != 'win32'", specifier = ">=0.21.0" },
|
||||
]
|
||||
provides-extras = ["browser", "harbor", "modal", "notebook", "openenv", "rg", "ta"]
|
||||
provides-extras = ["browser", "harbor", "modal", "nemo-gym", "notebook", "openenv", "rg", "ta"]
|
||||
|
||||
[package.metadata.requires-dev]
|
||||
dev = [
|
||||
|
||||
Reference in New Issue
Block a user