Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5afcaa2e2 | ||
|
|
3cbeb5d0f1 | ||
|
|
f8660256f0 | ||
|
|
a66f8bed1b | ||
|
|
d1f366b1bc | ||
|
|
eb89285418 | ||
|
|
9e1c011ce1 | ||
|
|
d507aeafc0 | ||
|
|
3dd3b30e75 | ||
|
|
3a5f617969 | ||
|
|
c268702f55 |
@@ -2,6 +2,8 @@
|
||||
|
||||
Documenting **breaking** configuration changes — renamed, removed, or moved fields that require users to update existing configs.
|
||||
|
||||
- **Memory-saving defaults enabled**: `trainer.model.ac`, `trainer.model.ac_offloading`, `trainer.model.compile`, `trainer.model.optim_cpu_offload`, and `trainer.model.fused_lm_head_token_chunk_size` are now enabled by default to provide sane memory-efficient defaults out of the box. Specifically: `ac` defaults to `ActivationCheckpointConfig()` (full mode), `ac_offloading` defaults to `ActivationOffloadingConfig()`, `compile` defaults to `CompileConfig()` (`fullgraph=false`), `optim_cpu_offload` defaults to `true`, and `fused_lm_head_token_chunk_size` defaults to `1024`. SFT training silently disables `fused_lm_head_token_chunk_size` (sets it to `"disabled"`). Configs using `max_concurrent_runs > 1` must explicitly set `optim_cpu_offload = false`. To disable any of these, set the field to `None` / `"None"` / `false` / `"disabled"` as appropriate.
|
||||
- **`model.ep` defaults to `"auto"`**: The `ep` field type changed from `int` to `int | Literal["auto"]`, defaulting to `"auto"`. At trainer startup, `resolve_ep()` checks if the model is MoE (via `AutoConfig`); if so, it resolves to `min(fsdp_island_size, 8)` where `fsdp_island_size = world_size // dp_replicate`. For non-MoE models, `"auto"` resolves to 1 (no-op). Set `ep` to an explicit integer to override.
|
||||
- **verifiers v1 training integration** (collection of removals/renames). The orchestrator now trains against a v1 env server returning `vf.Trace` rollouts, renderer-only, with a unified token schema.
|
||||
- **`[[orchestrator.train.env]]` is now a v1 `vf.EnvServerConfig`**: a v1 env is `taskset = { id = "<id>" }` + `harness = { id = "default", runtime = { type = "subprocess" } }`. A bare `id = "<id>"` (optionally with `args`) runs the v0 env through the verifiers legacy bridge — old flat `id`/`args`-only configs keep working as legacy envs; v1 envs must use the `taskset`/`harness` shape.
|
||||
- **`orchestrator.train.env` no longer defaults to a `reverse-text` env**: the default is now empty (`[]`), so configs must declare `[[orchestrator.train.env]]` explicitly.
|
||||
|
||||
+68
-3
@@ -82,6 +82,10 @@ COPY scripts/docker-editable-pretend-versions.sh /app/scripts/docker-editable-pr
|
||||
# Use submodule git metadata from the build context when present. Docker copies
|
||||
# only the submodule .git pointer files into /app/deps, so we temporarily link
|
||||
# /app/.git/modules to the read-only context before resolving versions.
|
||||
# Opt-in extras for disaggregated P/D inference (deep-ep, deep-gemm, quack).
|
||||
# Default off — they're heavy source builds only the disagg-MoE path needs.
|
||||
# Enable via `--build-arg INCLUDE_DISAGG_EXTRAS=1`.
|
||||
ARG INCLUDE_DISAGG_EXTRAS=0
|
||||
ARG VERIFIERS_PRETEND_VERSION
|
||||
ARG RENDERERS_PRETEND_VERSION
|
||||
RUN --mount=type=cache,target=/app/.cache/uv \
|
||||
@@ -96,18 +100,62 @@ RUN --mount=type=cache,target=/app/.cache/uv \
|
||||
&& \
|
||||
sed -i "s/fallback-version = \"0.0.0\"/fallback-version = \"${RENDERERS_PRETEND_VERSION}\"/" /app/deps/renderers/pyproject.toml \
|
||||
&& \
|
||||
uv sync --extra flash-attn --extra flash-attn-3 --extra flash-attn-cute --extra envs --extra gpt-oss --extra modelexpress --group mamba-ssm --locked --no-dev
|
||||
EXTRA_DISAGG_FLAG=""; if [ "$INCLUDE_DISAGG_EXTRAS" = "1" ]; then EXTRA_DISAGG_FLAG="--extra disagg"; fi \
|
||||
&& \
|
||||
uv sync --extra flash-attn --extra flash-attn-3 --extra flash-attn-cute --extra envs --extra gpt-oss --extra modelexpress $EXTRA_DISAGG_FLAG --group mamba-ssm --locked --no-dev
|
||||
|
||||
# Optional: build NIXL from source against the UCX 1.19 baked above. The PyPI
|
||||
# nixl wheel ships its own UCX which segfaults on prefill→decode KV transfer
|
||||
# (#2883); rebuilding against our UCX is the documented fix. Only needed for
|
||||
# the disaggregated P/D path — default off so training-only / single-node
|
||||
# inference builds are unaffected. Enable via `--build-arg INCLUDE_NIXL_FROM_SOURCE=1`.
|
||||
ARG INCLUDE_NIXL_FROM_SOURCE=0
|
||||
ARG NIXL_VERSION=0.10.1
|
||||
RUN if [ "$INCLUDE_NIXL_FROM_SOURCE" = "1" ]; then \
|
||||
VIRTUAL_ENV=/app/.venv uv pip install pip \
|
||||
&& git clone --depth 1 --branch ${NIXL_VERSION} https://github.com/ai-dynamo/nixl.git /tmp/nixl \
|
||||
&& cd /tmp/nixl \
|
||||
&& PKG_CONFIG_PATH=/opt/ucx/lib/pkgconfig \
|
||||
LD_LIBRARY_PATH=/opt/ucx/lib:/opt/ucx/lib/ucx \
|
||||
/app/.venv/bin/python -m pip wheel . --no-deps --wheel-dir=/app/deps \
|
||||
&& VIRTUAL_ENV=/app/.venv uv pip install --reinstall --no-deps /app/deps/nixl_cu12-*.whl \
|
||||
&& 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
|
||||
|
||||
FROM python:3.12-slim
|
||||
# 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
|
||||
# archives since nvcc JIT (TileLang/FlashInfer build their own kernels) and torch
|
||||
# (uses pinned nvidia-* wheels) needs them. Keeps nvcc/nvvm/ptxas + headers +
|
||||
# libcudart/libnvrtc/libcudadevrt for JIT compile+link.
|
||||
FROM builder AS cuda-trim
|
||||
RUN find /usr/local/cuda-12.8/targets/*/lib \
|
||||
\( -name 'libcublas*' -o -name 'libcusparse*' -o -name 'libcufft*' \
|
||||
-o -name 'libcusolver*' -o -name 'libcurand*' -o -name 'libnpp*' \
|
||||
-o -name 'libnvjpeg*' -o -name 'libnvblas*' \) -delete \
|
||||
&& find /usr/local/cuda-12.8 -name '*.a' ! -name 'libcudadevrt.a' ! -name 'libcudart_static.a' -delete
|
||||
|
||||
# CUDA 13 runtime libs source
|
||||
FROM nvidia/cuda:13.0.1-runtime-ubuntu24.04 AS cuda13
|
||||
RUN mkdir -p /cu13 && cp -d $(find /usr/local \
|
||||
-name 'libcudart.so.13*' -o -name 'libnvrtc.so.13*' -o -name 'libnvrtc-builtins.so.13*') /cu13/
|
||||
|
||||
# Runtime image
|
||||
FROM nvidia/cuda:12.8.1-base-ubuntu24.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
--no-install-recommends \
|
||||
--force-yes \
|
||||
python3.12 \
|
||||
python3.12-venv \
|
||||
python3.12-dev \
|
||||
build-essential \
|
||||
wget \
|
||||
clang \
|
||||
@@ -128,13 +176,30 @@ RUN apt-get update && apt-get install -y \
|
||||
libibverbs1 \
|
||||
ibverbs-providers \
|
||||
librdmacm1 \
|
||||
&& ln -sf /usr/bin/python3.12 /usr/local/bin/python \
|
||||
&& apt-get clean autoclean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# CUDA 12.8 toolkit (TileLang's runtime nvcc JIT)
|
||||
COPY --from=cuda-trim /usr/local/cuda-12.8 /usr/local/cuda-12.8
|
||||
RUN ln -sfn /usr/local/cuda-12.8 /usr/local/cuda && test -x /usr/local/cuda/bin/nvcc
|
||||
ENV CUDA_HOME=/usr/local/cuda
|
||||
ENV PATH="/usr/local/cuda/bin:${PATH}"
|
||||
|
||||
# CUDA 13 runtime libs for deep-gemm
|
||||
COPY --from=cuda13 /cu13/ /opt/cuda13/lib64/
|
||||
RUN echo /opt/cuda13/lib64 > /etc/ld.so.conf.d/cuda13.conf \
|
||||
&& ldconfig \
|
||||
&& ldconfig -p | grep -q libcudart.so.13 \
|
||||
&& ldconfig -p | grep -q libnvrtc.so.13
|
||||
|
||||
|
||||
ARG USER_ID=1000
|
||||
ARG GROUP_ID=1000
|
||||
RUN groupadd --gid $GROUP_ID appuser && \
|
||||
|
||||
RUN userdel -r ubuntu 2>/dev/null || true; \
|
||||
groupdel ubuntu 2>/dev/null || true; \
|
||||
groupadd --gid $GROUP_ID appuser && \
|
||||
useradd --uid $USER_ID --gid appuser --create-home --shell /bin/bash appuser && \
|
||||
usermod -aG sudo appuser && \
|
||||
echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
+16
-16
@@ -15,34 +15,34 @@
|
||||
"cp": 1,
|
||||
"docker_image": null,
|
||||
"device_name": "NVIDIA RTX A6000",
|
||||
"commit_sha": "0b37bc923",
|
||||
"timestamp": "2026-05-19T01:28:25+00:00",
|
||||
"commit_sha": "c88d08fdf",
|
||||
"timestamp": "2026-06-24T22:50:40+00:00",
|
||||
"success": true,
|
||||
"error_reason": null,
|
||||
"time_taken": 276.12556480802596
|
||||
},
|
||||
"metrics": {
|
||||
"mfu": {
|
||||
"mean": 22.77046832707997,
|
||||
"std": 0.03172890658906481,
|
||||
"min": 22.750797215697055,
|
||||
"max": 22.80707156937409
|
||||
"mean": 20.802552047875178,
|
||||
"std": 0.16199364988631793,
|
||||
"min": 20.664358307416567,
|
||||
"max": 20.98082222151257
|
||||
},
|
||||
"throughput": {
|
||||
"mean": 2719.4358949662887,
|
||||
"std": 3.7893259921987053,
|
||||
"min": 2717.086609671837,
|
||||
"max": 2723.8073540657224
|
||||
"mean": 2484.411208996455,
|
||||
"std": 19.346608946709658,
|
||||
"min": 2467.9069802355616,
|
||||
"max": 2505.7016937694384
|
||||
},
|
||||
"step_time": {
|
||||
"mean": 48.285218452724315,
|
||||
"std": 0.06726350421944344,
|
||||
"min": 48.207625919021666,
|
||||
"max": 48.327002701349556
|
||||
"mean": 52.79691480938345,
|
||||
"std": 0.4071756223542672,
|
||||
"min": 52.35017399210483,
|
||||
"max": 53.14720633160323
|
||||
},
|
||||
"peak_memory": {
|
||||
"gib": 24.248046875,
|
||||
"pct": 51.15428047554115
|
||||
"gib": 11.728515625,
|
||||
"pct": 24.742767157118376
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
-16
@@ -15,34 +15,34 @@
|
||||
"cp": 1,
|
||||
"docker_image": null,
|
||||
"device_name": "NVIDIA RTX A6000",
|
||||
"commit_sha": "0b37bc923",
|
||||
"timestamp": "2026-05-19T01:32:27+00:00",
|
||||
"commit_sha": "c88d08fdf",
|
||||
"timestamp": "2026-06-24T22:55:54+00:00",
|
||||
"success": true,
|
||||
"error_reason": null,
|
||||
"time_taken": 291.91085167229176
|
||||
},
|
||||
"metrics": {
|
||||
"mfu": {
|
||||
"mean": 21.824271379711288,
|
||||
"std": 0.07444985226850119,
|
||||
"min": 21.739369034306105,
|
||||
"max": 21.878404774433935
|
||||
"mean": 17.217465998339005,
|
||||
"std": 0.02905058130694137,
|
||||
"min": 17.19503698271855,
|
||||
"max": 17.250282374540514
|
||||
},
|
||||
"throughput": {
|
||||
"mean": 10425.733211800512,
|
||||
"std": 35.565645418564436,
|
||||
"min": 10385.174276894972,
|
||||
"max": 10451.593425935866
|
||||
"mean": 8225.003435798719,
|
||||
"std": 13.877833769765575,
|
||||
"min": 8214.288808538377,
|
||||
"max": 8240.68023789224
|
||||
},
|
||||
"step_time": {
|
||||
"mean": 50.39627862814814,
|
||||
"std": 0.1756523472528039,
|
||||
"min": 50.26670710090548,
|
||||
"max": 50.59620195720345
|
||||
"mean": 63.90305413212627,
|
||||
"std": 0.11015530079183487,
|
||||
"min": 63.77801387012005,
|
||||
"max": 63.985770548693836
|
||||
},
|
||||
"peak_memory": {
|
||||
"gib": 17.490234375,
|
||||
"pct": 36.897831788841806
|
||||
"gib": 6.298828125,
|
||||
"pct": 13.288163877053583
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ enable_token_export = true
|
||||
name = "PrimeIntellect/Qwen3-0.6B-Reverse-Text-SFT"
|
||||
seq_len = 65536
|
||||
fused_lm_head_token_chunk_size = 8192
|
||||
optim_cpu_offload = false
|
||||
|
||||
[model.lora]
|
||||
rank = 8
|
||||
|
||||
@@ -5,3 +5,4 @@ batch_size = 2
|
||||
|
||||
[model]
|
||||
seq_len = 1024
|
||||
compile = "None"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
max_steps = 5
|
||||
|
||||
[model]
|
||||
name = "PrimeIntellect/Qwen3-0.6B"
|
||||
name = "PrimeIntellect/Qwen3-0.6B"
|
||||
compile = "None"
|
||||
|
||||
[data]
|
||||
type = "fake"
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# math-python
|
||||
|
||||
## Setup
|
||||
|
||||
Install the environment as local packages
|
||||
|
||||
```bash
|
||||
uv pip install -e ~/research-environments/environments/math_env
|
||||
uv pip install -e ~/research-environments/environments/code_env
|
||||
uv pip install -e ~/research-environments/environments/science_env
|
||||
uv pip install -e ~/research-environments/environments/logic_env
|
||||
```
|
||||
|
||||
## RL
|
||||
|
||||
```bash
|
||||
uv run --no-sync rl @ configs/env_mix/env_mix.toml --log.level debug
|
||||
```
|
||||
@@ -1,52 +0,0 @@
|
||||
max_steps = 300
|
||||
seq_len = 8192
|
||||
|
||||
[deployment]
|
||||
num_train_gpus = 4
|
||||
num_infer_gpus = 4
|
||||
|
||||
[wandb]
|
||||
project = "env-mix-debug"
|
||||
name = "env-mix"
|
||||
|
||||
[model]
|
||||
name = "Qwen/Qwen3-4B-Instruct-2507"
|
||||
|
||||
[orchestrator]
|
||||
batch_size = 512
|
||||
group_size = 16
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
id = "math-env"
|
||||
name = "math"
|
||||
args = { min_avg_reward = 0.1, rubric_max_workers = 128 }
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
id = "code-env"
|
||||
name = "code"
|
||||
args = { min_avg_reward = 0.1 }
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
id = "science-env"
|
||||
name = "science"
|
||||
args = { min_avg_reward = 0.1, pool_size = 128, rubric_max_workers = 128 }
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
id = "logic-env"
|
||||
name = "logic"
|
||||
args = { min_avg_reward = 0.1 }
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
id = "math-env"
|
||||
name = "math-python"
|
||||
args = { min_avg_reward = 0.1, sandbox_client_max_workers = 128, sandbox_timeout_minutes = 10, sandbox_memory_gb = 1, sandbox_disk_size_gb = 1, pip_install_packages = "numpy sympy", python_tool = true, rubric_max_workers = 128 }
|
||||
|
||||
[trainer]
|
||||
|
||||
[inference]
|
||||
api_server_count = 8
|
||||
gpu_memory_utilization = 0.8
|
||||
|
||||
[inference.model]
|
||||
tool_call_parser = "hermes"
|
||||
max_model_len = 8192
|
||||
@@ -0,0 +1,50 @@
|
||||
# GLM-5.2-FP8 16-node P/D, FULL STACK: mooncake + llm-d router, vLLM 0.23.
|
||||
# Step 3 / goal target. Topology mirrors the proven original glm5.1_llmd_inference
|
||||
# (job 348 succeeded): 8 prefill nodes (4 replicas x 2) + 8 decode nodes (1 replica).
|
||||
#
|
||||
# Launch: uv run inference @ configs/glm5.2_16node_llmd/inference.toml
|
||||
|
||||
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"
|
||||
|
||||
[kv_cache_offload.cpu]
|
||||
num_bytes = 1_000_000_000_000
|
||||
|
||||
[deployment]
|
||||
type = "disaggregated"
|
||||
num_prefill_nodes = 8
|
||||
num_prefill_replicas = 4
|
||||
num_decode_nodes = 8
|
||||
num_decode_replicas = 1
|
||||
prefill_env_overrides = {"VLLM_ENABLE_MOE_DP_CHUNK"="0", "VLLM_DEEP_GEMM_WARMUP"="skip", "UCX_RCACHE_MAX_UNRELEASED"="1024"}
|
||||
decode_env_overrides = {"VLLM_DEEP_GEMM_WARMUP"="skip", "UCX_RCACHE_MAX_UNRELEASED"="1024"}
|
||||
|
||||
[deployment.router]
|
||||
type = "llm-d"
|
||||
scorers = { "prefix-cache-scorer" = 3.0 }
|
||||
prefill_scorer_overrides = { "queue-scorer" = 4.0, "active-request-scorer" = 5.0 }
|
||||
decode_scorer_overrides = { "active-request-scorer" = 5.0, "kv-cache-utilization-scorer" = 4.0, "queue-scorer" = 3.0 }
|
||||
non_cached_tokens = 128
|
||||
|
||||
[slurm]
|
||||
job_name = "glm5.2-16node-llmd"
|
||||
partition = "all"
|
||||
@@ -27,7 +27,8 @@ interval = 10
|
||||
max_completion_tokens = 2048
|
||||
|
||||
[[orchestrator.eval.env]]
|
||||
id = "math500"
|
||||
name = "math500"
|
||||
taskset = { id = "math500-v1" }
|
||||
num_examples = 30
|
||||
group_size = 4
|
||||
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
max_steps = 500
|
||||
|
||||
[wandb]
|
||||
project = "math-group-debug"
|
||||
name = "math-group"
|
||||
|
||||
[model]
|
||||
name = "Qwen/Qwen3-4B-Instruct-2507"
|
||||
|
||||
[orchestrator]
|
||||
batch_size = 256
|
||||
group_size = 8
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
id = "math-env"
|
||||
name = "hendrycks-math"
|
||||
args = { dataset_name = "PrimeIntellect/Hendrycks-Math", dataset_subset = "default" }
|
||||
ratio = 0.5
|
||||
|
||||
[[orchestrator.train.env]]
|
||||
id = "math-env"
|
||||
name = "acereason-math"
|
||||
args = { dataset_name = "nvidia/AceReason-Math", dataset_subset = "default", question_key = "problem" }
|
||||
ratio = 0.5
|
||||
|
||||
[orchestrator.eval]
|
||||
interval = 50
|
||||
|
||||
[[orchestrator.eval.env]]
|
||||
name = "aime2024"
|
||||
taskset = { id = "aime24-v1" }
|
||||
num_examples = 30
|
||||
group_size = 4
|
||||
|
||||
[trainer.model]
|
||||
seq_len = 4096
|
||||
|
||||
[inference.model]
|
||||
max_model_len = 2048
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ interval = 10
|
||||
max_completion_tokens = 2048
|
||||
|
||||
[[orchestrator.eval.env]]
|
||||
id = "math500"
|
||||
name = "math500"
|
||||
taskset = { id = "math500-v1" }
|
||||
num_examples = 30
|
||||
group_size = 4
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@ interval = 10
|
||||
max_completion_tokens = 4096
|
||||
|
||||
[[orchestrator.eval.env]]
|
||||
id = "math500"
|
||||
name = "math500"
|
||||
taskset = { id = "math500-v1" }
|
||||
num_examples = 30
|
||||
group_size = 4
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule deps/research-environments updated: 0687a15c60...99ebd2e133
Vendored
+1
-1
Submodule deps/verifiers updated: 20abcd9163...aa95826d4e
+4
-2
@@ -139,9 +139,11 @@ curl -s http://<decode_node>:8200/metrics | grep num_requests_waiting
|
||||
|
||||
If prefill queues and decode is idle, add prefill nodes (and vice versa).
|
||||
|
||||
**UCX 1.19 requirement.** NVSHMEM needs UCX ≥ 1.19 for multi-GPU CUDA. If your cluster doesn't ship with UCX >=1.19, you can build it from source with the following command:
|
||||
**Required setup for disaggregated P/D (NIXL/UCX).** The pip-wheel NIXL's bundled UCX segfaults on the prefill→decode KV transfer (`signal 11: invalid permissions for mapped object` in `libucs.so`) — reproduced on vLLM 0.22 and 0.23, with/without mooncake, with/without llm-d. Building NIXL against UCX 1.19.x from source is therefore **required** (not optional) for disaggregated P/D.
|
||||
|
||||
```bash
|
||||
salloc -N 1 --gres=gpu:1 bash -c 'bash scripts/install_nixl_from_source.sh'
|
||||
uv pip install --reinstall --no-deps deps/nixl_cu12-*.whl
|
||||
```
|
||||
|
||||
The script writes UCX 1.19 to `third_party/ucx/`; the bundled sbatch templates prepend it to `LD_LIBRARY_PATH` so it overrides the system version.
|
||||
The script writes UCX 1.19 to `third_party/ucx/`; the bundled sbatch templates prepend it to `LD_LIBRARY_PATH` so it overrides the system version. Re-run both commands after every `uv sync`, since the lock pins the wheel.
|
||||
@@ -245,6 +245,8 @@ For optimal P/D disaggregation deployment, we automatically set the decode `all2
|
||||
|
||||
For KV cache transfer, we utilize the NIXL connector. This is the default and only currently supported connector. We aim to support more advanced options, such as D->P transfer, or Mooncake Connector in the future.
|
||||
|
||||
> **Required:** The pip-wheel NIXL's bundled UCX segfaults on the prefill→decode KV transfer. You must build NIXL against UCX 1.19.x from source — see [Disaggregated Prefill/Decode Inference](advanced.md#disaggregated-prefilldecode-inference) in the Advanced docs for the full setup.
|
||||
|
||||
For configuring various knobs with environment variables, we enable you to configure prefill and decode environment variables separately. This is useful if you want to configure different environment variables for the prefill and decode stages.
|
||||
|
||||
```toml
|
||||
|
||||
+15
-27
@@ -92,10 +92,12 @@ FSDP2 is the default model sharding strategy. By default the trainer fully shard
|
||||
|
||||
EP shards MoE expert weights across the EP mesh, dramatically reducing the FSDP communication volume per layer and improving the training throughput. EP is only available with the custom model implementation (`model.impl = "custom"` or `"auto"` for supported families).
|
||||
|
||||
`ep` defaults to `"auto"`, which resolves at startup to the largest valid EP degree up to 8. It loads the model config to read `num_experts`, then picks the biggest divisor of `num_experts` that also divides the FSDP island size (`world_size // dp_replicate`), is a multiple of `cp`, and is <= 8. For non-MoE models, resolves to 1 (no-op). Set `ep` to an explicit integer to override:
|
||||
|
||||
```toml
|
||||
[trainer.model]
|
||||
impl = "custom"
|
||||
ep = 8 # EP degree; must divide num_experts
|
||||
ep = 8 # explicit EP degree; must divide num_experts
|
||||
ep_comm_backend = "torch" # or "deepep"
|
||||
```
|
||||
|
||||
@@ -121,7 +123,7 @@ cp_style = "ulysses" # "ring"
|
||||
| `trainer.model.ac.mode = "selective"` | medium | small |
|
||||
| `trainer.model.ac_offloading` | extra | a bit more |
|
||||
|
||||
Enable selective AC (custom impl only) for the best memory/throughput tradeoff:
|
||||
AC and AC offloading are enabled by default (full mode). For the best memory/throughput tradeoff, switch to selective AC (custom impl only):
|
||||
|
||||
```toml
|
||||
[trainer.model.ac]
|
||||
@@ -129,55 +131,41 @@ mode = "selective"
|
||||
targets = ["norm", "attn_proj"] # see Reference for the full list per architecture
|
||||
```
|
||||
|
||||
We reccomend also using `ac_offloading` and `ac_offloading.max_inflight_activations = 5` to further reduce the memory footprint in tradeoff for some throughput. We've observed this feature to be very effective, lowering the peak memory usage by 30-40% in some cases, while only lossing ~3-5% of throughput:
|
||||
|
||||
```toml
|
||||
[trainer.model.ac_offloading]
|
||||
max_inflight_activations = 5
|
||||
```
|
||||
`ac_offloading` is also on by default with `max_inflight_activations = 5`. We've observed this feature to be very effective, lowering the peak memory usage by 30-40% in some cases, while only lossing ~3-5% of throughput. To disable either, set `model.ac = "None"` or `model.ac_offloading = "None"`.
|
||||
|
||||
### Optimizer Offloading
|
||||
|
||||
Offloading optimizer states to CPU is a near-free memory win at low GPU counts:
|
||||
Offloading optimizer states to CPU is enabled by default (`optim_cpu_offload = true`) — a near-free memory win at low GPU counts:
|
||||
|
||||
```toml
|
||||
[trainer.optim]
|
||||
# any optimizer type
|
||||
type = "adamw"
|
||||
|
||||
[trainer.model]
|
||||
optim_cpu_offload = true
|
||||
optim_cpu_offload = true # already the default
|
||||
```
|
||||
|
||||
Mutually exclusive with `fsdp_cpu_offload`. Also incompatible with `trainer.max_concurrent_runs > 1` (multi-tenant training). Muon doesn't support `fsdp_cpu_offload` but does support `optim_cpu_offload`.
|
||||
Mutually exclusive with `fsdp_cpu_offload`. Also incompatible with `trainer.max_concurrent_runs > 1` (multi-tenant training) — set `optim_cpu_offload = false` for multi-run. Muon doesn't support `fsdp_cpu_offload` but does support `optim_cpu_offload`.
|
||||
|
||||
### LM Head Chunking
|
||||
|
||||
The vanilla LM head materializes a `[batch * seq, vocab]` logits tensor on every step — a major memory tax when the vocabulary is large (often >100K). `fused_lm_head_token_chunk_size` swaps in a custom fused linear + logprob/entropy kernel that streams through `chunk_size` tokens at a time, avoiding the materialization:
|
||||
The vanilla LM head materializes a `[batch * seq, vocab]` logits tensor on every step — a major memory tax when the vocabulary is large (often >100K). `fused_lm_head_token_chunk_size` swaps in a custom fused linear + logprob/entropy kernel that streams through `chunk_size` tokens at a time, avoiding the materialization. It defaults to `1024` for RL training:
|
||||
|
||||
```toml
|
||||
[trainer.model]
|
||||
fused_lm_head_token_chunk_size = "auto" # picks 8192 for RL
|
||||
# or explicit:
|
||||
# fused_lm_head_token_chunk_size = 1024 # smaller = lower memory, more launches
|
||||
# fused_lm_head_token_chunk_size = "disabled" # default; vanilla LM head
|
||||
fused_lm_head_token_chunk_size = 1024 # default
|
||||
# fused_lm_head_token_chunk_size = "auto" # picks 8192 for RL
|
||||
# fused_lm_head_token_chunk_size = "disabled" # vanilla LM head
|
||||
```
|
||||
|
||||
`auto` is a safe starting point for RL. Drop the chunk size further when peak memory is still tight (e.g. with very long sequences); raise it to amortize kernel-launch overhead. Only available with `model.impl = "custom"`, and currently RL-only — the SFT trainer rejects integer values.
|
||||
Drop the chunk size further when peak memory is still tight (e.g. with very long sequences); raise it to amortize kernel-launch overhead. SFT training silently disables this (not supported yet). Only available with `model.impl = "custom"`.
|
||||
|
||||
## Memory-Tight Recipe
|
||||
|
||||
The kitchen-sink config for fitting large MoE on limited GPUs at acceptable throughput:
|
||||
The kitchen-sink config for fitting large MoE on limited GPUs at acceptable throughput. AC, AC offloading, compile, fused LM head chunking, optimizer offload, and EP auto-resolution are on by default — only CP needs to be set explicitly (and EP overridden if auto-resolution is not desired):
|
||||
|
||||
```toml
|
||||
[trainer.model]
|
||||
impl = "custom"
|
||||
fused_lm_head_token_chunk_size = 1024
|
||||
ep = 8
|
||||
cp = 2
|
||||
optim_cpu_offload = true
|
||||
|
||||
[trainer.model.compile]
|
||||
|
||||
[trainer.model.ac]
|
||||
freq = 1
|
||||
@@ -186,7 +174,7 @@ freq = 1
|
||||
max_inflight_activations = 1
|
||||
```
|
||||
|
||||
Walks through every memory lever in order: FSDP+EP shard the weights, CP shards the activations along the token dim, AC + AC offloading shrink the activation footprint, fused LM head chunks the loss, `torch.compile` reduces fragmentation, optim offload moves Adam state off GPU. Apply selectively — each knob has a throughput cost.
|
||||
The defaults already cover: fused LM head chunking (`1024`), `torch.compile` (fullgraph=False), AC (full mode), AC offloading (`max_inflight_activations=5`), and optimizer CPU offload. Walks through every memory lever in order: FSDP+EP shard the weights, CP shards the activations along the token dim, AC + AC offloading shrink the activation footprint, fused LM head chunks the loss, `torch.compile` reduces fragmentation, optim offload moves Adam state off GPU. Apply selectively — each knob has a throughput cost.
|
||||
|
||||
## SLURM
|
||||
|
||||
|
||||
@@ -347,18 +347,12 @@ class SFTConfig(BaseConfig):
|
||||
|
||||
@model_validator(mode="after")
|
||||
def validate_and_disable_chunked_loss(self):
|
||||
if isinstance(self.model.fused_lm_head_token_chunk_size, int):
|
||||
raise ValueError(
|
||||
"Chunked loss is not supported for SFT training yet, please set "
|
||||
"`model.fused_lm_head_token_chunk_size` to 'disabled'"
|
||||
)
|
||||
|
||||
self.model.fused_lm_head_token_chunk_size = "disabled"
|
||||
return self
|
||||
|
||||
@model_validator(mode="after")
|
||||
def ep_only_with_custom_impl(self):
|
||||
if self.model.ep > 1 and self.model.impl not in ("custom", "auto"):
|
||||
if self.model.ep != 1 and self.model.ep != "auto" and self.model.impl not in ("custom", "auto"):
|
||||
raise ValueError("EP is only supported with the custom implementation or auto mode")
|
||||
|
||||
return self
|
||||
|
||||
@@ -83,10 +83,6 @@ class BaseModelConfig(BaseConfig):
|
||||
vlm: "VLMConfig | None" = None
|
||||
"""VLM configuration. Setting this enables vision-language model support."""
|
||||
|
||||
@property
|
||||
def is_vlm(self) -> bool:
|
||||
return self.vlm is not None
|
||||
|
||||
|
||||
class ElasticConfig(BaseConfig):
|
||||
hostname: str
|
||||
|
||||
@@ -122,19 +122,19 @@ class ModelConfig(BaseModelConfig):
|
||||
attn: AttnImplementation = "flash_attention_2"
|
||||
"""Attention implementation. With CP enabled, ring attention uses the matching kernel family (FA2/FA3/FA4)."""
|
||||
|
||||
compile: CompileConfig | None = None
|
||||
compile: CompileConfig | None = CompileConfig()
|
||||
"""Compile the model with ``torch.compile``."""
|
||||
|
||||
ac: ActivationCheckpointConfig | None = None
|
||||
ac: ActivationCheckpointConfig | None = ActivationCheckpointConfig()
|
||||
"""Activation checkpointing configuration. If None, activation checkpointing is disabled."""
|
||||
|
||||
ac_offloading: ActivationOffloadingConfig | None = None
|
||||
ac_offloading: ActivationOffloadingConfig | None = ActivationOffloadingConfig()
|
||||
"""Activation offloading configuration. If None, activation offloading is disabled."""
|
||||
|
||||
fsdp_cpu_offload: bool = False
|
||||
"""Enable FSDP CPU offloading for parameters, gradients, and optimizer states. Uses pinned memory for efficient CPU↔GPU transfers."""
|
||||
|
||||
optim_cpu_offload: bool = False
|
||||
optim_cpu_offload: bool = True
|
||||
"""Offload only optimizer states (momentum, variance) to CPU, keeping weights on GPU. Avoids the H2D all-gather overhead of FSDP CPU offload while still saving GPU memory."""
|
||||
|
||||
reshard_after_forward: bool = True
|
||||
@@ -143,8 +143,8 @@ class ModelConfig(BaseModelConfig):
|
||||
dp_replicate: int = 1
|
||||
"""Data parallel dim where model weights are replicated."""
|
||||
|
||||
ep: int = 1
|
||||
"""Expert parallelism degree for MoE layers. 1 disables EP."""
|
||||
ep: int | Literal["auto"] = "auto"
|
||||
"""Expert parallelism degree for MoE layers. 1 disables EP. ``auto`` resolves to ``min(fsdp_island_size, 8)`` for MoE models (where ``fsdp_island_size = world_size // dp_replicate``), and to 1 for non-MoE models. Set an explicit integer to override."""
|
||||
|
||||
ep_comm_backend: EPCommBackend = "torch"
|
||||
"""Communication backend for expert parallelism. ``torch`` uses TorchTitan all-to-all collectives; ``deepep`` uses DeepEP custom kernels."""
|
||||
@@ -188,8 +188,8 @@ class ModelConfig(BaseModelConfig):
|
||||
debug: DebugModelConfig = DebugModelConfig()
|
||||
"""Debugging knobs for the model and distributed training."""
|
||||
|
||||
fused_lm_head_token_chunk_size: int | Literal["auto", "disabled"] = "disabled"
|
||||
"""Flattened token chunk size for the fused LM head. ``int >= 1`` sets the tokens per LM-head chunk explicitly; ``auto`` auto-enables (RL training picks 8192); ``disabled`` uses the vanilla LM head. Integer values aren't supported for SFT training."""
|
||||
fused_lm_head_token_chunk_size: int | Literal["auto", "disabled"] = 1024
|
||||
"""Flattened token chunk size for the fused LM head. ``int >= 1`` sets the tokens per LM-head chunk explicitly; ``auto`` auto-enables (RL training picks 8192); ``disabled`` uses the vanilla LM head. SFT training silently disables this (not supported yet)."""
|
||||
|
||||
@model_validator(mode="before")
|
||||
@classmethod
|
||||
@@ -258,7 +258,7 @@ class ModelConfig(BaseModelConfig):
|
||||
if self.ep_comm_backend == "torch":
|
||||
return self
|
||||
|
||||
if self.ep <= 1:
|
||||
if isinstance(self.ep, int) and self.ep <= 1:
|
||||
raise ValueError(f"model.ep_comm_backend='{self.ep_comm_backend}' requires model.ep > 1.")
|
||||
|
||||
return self
|
||||
@@ -666,7 +666,7 @@ class TrainerConfig(BaseConfig):
|
||||
|
||||
@model_validator(mode="after")
|
||||
def ep_only_with_custom_impl(self):
|
||||
if self.model.ep > 1 and self.model.impl not in ("custom", "auto"):
|
||||
if self.model.ep != 1 and self.model.ep != "auto" and self.model.impl not in ("custom", "auto"):
|
||||
raise ValueError("EP is only supported with the custom implementation or auto mode")
|
||||
|
||||
return self
|
||||
|
||||
+17
-21
@@ -19,7 +19,7 @@ dependencies = [
|
||||
"torchaudio",
|
||||
"torchdata>=0.11.0",
|
||||
"transformers==5.6.2",
|
||||
"vllm>=0.22.0",
|
||||
"vllm>=0.23.0",
|
||||
"mooncake-transfer-engine>=0.3.10.post2",
|
||||
"wandb>=0.26.1",
|
||||
"ring-flash-attn>=0.1.8",
|
||||
@@ -33,7 +33,7 @@ dependencies = [
|
||||
"setproctitle>=1.3.0",
|
||||
"uvloop>=0.21.0",
|
||||
"torchtitan",
|
||||
"verifiers>=0.1.15.dev394",
|
||||
"verifiers>=0.1.15.dev400",
|
||||
"renderers",
|
||||
"dion",
|
||||
"tilelang>=0.1.8",
|
||||
@@ -67,22 +67,14 @@ flash-attn-cute = [
|
||||
]
|
||||
envs = [
|
||||
"alphabet-sort",
|
||||
"code-env",
|
||||
"general-agent",
|
||||
"hle",
|
||||
"ifeval",
|
||||
"logic-env",
|
||||
"math-env",
|
||||
"math-python",
|
||||
"math500",
|
||||
"mmlu-pro",
|
||||
"reverse-text",
|
||||
"rlm-swe",
|
||||
"rlm-search",
|
||||
"uuid-ctf-v1",
|
||||
"science-env",
|
||||
"simpleqa-verified",
|
||||
"tau2-bench",
|
||||
"wiki-search",
|
||||
"wordle",
|
||||
"reverse-text-v1",
|
||||
@@ -109,6 +101,12 @@ envs = [
|
||||
"general-agent-v1",
|
||||
"swebench-verified-v1",
|
||||
"tau2-bench-v1",
|
||||
"math500-v1",
|
||||
"mmlu-pro-v1",
|
||||
"ifeval-v1",
|
||||
"simpleqa-verified-v1",
|
||||
"i3-code-v1",
|
||||
"i3-science-v1",
|
||||
]
|
||||
disagg = [
|
||||
"deep-ep ; platform_machine == 'x86_64'",
|
||||
@@ -168,7 +166,7 @@ override-dependencies = [
|
||||
"transformers==5.6.2",
|
||||
"torch>=2.9.0",
|
||||
"openenv-core",
|
||||
"verifiers>=0.1.15.dev394",
|
||||
"verifiers>=0.1.15.dev400",
|
||||
]
|
||||
|
||||
# ModelExpress 0.3.0 publishes protobuf<6 metadata, but its generated proto is
|
||||
@@ -221,22 +219,14 @@ verifiers = { path = "deps/verifiers", editable = true }
|
||||
renderers = { path = "deps/renderers", editable = true }
|
||||
prime-pydantic-config = { path = "deps/pydantic-config", editable = true }
|
||||
alphabet-sort = { path = "deps/verifiers/environments/alphabet_sort", editable = true }
|
||||
code-env = { path = "deps/research-environments/environments/code_env", editable = true }
|
||||
general-agent = { path = "deps/research-environments/environments/general_agent", editable = true }
|
||||
hle = { path = "deps/research-environments/environments/hle", editable = true }
|
||||
ifeval = { path = "deps/research-environments/environments/ifeval", editable = true }
|
||||
logic-env = { path = "deps/research-environments/environments/logic_env", editable = true }
|
||||
math-env = { path = "deps/research-environments/environments/math_env", editable = true }
|
||||
math-python = { path = "deps/verifiers/environments/math_python", editable = true }
|
||||
math500 = { path = "deps/research-environments/environments/math500", editable = true }
|
||||
mmlu-pro = { path = "deps/research-environments/environments/mmlu_pro", editable = true }
|
||||
reverse-text = { path = "deps/verifiers/environments/reverse_text", editable = true }
|
||||
rlm-swe = { path = "deps/research-environments/environments/rlm_swe", editable = true }
|
||||
rlm-search = { path = "deps/research-environments/environments/rlm_search", editable = true }
|
||||
uuid-ctf-v1 = { path = "deps/research-environments/environments/uuid_ctf_v1", editable = true }
|
||||
science-env = { path = "deps/research-environments/environments/science_env", editable = true }
|
||||
simpleqa-verified = { path = "deps/research-environments/environments/simpleqa_verified", editable = true }
|
||||
tau2-bench = { path = "deps/research-environments/environments/tau2_bench", editable = true }
|
||||
wiki-search = { path = "deps/verifiers/environments/wiki_search", editable = true }
|
||||
wordle = { path = "deps/verifiers/environments/wordle", editable = true }
|
||||
reverse-text-v1 = { path = "deps/verifiers/environments/reverse_text_v1", editable = true }
|
||||
@@ -263,6 +253,12 @@ wordle-v1 = { path = "deps/verifiers/environments/wordle_v1", editable = true }
|
||||
general-agent-v1 = { path = "deps/research-environments/environments/general_agent_v1", editable = true }
|
||||
swebench-verified-v1 = { path = "deps/research-environments/environments/swebench_verified_v1", editable = true }
|
||||
tau2-bench-v1 = { path = "deps/research-environments/environments/tau2_bench_v1", editable = true }
|
||||
math500-v1 = { path = "deps/research-environments/environments/math500_v1", editable = true }
|
||||
mmlu-pro-v1 = { path = "deps/research-environments/environments/mmlu_pro_v1", editable = true }
|
||||
ifeval-v1 = { path = "deps/research-environments/environments/ifeval_v1", editable = true }
|
||||
simpleqa-verified-v1 = { path = "deps/research-environments/environments/simpleqa_verified_v1", editable = true }
|
||||
i3-code-v1 = { path = "deps/research-environments/environments/i3_code_v1", editable = true }
|
||||
i3-science-v1 = { path = "deps/research-environments/environments/i3_science_v1", editable = true }
|
||||
torch = { index = "pytorch-cu128" }
|
||||
torchvision = { index = "pytorch-cu128" }
|
||||
torchaudio = { index = "pytorch-cu128" }
|
||||
@@ -271,8 +267,8 @@ dion = { git = "https://github.com/samsja/dion.git", rev = "d891eeb" }
|
||||
flash-attn-4 = { git = "https://github.com/Dao-AILab/flash-attention.git", subdirectory = "flash_attn/cute", rev = "96bd151" }
|
||||
vllm-router = { url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" }
|
||||
vllm = [
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl", marker = "platform_machine == 'x86_64'" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl", marker = "platform_machine == 'aarch64'" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl", marker = "platform_machine == 'x86_64'" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl", marker = "platform_machine == 'aarch64'" },
|
||||
]
|
||||
deep-ep = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_ep-1.2.1+29d31c0-cp312-cp312-linux_x86_64.whl" }
|
||||
deep-gemm = { url = "https://github.com/PrimeIntellect-ai/prime-rl/releases/download/v0.5.0/deep_gemm-2.5.0+891d57b-cp312-cp312-linux_x86_64.whl" }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import torch
|
||||
from vllm.triton_utils import tl, triton
|
||||
|
||||
from prime_rl.inference.vllm.padded_input_scrub import monkey_patch_vllm_padded_input_scrub
|
||||
|
||||
@@ -15,10 +14,9 @@ def transformers_v5_compat():
|
||||
if not hasattr(Qwen3VLMoeTextConfig, "tie_word_embeddings"):
|
||||
Qwen3VLMoeTextConfig.tie_word_embeddings = False
|
||||
|
||||
_patch_qwen35_lora()
|
||||
_patch_lora_key_prefix()
|
||||
_patch_qwen35_moe_lora_format()
|
||||
monkey_patch_nano_v3_reasoning_parser()
|
||||
monkey_patch_deep_gemm_silu_mul_quant_int64()
|
||||
monkey_patch_vllm_padded_input_scrub()
|
||||
monkey_patch_return_routed_experts_with_nixl_connector()
|
||||
monkey_patch_kv_xfer_finished_tolerate_freed()
|
||||
@@ -184,200 +182,28 @@ def monkey_patch_strip_routed_experts_from_chat():
|
||||
)
|
||||
|
||||
|
||||
@triton.jit
|
||||
def _silu_mul_per_token_group_quant_fp8_colmajor_int64_kernel(
|
||||
y_ptr,
|
||||
y_q_ptr,
|
||||
y_s_ptr,
|
||||
M: tl.int64,
|
||||
N: tl.int64,
|
||||
y_s_col_stride: tl.int64,
|
||||
eps,
|
||||
clamp_limit,
|
||||
fp8_min: tl.constexpr,
|
||||
fp8_max: tl.constexpr,
|
||||
use_ue8m0: tl.constexpr,
|
||||
HAS_CLAMP: tl.constexpr,
|
||||
GROUP_SIZE: tl.constexpr,
|
||||
BLOCK_M: tl.constexpr,
|
||||
BLOCK_N: tl.constexpr,
|
||||
):
|
||||
pid_m = tl.program_id(0)
|
||||
pid_n = tl.program_id(1)
|
||||
N_2 = N // 2
|
||||
def _patch_qwen35_moe_lora_format():
|
||||
"""Force Qwen3.5-MoE onto vLLM's 2D per-expert LoRA format.
|
||||
|
||||
m_offset = (pid_m * BLOCK_M).to(tl.int64)
|
||||
n_offset = (pid_n * BLOCK_N).to(tl.int64)
|
||||
if m_offset >= M:
|
||||
return
|
||||
vLLM 0.23.0 defaults ``Qwen3_5MoeForConditionalGeneration.is_3d_moe_weight = True``,
|
||||
which makes the LoRA loader expect 3D stacked-expert adapters
|
||||
(``base_layer.lora_{A,B}.weight`` / ``lora_{A,B}.weight``, experts folded into the
|
||||
rank dim; see ``_stack_moe_lora_weights``). Our trainer instead emits the 2D
|
||||
per-expert layout (``{expert_id}.gate_proj.lora_A.weight`` ...) from
|
||||
``MultiLoRAGroupedExperts.state_dict_for_adapter`` -- vLLM only consults that layout
|
||||
when ``is_3d_moe_weight`` is False (or ``enable_mixed_moe_lora_format=True``).
|
||||
Without this override the adapters fail to load with key/shape mismatches.
|
||||
|
||||
offs_n = tl.arange(0, BLOCK_N).to(tl.int64)
|
||||
offs_m = tl.arange(0, BLOCK_M).to(tl.int64)
|
||||
|
||||
base_y_ptr = y_ptr + m_offset * N + n_offset
|
||||
act_in_ptrs = base_y_ptr + offs_m[:, None] * N + offs_n[None, :]
|
||||
|
||||
act_in = tl.load(act_in_ptrs)
|
||||
mul_in = tl.load(act_in_ptrs + N_2)
|
||||
|
||||
if HAS_CLAMP:
|
||||
act_in = tl.minimum(act_in.to(tl.float32), clamp_limit).to(y_ptr.dtype.element_ty)
|
||||
mul_in = tl.clamp(mul_in.to(tl.float32), -clamp_limit, clamp_limit).to(y_ptr.dtype.element_ty)
|
||||
act_in = act_in.to(tl.float32)
|
||||
one_f32 = tl.cast(1, tl.float32)
|
||||
silu_out = (act_in / (one_f32 + tl.exp(-act_in))).to(y_ptr.dtype.element_ty)
|
||||
y = (silu_out * mul_in).to(tl.float32)
|
||||
|
||||
absmax = tl.maximum(tl.max(tl.abs(y), axis=1), eps)
|
||||
scale_raw = absmax * (1.0 / fp8_max)
|
||||
y_s = tl.math.exp2(tl.ceil(tl.log2(scale_raw))) if use_ue8m0 else scale_raw
|
||||
y_s = tl.reshape(y_s, (BLOCK_M, 1))
|
||||
y_q = tl.clamp(y / y_s, fp8_min, fp8_max).to(y_q_ptr.dtype.element_ty)
|
||||
|
||||
base_y_q_ptr = y_q_ptr + m_offset * N_2 + n_offset
|
||||
y_q_ptrs = base_y_q_ptr + offs_m[:, None] * N_2 + offs_n[None, :]
|
||||
tl.store(y_q_ptrs, y_q)
|
||||
|
||||
group_id = n_offset // GROUP_SIZE
|
||||
base_y_s_ptr = y_s_ptr + group_id * y_s_col_stride + m_offset
|
||||
y_s_ptrs = base_y_s_ptr + offs_m
|
||||
y_s = tl.reshape(y_s, (BLOCK_M,))
|
||||
tl.store(y_s_ptrs, y_s)
|
||||
|
||||
|
||||
def _silu_mul_per_token_group_quant_fp8_colmajor_int64(
|
||||
input: torch.Tensor,
|
||||
output: torch.Tensor | None = None,
|
||||
use_ue8m0: bool | None = None,
|
||||
eps: float = 1e-10,
|
||||
clamp_limit: float | None = None,
|
||||
):
|
||||
from vllm.platforms import current_platform
|
||||
from vllm.utils.deep_gemm import is_deep_gemm_e8m0_used
|
||||
|
||||
group_size = 128
|
||||
assert input.ndim == 2
|
||||
if output is not None:
|
||||
assert output.ndim == 2
|
||||
assert input.size(0) % group_size == 0
|
||||
assert input.size(1) % (group_size * 2) == 0
|
||||
|
||||
if use_ue8m0 is None:
|
||||
use_ue8m0 = is_deep_gemm_e8m0_used()
|
||||
|
||||
M, N = input.size()
|
||||
N_2 = N // 2
|
||||
|
||||
fp8_dtype = current_platform.fp8_dtype()
|
||||
if output is None:
|
||||
output = torch.empty((M, N_2), dtype=fp8_dtype, device=input.device)
|
||||
|
||||
output_scales = torch.empty(((N_2 // group_size), M), dtype=torch.float32, device=input.device).transpose(0, 1)
|
||||
|
||||
block_m = 8
|
||||
block_n = group_size
|
||||
assert M % block_m == 0
|
||||
assert N_2 % block_n == 0
|
||||
|
||||
finfo = torch.finfo(fp8_dtype)
|
||||
fp8_min = -224.0 if current_platform.is_fp8_fnuz() else finfo.min
|
||||
fp8_max = 224.0 if current_platform.is_fp8_fnuz() else finfo.max
|
||||
|
||||
has_clamp = clamp_limit is not None
|
||||
grid = (M // block_m, N_2 // block_n)
|
||||
_silu_mul_per_token_group_quant_fp8_colmajor_int64_kernel[grid](
|
||||
input,
|
||||
output,
|
||||
output_scales,
|
||||
M,
|
||||
N,
|
||||
output_scales.stride(-1),
|
||||
eps,
|
||||
clamp_limit if has_clamp else 0.0,
|
||||
fp8_min,
|
||||
fp8_max,
|
||||
use_ue8m0,
|
||||
has_clamp,
|
||||
group_size,
|
||||
block_m,
|
||||
block_n,
|
||||
)
|
||||
|
||||
return output, output_scales
|
||||
|
||||
|
||||
def monkey_patch_deep_gemm_silu_mul_quant_int64():
|
||||
import sys
|
||||
|
||||
from vllm.logger import init_logger
|
||||
from vllm.model_executor.layers.quantization.utils import fp8_utils
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
fp8_utils.silu_mul_per_token_group_quant_fp8_colmajor = _silu_mul_per_token_group_quant_fp8_colmajor_int64
|
||||
|
||||
deep_gemm_moe_module = sys.modules.get("vllm.model_executor.layers.fused_moe.experts.deep_gemm_moe")
|
||||
if deep_gemm_moe_module is not None:
|
||||
deep_gemm_moe_module.silu_mul_per_token_group_quant_fp8_colmajor = (
|
||||
_silu_mul_per_token_group_quant_fp8_colmajor_int64
|
||||
)
|
||||
|
||||
logger.warning("Enabled int64-addressing Triton patch for vLLM DeepGEMM SiLU/mul FP8 quant.")
|
||||
|
||||
|
||||
def _patch_qwen35_lora():
|
||||
"""Fix Qwen3.5 LoRA: align packed_modules_mapping with output_sizes.
|
||||
|
||||
Qwen3.5's GDN layers use create_qkvz_proj with 4 output_sizes (q, k, v, z)
|
||||
but packed_modules_mapping only lists 2 entries, causing an IndexError
|
||||
during LoRA initialization.
|
||||
|
||||
Also generalizes MergedColumnParallelLinearWithLoRA.can_replace_layer
|
||||
to accept any number of packed modules (not just 2), and generalizes
|
||||
MergedColumnParallelLinearWithShardedLoRA.slice_lora_a to handle N
|
||||
subloras instead of the hardcoded 2 (needed for fully_sharded_loras=True).
|
||||
|
||||
Upstream: https://github.com/vllm-project/vllm/issues/36372
|
||||
The rest of the old Qwen3.5 LoRA shim (the in_proj_qkvz packed-mapping fix and the
|
||||
N-slice ``can_replace_layer`` / ``slice_lora_a`` generalizations for vllm#36372) is
|
||||
handled natively by 0.23.0 and was dropped. Remove this too once we either adopt the
|
||||
3D stacked save format (like gpt-oss) or start the engine with
|
||||
``enable_mixed_moe_lora_format=True``.
|
||||
"""
|
||||
from vllm.lora.layers.column_parallel_linear import (
|
||||
MergedColumnParallelLinearWithLoRA,
|
||||
MergedColumnParallelLinearWithShardedLoRA,
|
||||
)
|
||||
from vllm.model_executor.models.qwen3_5 import (
|
||||
Qwen3_5ForCausalLMBase,
|
||||
Qwen3_5ForConditionalGeneration,
|
||||
Qwen3_5MoeForConditionalGeneration,
|
||||
)
|
||||
|
||||
qkvz_fix = ["in_proj_q", "in_proj_k", "in_proj_v", "in_proj_z"]
|
||||
|
||||
Qwen3_5ForCausalLMBase.packed_modules_mapping["in_proj_qkvz"] = qkvz_fix
|
||||
Qwen3_5ForConditionalGeneration.packed_modules_mapping["in_proj_qkvz"] = qkvz_fix
|
||||
from vllm.model_executor.models.qwen3_5 import Qwen3_5MoeForConditionalGeneration
|
||||
|
||||
Qwen3_5MoeForConditionalGeneration.is_3d_moe_weight = False
|
||||
|
||||
from vllm.lora.layers.utils import _not_fully_sharded_can_replace
|
||||
|
||||
@classmethod
|
||||
@_not_fully_sharded_can_replace
|
||||
def can_replace_layer(cls, source_layer, lora_config, packed_modules_list, model_config=None):
|
||||
from vllm.model_executor.layers.linear import MergedColumnParallelLinear
|
||||
|
||||
return type(source_layer) is MergedColumnParallelLinear and len(packed_modules_list) == len(
|
||||
source_layer.output_sizes
|
||||
)
|
||||
|
||||
MergedColumnParallelLinearWithLoRA.can_replace_layer = can_replace_layer
|
||||
|
||||
def slice_lora_a(self, lora_a):
|
||||
output_shard_size = self.lora_a_stacked[0].shape[2]
|
||||
output_start_idx = self.tp_rank * output_shard_size
|
||||
return [
|
||||
a[output_start_idx : output_start_idx + output_shard_size, :] if a is not None else None for a in lora_a
|
||||
]
|
||||
|
||||
MergedColumnParallelLinearWithShardedLoRA.slice_lora_a = slice_lora_a
|
||||
|
||||
|
||||
def _patch_lora_key_prefix():
|
||||
"""Patch vLLM's LoRA loading to handle keys without base_model.model. prefix.
|
||||
@@ -781,9 +607,10 @@ def monkey_patch_minimax_m2_for_lora():
|
||||
still runs for all wrapped layers when any adapter is active — and it
|
||||
asserts inputs are float16/bfloat16. Qwen3 MoE doesn't have this
|
||||
problem because its gate uses the model dtype.
|
||||
Fix: recreate the gate in model dtype and remove the float32 cast.
|
||||
FusedMoE already has router_logits_dtype=float32, so routing precision
|
||||
is preserved inside the expert dispatch.
|
||||
Fix: rebuild the gate as GateLinear with a bf16 weight (out_dtype=float32
|
||||
keeps fp32 router logits). vLLM 0.23.0's own forward already drops the
|
||||
float32 input cast. FusedMoE also has router_logits_dtype=float32, so
|
||||
routing precision is preserved inside the expert dispatch.
|
||||
|
||||
Problem 2 — Adapter key naming mismatch:
|
||||
PrimeRL saves adapter keys using its internal naming convention
|
||||
@@ -805,13 +632,17 @@ def monkey_patch_minimax_m2_for_lora():
|
||||
|
||||
def _patched_init(self, config, quant_config=None, prefix=""):
|
||||
_original_init(self, config, quant_config, prefix)
|
||||
from vllm.model_executor.layers.linear import ReplicatedLinear
|
||||
from vllm.model_executor.layers.fused_moe.router.gate_linear import GateLinear
|
||||
|
||||
self.gate = ReplicatedLinear(
|
||||
# vLLM 0.23.0 builds the gate as GateLinear with a float32 weight; rebuild it
|
||||
# with a bf16 weight (model dtype) so the LoRA Triton kernel's float16/bfloat16
|
||||
# assertion passes, keeping out_dtype=float32 so router logits stay fp32 (the
|
||||
# GateLinear bf16xbf16->fp32 path).
|
||||
self.gate = GateLinear(
|
||||
config.hidden_size,
|
||||
config.num_local_experts,
|
||||
bias=False,
|
||||
quant_config=None,
|
||||
out_dtype=torch.float32,
|
||||
prefix=f"{prefix}.gate",
|
||||
)
|
||||
|
||||
|
||||
@@ -11,6 +11,15 @@ 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.23.0 routes dense Llama/Mistral/Qwen3 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.
|
||||
os.environ.setdefault("VLLM_USE_V2_MODEL_RUNNER", "0")
|
||||
|
||||
deep_gemm_enabled = "1" if config.use_deep_gemm else "0"
|
||||
os.environ["VLLM_USE_DEEP_GEMM"] = deep_gemm_enabled
|
||||
os.environ["VLLM_MOE_USE_DEEP_GEMM"] = deep_gemm_enabled
|
||||
|
||||
@@ -43,7 +43,7 @@ from vllm.entrypoints.serve.disagg.protocol import (
|
||||
GenerateResponseChoice,
|
||||
)
|
||||
from vllm.entrypoints.serve.disagg.serving import ServingTokens
|
||||
from vllm.entrypoints.utils import get_max_tokens
|
||||
from vllm.entrypoints.serve.utils.api_utils import get_max_tokens
|
||||
from vllm.outputs import RequestOutput
|
||||
from vllm.sampling_params import RequestOutputKind, SamplingParams
|
||||
|
||||
|
||||
@@ -24,17 +24,22 @@ else:
|
||||
|
||||
logger = init_logger("vllm.inference.vllm.worker_nccl")
|
||||
|
||||
# NemotronH mixer.D is dropped by vLLM 0.22's layerwise online-reload path (left uninitialized).
|
||||
# NemotronH mixer.D is dropped by vLLM's layerwise online-reload path (left uninitialized).
|
||||
_RELOAD_CORRUPTED_SUFFIXES = (".mixer.D",)
|
||||
|
||||
|
||||
def _restore_reload_corrupted_params(model: Module, received: dict[str, torch.Tensor]) -> None:
|
||||
"""Work around a vLLM 0.22 layerwise-reload bug for NemotronH.
|
||||
"""Work around a vLLM layerwise-reload bug for NemotronH (present through vLLM 0.23.0).
|
||||
|
||||
The online reload drops the weight load for every Mamba layer's ``mixer.D`` (the SSD skip
|
||||
connection), leaving it as uninitialized ``empty_strided`` memory -- it reads back as garbage
|
||||
(NaN/inf) and the logits go NaN after a weight update. The received broadcast value is correct,
|
||||
so restore D from it via the param's own ``weight_loader``. Remove once the upstream bug is fixed.
|
||||
(NaN/inf) and the logits go NaN after a weight update. Root cause: ``mixer.A`` is loaded with
|
||||
``composed_weight_loader`` (an extra in-place transform copy), so the reload element counter
|
||||
double-counts ``A`` and finalizes the layer before ``D`` (loaded last) is loaded. The received
|
||||
broadcast value is correct, so restore D from it via the param's own ``weight_loader``.
|
||||
|
||||
Fixed upstream by vllm-project/vllm#44814 (merged 2026-06-10) but NOT in the pinned 0.23.0
|
||||
release; remove this shim once we bump to a vLLM release that includes it.
|
||||
"""
|
||||
|
||||
def _layer_key(name: str) -> str:
|
||||
@@ -179,7 +184,7 @@ class NCCLWeightUpdateWorker(Worker):
|
||||
update_mla_absorbed_weights(model)
|
||||
return
|
||||
|
||||
# vLLM 0.22's layerwise reload drops NemotronH mixer.D's weight load (see
|
||||
# vLLM's layerwise reload drops NemotronH mixer.D's weight load (see
|
||||
# _restore_reload_corrupted_params). Capture the correct received value to restore after.
|
||||
received_reload_fix: dict[str, torch.Tensor] = {}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ class EvalSink:
|
||||
|
||||
if valid:
|
||||
rewards = [r.reward for r in valid]
|
||||
lens = [r.completion_len for r in valid]
|
||||
lens = [sum(b.output_len for b in r.branches) for r in valid]
|
||||
metrics.group_size = self.group_size_for(env_name)
|
||||
metrics.reward_mean = float(sum(rewards) / len(rewards))
|
||||
metrics.completion_len_mean = float(sum(lens) / len(lens))
|
||||
|
||||
@@ -22,7 +22,6 @@ if TYPE_CHECKING:
|
||||
@dataclass
|
||||
class FilterResult:
|
||||
detected: bool
|
||||
detection_index: int | None = None
|
||||
|
||||
|
||||
class RolloutFilter(Protocol):
|
||||
@@ -50,7 +49,6 @@ class GibberishFilter:
|
||||
enforce: bool = False
|
||||
|
||||
def check(self, rollout: Rollout) -> FilterResult:
|
||||
global_idx = 0
|
||||
for branch in rollout.branches:
|
||||
# branch.{token_ids,logprobs,sampled_mask} are flat and mutually aligned; the raw
|
||||
# node arrays are not (node.logprobs covers only the sampled suffix, not the
|
||||
@@ -59,8 +57,7 @@ class GibberishFilter:
|
||||
if not sampled:
|
||||
continue
|
||||
if token_id > self.token_id_threshold and logprob < self.logprob_threshold:
|
||||
return FilterResult(detected=True, detection_index=global_idx)
|
||||
global_idx += 1
|
||||
return FilterResult(detected=True)
|
||||
return FilterResult(detected=False)
|
||||
|
||||
|
||||
@@ -82,7 +79,6 @@ class RepetitionFilter:
|
||||
enforce: bool = False
|
||||
|
||||
def check(self, rollout: Rollout) -> FilterResult:
|
||||
global_idx = 0
|
||||
for branch in rollout.branches:
|
||||
# Aligned branch streams (see GibberishFilter), and reset the streak per branch:
|
||||
# flat rollout.nodes interleaves distinct root->leaf paths (compaction/subagents),
|
||||
@@ -96,8 +92,7 @@ class RepetitionFilter:
|
||||
else:
|
||||
consecutive = 0
|
||||
if consecutive >= self.window:
|
||||
return FilterResult(detected=True, detection_index=global_idx)
|
||||
global_idx += 1
|
||||
return FilterResult(detected=True)
|
||||
return FilterResult(detected=False)
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ from transformers.configuration_utils import PretrainedConfig
|
||||
from transformers.generation import GenerationMixin
|
||||
from transformers.modeling_layers import GradientCheckpointingLayer
|
||||
from transformers.modeling_outputs import MoeModelOutputWithPast
|
||||
from transformers.modeling_rope_utils import ROPE_INIT_FUNCTIONS, dynamic_rope_update
|
||||
from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeVisionModel
|
||||
from transformers.processing_utils import Unpack
|
||||
from transformers.utils import TransformersKwargs, logging
|
||||
@@ -17,8 +18,8 @@ from transformers.utils import TransformersKwargs, logging
|
||||
from prime_rl.trainer.models.base import PreTrainedModelPrimeRL
|
||||
from prime_rl.trainer.models.layers.lm_head import PrimeLmOutput
|
||||
from prime_rl.trainer.models.layers.moe import FeedForward, MoE, MoEArgs
|
||||
from prime_rl.trainer.models.layers.rotary_emb import RotaryEmbedding, RotaryEmbeddingConfig, apply_rotary_pos_emb
|
||||
from prime_rl.utils.sequence import get_cu_seqlens_from_position_ids
|
||||
from prime_rl.trainer.models.layers.rotary_emb import apply_rotary_pos_emb
|
||||
from prime_rl.utils.sequence import get_cu_seqlens_from_position_ids, get_cu_seqlens_from_seq_lens
|
||||
|
||||
from .configuration_qwen3_5_moe import Qwen3_5MoeConfig
|
||||
from .converting_qwen3_5_moe import (
|
||||
@@ -27,6 +28,7 @@ from .converting_qwen3_5_moe import (
|
||||
convert_tt_layer_to_hf,
|
||||
convert_tt_to_hf_moe,
|
||||
)
|
||||
from .mrope import build_qwen3_5_mrope_position_ids
|
||||
|
||||
# Flash attention imports
|
||||
try:
|
||||
@@ -668,22 +670,113 @@ class Qwen3_5MoeDecoderLayer(GradientCheckpointingLayer):
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Model classes
|
||||
# Rotary embedding
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def _create_rotary_emb(config: Qwen3_5MoeConfig) -> RotaryEmbedding:
|
||||
if hasattr(config, "rope_scaling") and isinstance(config.rope_scaling, dict):
|
||||
rope_type = config.rope_scaling.get("rope_type", config.rope_scaling.get("type", "default"))
|
||||
else:
|
||||
rope_type = "default"
|
||||
class Qwen3_5MoeRotaryEmbedding(nn.Module):
|
||||
inv_freq: torch.Tensor
|
||||
|
||||
rotary_config = RotaryEmbeddingConfig(
|
||||
max_position_embeddings=config.max_position_embeddings,
|
||||
rope_type=rope_type,
|
||||
model_config=config,
|
||||
)
|
||||
return RotaryEmbedding(rotary_config)
|
||||
def __init__(self, config: Qwen3_5MoeConfig, device=None):
|
||||
super().__init__()
|
||||
self.config = config
|
||||
self.max_seq_len_cached = config.max_position_embeddings
|
||||
self.original_max_seq_len = config.max_position_embeddings
|
||||
|
||||
rope_parameters = getattr(config, "rope_parameters", None)
|
||||
if rope_parameters is None:
|
||||
config.standardize_rope_params()
|
||||
rope_parameters = config.rope_parameters
|
||||
|
||||
self.rope_type = rope_parameters.get("rope_type", rope_parameters.get("type", "default"))
|
||||
self.rope_init_fn = self.compute_default_rope_parameters
|
||||
if self.rope_type != "default":
|
||||
self.rope_init_fn = ROPE_INIT_FUNCTIONS[self.rope_type]
|
||||
|
||||
inv_freq, self.attention_scaling = self.rope_init_fn(config, device)
|
||||
self.register_buffer("inv_freq", inv_freq, persistent=False)
|
||||
self.original_inv_freq = self.inv_freq.clone()
|
||||
|
||||
self.mrope_section = rope_parameters.get("mrope_section")
|
||||
if self.mrope_section is None:
|
||||
self.mrope_section = self._scaled_default_mrope_section(self.inv_freq.numel())
|
||||
if not rope_parameters.get("mrope_interleaved", True):
|
||||
raise ValueError("Qwen3.5 MoE custom model expects interleaved MRoPE")
|
||||
if sum(self.mrope_section) != self.inv_freq.numel():
|
||||
raise ValueError(
|
||||
"Qwen3.5 mrope_section must sum to rotary_dim // 2: "
|
||||
f"mrope_section={self.mrope_section}, rotary_dim={self.inv_freq.numel() * 2}"
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _scaled_default_mrope_section(num_rotary_pairs: int) -> list[int]:
|
||||
default_section = [11, 11, 10]
|
||||
default_total = sum(default_section)
|
||||
scaled_section = [num_rotary_pairs * section // default_total for section in default_section]
|
||||
remainder = num_rotary_pairs - sum(scaled_section)
|
||||
remainder_order = sorted(
|
||||
range(len(default_section)),
|
||||
key=lambda idx: num_rotary_pairs * default_section[idx] % default_total,
|
||||
reverse=True,
|
||||
)
|
||||
for idx in remainder_order[:remainder]:
|
||||
scaled_section[idx] += 1
|
||||
return scaled_section
|
||||
|
||||
@staticmethod
|
||||
def compute_default_rope_parameters(
|
||||
config: Qwen3_5MoeConfig | None = None,
|
||||
device: Optional[torch.device] = None,
|
||||
seq_len: int | None = None,
|
||||
) -> tuple[torch.Tensor, float]:
|
||||
rope_parameters = config.rope_parameters
|
||||
base = rope_parameters["rope_theta"]
|
||||
partial_rotary_factor = rope_parameters.get("partial_rotary_factor", 1.0)
|
||||
head_dim = getattr(config, "head_dim", None) or config.hidden_size // config.num_attention_heads
|
||||
dim = int(head_dim * partial_rotary_factor)
|
||||
inv_freq = 1.0 / (
|
||||
base ** (torch.arange(0, dim, 2, dtype=torch.int64).to(device=device, dtype=torch.float) / dim)
|
||||
)
|
||||
return inv_freq, 1.0
|
||||
|
||||
@torch.no_grad()
|
||||
@dynamic_rope_update
|
||||
def forward(self, x: torch.Tensor, position_ids: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
if position_ids.ndim == 2:
|
||||
position_ids = position_ids[None, ...].expand(3, position_ids.shape[0], -1)
|
||||
elif position_ids.ndim != 3:
|
||||
raise ValueError(f"Qwen3.5 position_ids must be 2D or 3D, got shape={tuple(position_ids.shape)}")
|
||||
|
||||
position_ids = position_ids.to(device=x.device)
|
||||
inv_freq_expanded = self.inv_freq[None, None, :, None].float().expand(3, position_ids.shape[1], -1, 1)
|
||||
position_ids_expanded = position_ids[:, :, None, :].float()
|
||||
|
||||
device_type = x.device.type if isinstance(x.device.type, str) and x.device.type != "mps" else "cpu"
|
||||
with torch.autocast(device_type=device_type, enabled=False):
|
||||
freqs = (inv_freq_expanded.float() @ position_ids_expanded.float()).transpose(2, 3)
|
||||
freqs = self._apply_interleaved_mrope(freqs)
|
||||
emb = torch.cat((freqs, freqs), dim=-1)
|
||||
cos = emb.cos() * self.attention_scaling
|
||||
sin = emb.sin() * self.attention_scaling
|
||||
|
||||
return cos.to(dtype=x.dtype), sin.to(dtype=x.dtype)
|
||||
|
||||
def _apply_interleaved_mrope(self, freqs: torch.Tensor) -> torch.Tensor:
|
||||
freqs_t = freqs[0].clone()
|
||||
for dim, offset in enumerate((1, 2), start=1):
|
||||
length = self.mrope_section[dim] * 3
|
||||
idx = slice(offset, length, 3)
|
||||
freqs_t[..., idx] = freqs[dim, ..., idx]
|
||||
return freqs_t
|
||||
|
||||
|
||||
def _create_rotary_emb(config: Qwen3_5MoeConfig) -> Qwen3_5MoeRotaryEmbedding:
|
||||
return Qwen3_5MoeRotaryEmbedding(config)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Model classes
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
class Qwen3_5MoePreTrainedModel(PreTrainedModelPrimeRL):
|
||||
@@ -757,6 +850,7 @@ class Qwen3_5MoeModel(Qwen3_5MoePreTrainedModel):
|
||||
position_ids: Optional[torch.LongTensor] = None,
|
||||
inputs_embeds: Optional[torch.FloatTensor] = None,
|
||||
routed_experts: Optional[torch.LongTensor] = None,
|
||||
seq_lens: Optional[torch.LongTensor] = None,
|
||||
) -> MoeModelOutputWithPast:
|
||||
if (input_ids is None) ^ (inputs_embeds is not None):
|
||||
raise ValueError("You must specify exactly one of input_ids or inputs_embeds")
|
||||
@@ -764,9 +858,31 @@ class Qwen3_5MoeModel(Qwen3_5MoePreTrainedModel):
|
||||
if inputs_embeds is None:
|
||||
inputs_embeds = self.embed_tokens(input_ids)
|
||||
|
||||
if self.config._attn_implementation in ("flash_attention_2", "flash_attention_3", "fa4"):
|
||||
cu_seqlens, max_seqlen = get_cu_seqlens_from_position_ids(position_ids)
|
||||
if position_ids is None:
|
||||
position_ids = torch.arange(inputs_embeds.shape[1], device=inputs_embeds.device).unsqueeze(0)
|
||||
|
||||
flash_attn_enabled = self.config._attn_implementation in ("flash_attention_2", "flash_attention_3", "fa4")
|
||||
if flash_attn_enabled:
|
||||
if position_ids.ndim == 3:
|
||||
if inputs_embeds.shape[0] != 1:
|
||||
raise ValueError("3D Qwen3.5 MRoPE positions require batch size 1 for varlen attention")
|
||||
seq_len = inputs_embeds.shape[1]
|
||||
if seq_lens is None:
|
||||
cu_seqlens = torch.tensor([0, seq_len], dtype=torch.int32, device=inputs_embeds.device)
|
||||
max_seqlen = seq_len
|
||||
else:
|
||||
cu_seqlens, max_seqlen = get_cu_seqlens_from_seq_lens(
|
||||
seq_lens.to(device=inputs_embeds.device),
|
||||
total_tokens=seq_len,
|
||||
)
|
||||
else:
|
||||
cu_seqlens, max_seqlen = get_cu_seqlens_from_position_ids(position_ids)
|
||||
torch._dynamo.mark_dynamic(cu_seqlens, 0)
|
||||
elif position_ids.ndim == 3 and seq_lens is not None:
|
||||
seq_lens = seq_lens.to(device=inputs_embeds.device)
|
||||
if seq_lens.numel() > 1 and "full_attention" in self.config.layer_types:
|
||||
raise ValueError("Packed Qwen3.5 MRoPE batches with full_attention layers require flash attention")
|
||||
cu_seqlens, max_seqlen = get_cu_seqlens_from_seq_lens(seq_lens, total_tokens=inputs_embeds.shape[1])
|
||||
else:
|
||||
max_seqlen = None
|
||||
cu_seqlens = None
|
||||
@@ -822,6 +938,16 @@ class Qwen3_5MoeVLMModel(nn.Module):
|
||||
def set_input_embeddings(self, value):
|
||||
self.language_model.embed_tokens = value
|
||||
|
||||
def _dummy_vision_inputs(self, device: torch.device) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
"""Smallest valid vision input: a single merged token (grid [1, m, m])."""
|
||||
vcfg = self.config.vision_config
|
||||
m = vcfg.spatial_merge_size
|
||||
num_patches = m * m
|
||||
patch_dim = vcfg.in_channels * vcfg.temporal_patch_size * vcfg.patch_size * vcfg.patch_size
|
||||
pixel_values = torch.zeros(num_patches, patch_dim, device=device, dtype=self.visual.dtype)
|
||||
grid_thw = torch.tensor([[1, m, m]], dtype=torch.long, device=device)
|
||||
return pixel_values, grid_thw
|
||||
|
||||
def forward(
|
||||
self,
|
||||
input_ids: torch.LongTensor | None = None,
|
||||
@@ -829,28 +955,74 @@ class Qwen3_5MoeVLMModel(nn.Module):
|
||||
inputs_embeds: torch.FloatTensor | None = None,
|
||||
pixel_values: torch.Tensor | None = None,
|
||||
image_grid_thw: torch.LongTensor | None = None,
|
||||
mm_token_type_ids: torch.LongTensor | None = None,
|
||||
routed_experts: torch.LongTensor | None = None,
|
||||
seq_lens: torch.LongTensor | None = None,
|
||||
**kwargs,
|
||||
) -> MoeModelOutputWithPast:
|
||||
if inputs_embeds is None:
|
||||
inputs_embeds = self.language_model.embed_tokens(input_ids)
|
||||
|
||||
if pixel_values is not None:
|
||||
pixel_values = pixel_values.type(self.visual.dtype)
|
||||
vision_output = self.visual(pixel_values, grid_thw=image_grid_thw, return_dict=True)
|
||||
image_embeds = vision_output.pooler_output.to(inputs_embeds.device, inputs_embeds.dtype)
|
||||
if image_grid_thw is not None and input_ids is None:
|
||||
raise ValueError("input_ids are required to compute Qwen3.5 multimodal MRoPE positions")
|
||||
if image_grid_thw is not None and mm_token_type_ids is None:
|
||||
raise ValueError(
|
||||
"Qwen3.5 multimodal forward requires mm_token_type_ids to compute MRoPE positions correctly"
|
||||
)
|
||||
if image_grid_thw is not None and position_ids is not None and position_ids.ndim != 3:
|
||||
raise ValueError(
|
||||
f"Qwen3.5 multimodal forward requires 3D MRoPE position_ids; got shape={tuple(position_ids.shape)}"
|
||||
)
|
||||
|
||||
# Keep distributed collectives in the same order when a batch mixes text-only
|
||||
# and image samples across ranks. The frozen dummy pass is discarded below.
|
||||
has_images = pixel_values is not None
|
||||
vision_grid_thw = image_grid_thw
|
||||
if has_images:
|
||||
if input_ids is None:
|
||||
raise ValueError("input_ids are required when scattering Qwen3.5 image features")
|
||||
if image_grid_thw is None:
|
||||
raise ValueError("image_grid_thw is required when pixel_values are provided")
|
||||
pixel_values = pixel_values.type(self.visual.dtype)
|
||||
else:
|
||||
pixel_values, vision_grid_thw = self._dummy_vision_inputs(inputs_embeds.device)
|
||||
|
||||
vision_output = self.visual(pixel_values, grid_thw=vision_grid_thw, return_dict=True)
|
||||
image_embeds = vision_output.pooler_output.to(inputs_embeds.device, inputs_embeds.dtype)
|
||||
|
||||
if has_images:
|
||||
image_mask = input_ids == self.config.image_token_id
|
||||
image_token_count = int(image_mask.sum().item())
|
||||
image_feature_count = int(image_embeds.shape[0])
|
||||
if image_token_count != image_feature_count:
|
||||
raise ValueError(
|
||||
"Qwen VLM image token/feature mismatch before scatter: "
|
||||
f"image_token_id={self.config.image_token_id}, "
|
||||
f"image_tokens={image_token_count}, image_features={image_feature_count}, "
|
||||
f"input_ids_shape={tuple(input_ids.shape)}, "
|
||||
f"pixel_values_shape={tuple(pixel_values.shape)}, "
|
||||
f"image_grid_thw_shape={tuple(image_grid_thw.shape) if image_grid_thw is not None else None}"
|
||||
)
|
||||
image_mask = image_mask.unsqueeze(-1).expand_as(inputs_embeds).to(inputs_embeds.device)
|
||||
inputs_embeds = inputs_embeds.masked_scatter(image_mask, image_embeds)
|
||||
|
||||
if position_ids is None:
|
||||
position_ids = torch.arange(inputs_embeds.shape[1], device=inputs_embeds.device).unsqueeze(0)
|
||||
if image_grid_thw is not None:
|
||||
position_ids = build_qwen3_5_mrope_position_ids(
|
||||
input_ids=input_ids,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
image_grid_thw=image_grid_thw,
|
||||
spatial_merge_size=self.config.vision_config.spatial_merge_size,
|
||||
seq_lens=seq_lens,
|
||||
)
|
||||
else:
|
||||
position_ids = torch.arange(inputs_embeds.shape[1], device=inputs_embeds.device).unsqueeze(0)
|
||||
|
||||
return self.language_model(
|
||||
inputs_embeds=inputs_embeds,
|
||||
position_ids=position_ids,
|
||||
routed_experts=routed_experts,
|
||||
seq_lens=seq_lens,
|
||||
)
|
||||
|
||||
|
||||
@@ -997,12 +1169,15 @@ class Qwen3_5MoeForCausalLM(Qwen3_5MoePreTrainedModel, GenerationMixin):
|
||||
routed_experts: Optional[torch.LongTensor] = None,
|
||||
pixel_values: Optional[torch.Tensor] = None,
|
||||
image_grid_thw: Optional[torch.LongTensor] = None,
|
||||
mm_token_type_ids: Optional[torch.LongTensor] = None,
|
||||
seq_lens: Optional[torch.LongTensor] = None,
|
||||
**kwargs: Unpack[TransformersKwargs],
|
||||
) -> PrimeLmOutput:
|
||||
assert use_cache is None, "use_cache is not supported for custom qwen3_5_moe for now"
|
||||
assert past_key_values is None, "past_key_values is not supported for custom qwen3_5_moe for now"
|
||||
|
||||
if position_ids is None:
|
||||
has_vlm_image_inputs = self._is_vlm and image_grid_thw is not None
|
||||
if position_ids is None and not has_vlm_image_inputs:
|
||||
if inputs_embeds is not None:
|
||||
position_ids = torch.arange(inputs_embeds.shape[1], device=inputs_embeds.device).unsqueeze(0)
|
||||
elif input_ids is not None:
|
||||
@@ -1015,7 +1190,9 @@ class Qwen3_5MoeForCausalLM(Qwen3_5MoePreTrainedModel, GenerationMixin):
|
||||
inputs_embeds=inputs_embeds,
|
||||
pixel_values=pixel_values,
|
||||
image_grid_thw=image_grid_thw,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
routed_experts=routed_experts,
|
||||
seq_lens=seq_lens,
|
||||
)
|
||||
else:
|
||||
outputs = self.model(
|
||||
@@ -1023,6 +1200,7 @@ class Qwen3_5MoeForCausalLM(Qwen3_5MoePreTrainedModel, GenerationMixin):
|
||||
position_ids=position_ids,
|
||||
inputs_embeds=inputs_embeds,
|
||||
routed_experts=routed_experts,
|
||||
seq_lens=seq_lens,
|
||||
)
|
||||
|
||||
hidden_states = outputs.last_hidden_state
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import itertools
|
||||
|
||||
import torch
|
||||
|
||||
|
||||
def get_qwen3_5_vision_position_ids(
|
||||
*,
|
||||
start_position: int,
|
||||
grid_thw: torch.Tensor,
|
||||
spatial_merge_size: int,
|
||||
temp_merge_size: int = 1,
|
||||
time_interval: int = 1,
|
||||
device: torch.device | None = None,
|
||||
) -> torch.LongTensor:
|
||||
llm_grid_t = int(grid_thw[0].item()) // temp_merge_size
|
||||
llm_grid_h = int(grid_thw[1].item()) // spatial_merge_size
|
||||
llm_grid_w = int(grid_thw[2].item()) // spatial_merge_size
|
||||
|
||||
position_temporal = torch.arange(llm_grid_t, device=device) * time_interval
|
||||
position_height = torch.arange(llm_grid_h, device=device) + start_position
|
||||
position_width = torch.arange(llm_grid_w, device=device) + start_position
|
||||
|
||||
position_width = position_width.repeat(llm_grid_h * llm_grid_t)
|
||||
position_height = position_height.repeat_interleave(llm_grid_w).repeat(llm_grid_t)
|
||||
position_temporal = position_temporal.repeat_interleave(llm_grid_h * llm_grid_w) + start_position
|
||||
return torch.stack([position_temporal, position_height, position_width], dim=0)
|
||||
|
||||
|
||||
def build_qwen3_5_mrope_position_ids(
|
||||
*,
|
||||
input_ids: torch.LongTensor,
|
||||
mm_token_type_ids: torch.LongTensor,
|
||||
image_grid_thw: torch.LongTensor | None,
|
||||
spatial_merge_size: int,
|
||||
seq_lens: torch.Tensor | None = None,
|
||||
) -> torch.LongTensor:
|
||||
if input_ids.ndim != 2:
|
||||
raise ValueError(f"input_ids must be 2D, got shape={tuple(input_ids.shape)}")
|
||||
if mm_token_type_ids.shape != input_ids.shape:
|
||||
raise ValueError(
|
||||
"mm_token_type_ids must match input_ids shape: "
|
||||
f"mm_token_type_ids={tuple(mm_token_type_ids.shape)}, input_ids={tuple(input_ids.shape)}"
|
||||
)
|
||||
if input_ids.shape[0] != 1:
|
||||
raise ValueError("Packed Qwen3.5 MRoPE builder currently supports batch size 1")
|
||||
|
||||
total_seq_len = input_ids.shape[1]
|
||||
if seq_lens is None:
|
||||
seq_lens = torch.tensor([total_seq_len], dtype=torch.long, device=input_ids.device)
|
||||
else:
|
||||
seq_lens = seq_lens.to(device=input_ids.device, dtype=torch.long)
|
||||
|
||||
if seq_lens.ndim != 1:
|
||||
raise ValueError(f"seq_lens must be 1D, got shape={tuple(seq_lens.shape)}")
|
||||
if bool((seq_lens <= 0).any().item()):
|
||||
raise ValueError(f"seq_lens must be positive, got {seq_lens.tolist()}")
|
||||
if int(seq_lens.sum().item()) != total_seq_len:
|
||||
raise ValueError(f"seq_lens sum must equal sequence length: {seq_lens.tolist()} vs {total_seq_len}")
|
||||
|
||||
image_grids = iter(image_grid_thw) if image_grid_thw is not None else None
|
||||
all_positions = torch.empty(3, 1, total_seq_len, dtype=input_ids.dtype, device=input_ids.device)
|
||||
|
||||
offset = 0
|
||||
for seq_len_tensor in seq_lens:
|
||||
seq_len = int(seq_len_tensor.item())
|
||||
token_types = mm_token_type_ids[0, offset : offset + seq_len]
|
||||
current_pos = 0
|
||||
segment_positions = []
|
||||
|
||||
for modality_type, group in itertools.groupby(enumerate(token_types.tolist()), lambda item: item[1]):
|
||||
group = list(group)
|
||||
group_len = group[-1][0] - group[0][0] + 1
|
||||
|
||||
if modality_type == 0:
|
||||
segment_positions.append(
|
||||
torch.arange(group_len, device=input_ids.device).view(1, -1).expand(3, -1) + current_pos
|
||||
)
|
||||
current_pos += group_len
|
||||
continue
|
||||
|
||||
if modality_type == 2:
|
||||
raise ValueError("Qwen3.5 video MRoPE is not supported by the custom trainer path yet")
|
||||
if modality_type != 1:
|
||||
raise ValueError(f"Unsupported Qwen3.5 multimodal token type: {modality_type}")
|
||||
if image_grids is None:
|
||||
raise ValueError("image_grid_thw is required when mm_token_type_ids contains image tokens")
|
||||
|
||||
remaining = group_len
|
||||
while remaining > 0:
|
||||
try:
|
||||
grid_thw = next(image_grids)
|
||||
except StopIteration as exc:
|
||||
raise ValueError("Not enough image_grid_thw rows for image token groups") from exc
|
||||
|
||||
vision_positions = get_qwen3_5_vision_position_ids(
|
||||
start_position=current_pos,
|
||||
grid_thw=grid_thw,
|
||||
spatial_merge_size=spatial_merge_size,
|
||||
device=input_ids.device,
|
||||
)
|
||||
image_len = vision_positions.shape[1]
|
||||
if image_len > remaining:
|
||||
raise ValueError(
|
||||
"Image token group length does not match image_grid_thw-derived token count: "
|
||||
f"group_len={group_len}, grid_thw={grid_thw.tolist()}, "
|
||||
f"derived={image_len}, spatial_merge_size={spatial_merge_size}"
|
||||
)
|
||||
segment_positions.append(vision_positions)
|
||||
current_pos += max(int(grid_thw[1].item()), int(grid_thw[2].item())) // spatial_merge_size
|
||||
remaining -= image_len
|
||||
|
||||
if not segment_positions:
|
||||
raise ValueError("Cannot build MRoPE positions for an empty sequence segment")
|
||||
|
||||
segment_position_ids = torch.cat(segment_positions, dim=1)
|
||||
if segment_position_ids.shape[1] != seq_len:
|
||||
raise ValueError(
|
||||
f"Built MRoPE length does not match segment length: {segment_position_ids.shape[1]} vs {seq_len}"
|
||||
)
|
||||
all_positions[:, 0, offset : offset + seq_len] = segment_position_ids
|
||||
offset += seq_len
|
||||
|
||||
if image_grids is not None:
|
||||
try:
|
||||
extra_grid = next(image_grids)
|
||||
except StopIteration:
|
||||
pass
|
||||
else:
|
||||
raise ValueError(f"Unused image_grid_thw row while building MRoPE positions: {extra_grid.tolist()}")
|
||||
|
||||
return all_positions
|
||||
@@ -270,7 +270,58 @@ class ParallelDims:
|
||||
return get_logger()
|
||||
|
||||
|
||||
def _is_moe_model(config: ModelConfig) -> bool:
|
||||
"""Return True if the model has MoE layers, by loading its HuggingFace config."""
|
||||
from transformers import AutoConfig
|
||||
|
||||
model_config = AutoConfig.from_pretrained(config.name, trust_remote_code=config.trust_remote_code)
|
||||
return hasattr(model_config, "num_experts") or hasattr(model_config, "n_routed_experts")
|
||||
|
||||
|
||||
def resolve_ep(config: ModelConfig) -> None:
|
||||
"""Resolve ``ep="auto"`` in-place to a concrete integer.
|
||||
|
||||
For MoE models, resolves to ``min(fsdp_island_size, 8)`` where
|
||||
``fsdp_island_size = world_size // dp_replicate``. For non-MoE
|
||||
models, resolves to 1 (no-op).
|
||||
"""
|
||||
if config.ep != "auto":
|
||||
return
|
||||
|
||||
# EP requires the custom implementation; skip auto-resolution for HF impl
|
||||
if config.impl not in ("custom", "auto"):
|
||||
config.ep = 1
|
||||
get_logger().info(f"EP auto: impl='{config.impl}' does not support EP, resolving ep=1")
|
||||
return
|
||||
|
||||
world_size = dist.get_world_size()
|
||||
|
||||
if not _is_moe_model(config):
|
||||
config.ep = 1
|
||||
get_logger().info("EP auto: model is not MoE, resolving ep=1")
|
||||
return
|
||||
|
||||
dp_replicate = config.dp_replicate
|
||||
fsdp_island_size = world_size // dp_replicate # pp is always 1
|
||||
resolved_ep = min(fsdp_island_size, 8)
|
||||
|
||||
config.ep = resolved_ep
|
||||
get_logger().info(f"EP auto: world_size={world_size}, dp_replicate={dp_replicate} -> resolved ep={resolved_ep}")
|
||||
|
||||
if config.ep_comm_backend != "torch" and config.ep <= 1:
|
||||
raise ValueError(
|
||||
f"model.ep_comm_backend='{config.ep_comm_backend}' requires ep > 1, "
|
||||
f"but auto-resolved ep=1 (world_size={world_size}). "
|
||||
"Set ep explicitly or use ep_comm_backend='torch'."
|
||||
)
|
||||
|
||||
|
||||
def get_parallel_dims(config: ModelConfig, seq_len: int | None = None) -> ParallelDims:
|
||||
assert isinstance(config.ep, int), (
|
||||
f"config.ep must be resolved to an int before get_parallel_dims; got {config.ep!r}. "
|
||||
"Call resolve_ep(config) first."
|
||||
)
|
||||
|
||||
# Initialize parallel dimensions
|
||||
parallel_dims = ParallelDims(
|
||||
dp_replicate=config.dp_replicate,
|
||||
|
||||
@@ -43,7 +43,7 @@ from prime_rl.trainer.model import (
|
||||
is_tt_moe_model,
|
||||
get_load_balance_stats,
|
||||
)
|
||||
from prime_rl.trainer.parallel_dims import get_parallel_dims
|
||||
from prime_rl.trainer.parallel_dims import get_parallel_dims, resolve_ep
|
||||
from prime_rl.trainer.perf import get_perf_counter
|
||||
from prime_rl.trainer.utils import (
|
||||
build_bin_cost,
|
||||
@@ -121,6 +121,9 @@ def train(config: TrainerConfig):
|
||||
config.output_dir, config.max_concurrent_runs, torch.device("cuda", world.local_rank), config.model.lora
|
||||
)
|
||||
|
||||
# Resolve ep="auto" to a concrete integer before creating parallel dims
|
||||
resolve_ep(config.model)
|
||||
|
||||
# Initialize parallel dimensions
|
||||
parallel_dims = get_parallel_dims(config.model)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ from prime_rl.trainer.model import (
|
||||
setup_tokenizer,
|
||||
setup_model,
|
||||
)
|
||||
from prime_rl.trainer.parallel_dims import get_parallel_dims
|
||||
from prime_rl.trainer.parallel_dims import get_parallel_dims, resolve_ep
|
||||
from prime_rl.trainer.perf import get_perf_counter
|
||||
from prime_rl.trainer.sft.data import load_sft_dataset, setup_dataloader, setup_dataset
|
||||
from prime_rl.trainer.utils import (
|
||||
@@ -94,6 +94,9 @@ def train(config: SFTConfig):
|
||||
if config.model.lora is not None:
|
||||
setup_multi_run_manager(config.output_dir, 1, torch.device("cuda", world.local_rank), config.model.lora)
|
||||
|
||||
# Resolve ep="auto" to a concrete integer before creating parallel dims
|
||||
resolve_ep(config.model)
|
||||
|
||||
# Initialize parallel dimensions
|
||||
parallel_dims = get_parallel_dims(config.model, config.data.seq_len)
|
||||
|
||||
|
||||
@@ -92,17 +92,11 @@ def render_messages(
|
||||
tools: list[dict[str, Any]] | None = None,
|
||||
chat_template_kwargs: dict[str, Any] | None = None,
|
||||
add_generation_prompt: bool = False,
|
||||
processor=None,
|
||||
) -> list[int]:
|
||||
kwargs = dict(chat_template_kwargs or {})
|
||||
kwargs["add_generation_prompt"] = add_generation_prompt
|
||||
if tools is not None:
|
||||
kwargs["tools"] = tools
|
||||
if processor is not None:
|
||||
kwargs["tokenize"] = True
|
||||
kwargs["return_dict"] = True
|
||||
result = processor.apply_chat_template(messages, **kwargs)
|
||||
return list(result["input_ids"][0])
|
||||
kwargs["return_dict"] = False
|
||||
return list(tokenizer.apply_chat_template(messages, **kwargs))
|
||||
|
||||
@@ -115,7 +109,6 @@ def build_incremental_token_mask(
|
||||
tools: list[dict[str, Any]] | None = None,
|
||||
chat_template_kwargs: dict[str, Any] | None = None,
|
||||
collapse_consecutive_tool_messages: bool = False,
|
||||
processor=None,
|
||||
) -> tuple[list[int], list[bool]]:
|
||||
token_mask: list[bool] = []
|
||||
prev_ids: list[int] = []
|
||||
@@ -133,7 +126,6 @@ def build_incremental_token_mask(
|
||||
tools=tools,
|
||||
chat_template_kwargs=chat_template_kwargs,
|
||||
add_generation_prompt=should_add_generation_prompt(messages, idx),
|
||||
processor=processor,
|
||||
)
|
||||
|
||||
if prev_ids != cur_ids[:prev_len]:
|
||||
|
||||
@@ -73,10 +73,6 @@ class InferencePool(Protocol):
|
||||
"""Update weights on all inference servers."""
|
||||
...
|
||||
|
||||
def get_metrics(self) -> dict[str, float]:
|
||||
"""Get pool metrics."""
|
||||
...
|
||||
|
||||
async def stop(self) -> None:
|
||||
"""Stop the inference pool."""
|
||||
...
|
||||
@@ -141,9 +137,6 @@ class StaticInferencePool:
|
||||
async def update_weights(self, weight_dir: Path | None, lora_name: str | None = None, step: int = 0) -> None:
|
||||
await update_weights(self._admin_clients, weight_dir, lora_name=lora_name, step=step)
|
||||
|
||||
def get_metrics(self) -> dict[str, float]:
|
||||
return {}
|
||||
|
||||
async def stop(self) -> None:
|
||||
pass
|
||||
|
||||
|
||||
@@ -499,10 +499,3 @@ class ElasticInferencePool:
|
||||
if lora_name is None:
|
||||
raise ValueError("Elastic inference pool requires LoRA training (lora_name must be set)")
|
||||
await self.sync_weights(weight_dir, lora_name, step)
|
||||
|
||||
def get_metrics(self) -> dict[str, float]:
|
||||
return {
|
||||
"elastic/num_servers": self.num_servers,
|
||||
"elastic/num_ready_servers": self.num_ready_servers,
|
||||
"elastic/desired_step": self._desired.step,
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
"""Message utilities — normalize, deserialize tool calls, strip content."""
|
||||
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
|
||||
def normalize_messages(messages: Any, default_role: str) -> list[dict[str, Any]]:
|
||||
if messages is None:
|
||||
return []
|
||||
if isinstance(messages, str):
|
||||
return [{"role": default_role, "content": messages}]
|
||||
if isinstance(messages, dict):
|
||||
return [dict(messages)]
|
||||
if isinstance(messages, list):
|
||||
normalized: list[dict[str, Any]] = []
|
||||
for message in messages:
|
||||
if isinstance(message, str):
|
||||
normalized.append({"role": default_role, "content": message})
|
||||
elif isinstance(message, dict):
|
||||
normalized.append(dict(message))
|
||||
else:
|
||||
raise TypeError(f"Unsupported message type: {type(message)}")
|
||||
return normalized
|
||||
raise TypeError(f"Unsupported messages container type: {type(messages)}")
|
||||
|
||||
|
||||
def deserialize_tool_calls(messages: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
||||
def _deserialize_tool_call(tool_call: dict[str, Any]) -> dict[str, Any]:
|
||||
function = tool_call.get("function", {})
|
||||
arguments = function.get("arguments")
|
||||
if isinstance(arguments, str):
|
||||
arguments = json.loads(arguments)
|
||||
return {
|
||||
**tool_call,
|
||||
"function": {**function, "arguments": arguments},
|
||||
}
|
||||
|
||||
deserialized_messages: list[dict[str, Any]] = []
|
||||
for message in messages:
|
||||
if "tool_calls" not in message:
|
||||
deserialized_messages.append(dict(message))
|
||||
continue
|
||||
|
||||
tool_calls = message.get("tool_calls") or []
|
||||
deserialized_messages.append(
|
||||
{
|
||||
**message,
|
||||
"tool_calls": [_deserialize_tool_call(tc) for tc in tool_calls],
|
||||
}
|
||||
)
|
||||
|
||||
return deserialized_messages
|
||||
|
||||
|
||||
def strip_message_content(messages: list[dict[str, Any]]) -> list[dict[str, Any]]:
|
||||
def _strip(message: dict[str, Any]) -> dict[str, Any]:
|
||||
content = message.get("content")
|
||||
if isinstance(content, str):
|
||||
return {**message, "content": content.strip()}
|
||||
return message
|
||||
|
||||
return [_strip(message) for message in messages]
|
||||
@@ -33,3 +33,20 @@ def get_cu_seqlens_from_position_ids(position_ids: torch.Tensor) -> tuple[torch.
|
||||
cu_seqlens[1:] = seqlens.cumsum(dim=0, dtype=torch.int32)
|
||||
|
||||
return cu_seqlens, seqlens.max().item()
|
||||
|
||||
|
||||
def get_cu_seqlens_from_seq_lens(seq_lens: torch.Tensor, total_tokens: int | None = None) -> tuple[torch.Tensor, int]:
|
||||
if seq_lens.ndim != 1:
|
||||
raise ValueError(f"seq_lens must be 1D, got shape={tuple(seq_lens.shape)}")
|
||||
if seq_lens.numel() == 0:
|
||||
raise ValueError("seq_lens must not be empty")
|
||||
if bool((seq_lens <= 0).any().item()):
|
||||
raise ValueError(f"seq_lens must be positive, got {seq_lens.tolist()}")
|
||||
if total_tokens is not None and int(seq_lens.sum().item()) != total_tokens:
|
||||
raise ValueError(f"seq_lens sum must equal sequence length: {seq_lens.tolist()} vs {total_tokens}")
|
||||
|
||||
seq_lens = seq_lens.to(dtype=torch.int32)
|
||||
cu_seqlens = torch.empty(seq_lens.numel() + 1, dtype=torch.int32, device=seq_lens.device)
|
||||
cu_seqlens[0] = 0
|
||||
cu_seqlens[1:] = seq_lens.cumsum(dim=0, dtype=torch.int32)
|
||||
return cu_seqlens, int(seq_lens.max().item())
|
||||
|
||||
@@ -89,7 +89,6 @@ def test_gibberish_detects_rare_low_prob_token():
|
||||
)
|
||||
)
|
||||
assert result.detected is True
|
||||
assert result.detection_index == 1
|
||||
|
||||
|
||||
def test_gibberish_ignores_normal_tokens():
|
||||
@@ -102,7 +101,6 @@ def test_gibberish_ignores_normal_tokens():
|
||||
)
|
||||
)
|
||||
assert result.detected is False
|
||||
assert result.detection_index is None
|
||||
|
||||
|
||||
def test_gibberish_ignores_high_prob_rare_token():
|
||||
@@ -128,7 +126,6 @@ def test_gibberish_works_across_trajectory_steps():
|
||||
)
|
||||
)
|
||||
assert result.detected is True
|
||||
assert result.detection_index == 2
|
||||
|
||||
|
||||
def test_gibberish_aligns_logprobs_under_generation_prompt_scaffold():
|
||||
@@ -146,7 +143,6 @@ def test_gibberish_aligns_logprobs_under_generation_prompt_scaffold():
|
||||
|
||||
result = gibberish_filter.check(rollout)
|
||||
assert result.detected is True
|
||||
assert result.detection_index == 2 # third sampled completion token (scaffold skipped)
|
||||
|
||||
|
||||
# --- RepetitionFilter tests ---
|
||||
@@ -162,7 +158,6 @@ def test_repetition_triggers_after_window():
|
||||
)
|
||||
)
|
||||
assert result.detected is True
|
||||
assert result.detection_index == 4
|
||||
|
||||
|
||||
def test_repetition_no_trigger_below_window():
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
import pytest
|
||||
import torch
|
||||
from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import (
|
||||
Qwen3_5MoeTextRotaryEmbedding as HFQwen3_5MoeRotaryEmbedding,
|
||||
)
|
||||
|
||||
from prime_rl.trainer.models.qwen3_5_moe import Qwen3_5MoeConfig
|
||||
from prime_rl.trainer.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeRotaryEmbedding
|
||||
from prime_rl.trainer.models.qwen3_5_moe.mrope import build_qwen3_5_mrope_position_ids
|
||||
|
||||
|
||||
def _tiny_config() -> Qwen3_5MoeConfig:
|
||||
return Qwen3_5MoeConfig(
|
||||
vocab_size=128,
|
||||
hidden_size=128,
|
||||
num_attention_heads=2,
|
||||
num_key_value_heads=1,
|
||||
head_dim=64,
|
||||
num_hidden_layers=1,
|
||||
rope_parameters={
|
||||
"rope_type": "default",
|
||||
"rope_theta": 10000000,
|
||||
"partial_rotary_factor": 0.25,
|
||||
"mrope_section": [3, 3, 2],
|
||||
"mrope_interleaved": True,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def test_qwen35_mrope_text_only_positions():
|
||||
input_ids = torch.tensor([[10, 11, 12, 13]])
|
||||
mm_token_type_ids = torch.zeros_like(input_ids)
|
||||
|
||||
position_ids = build_qwen3_5_mrope_position_ids(
|
||||
input_ids=input_ids,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
image_grid_thw=None,
|
||||
spatial_merge_size=2,
|
||||
)
|
||||
|
||||
expected = torch.arange(4).view(1, 1, -1).expand(3, 1, -1)
|
||||
torch.testing.assert_close(position_ids, expected)
|
||||
|
||||
|
||||
def test_qwen35_mrope_single_image_with_surrounding_text():
|
||||
input_ids = torch.tensor([[10, 11, 99, 99, 99, 99, 12]])
|
||||
mm_token_type_ids = torch.tensor([[0, 0, 1, 1, 1, 1, 0]])
|
||||
image_grid_thw = torch.tensor([[1, 4, 4]])
|
||||
|
||||
position_ids = build_qwen3_5_mrope_position_ids(
|
||||
input_ids=input_ids,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
image_grid_thw=image_grid_thw,
|
||||
spatial_merge_size=2,
|
||||
)
|
||||
|
||||
expected = torch.tensor(
|
||||
[
|
||||
[[0, 1, 2, 2, 2, 2, 4]],
|
||||
[[0, 1, 2, 2, 3, 3, 4]],
|
||||
[[0, 1, 2, 3, 2, 3, 4]],
|
||||
]
|
||||
)
|
||||
torch.testing.assert_close(position_ids, expected)
|
||||
|
||||
|
||||
def test_qwen35_mrope_adjacent_images_consume_multiple_grids():
|
||||
input_ids = torch.tensor([[10, 99, 99, 99, 99, 99, 99, 99, 99, 11]])
|
||||
mm_token_type_ids = torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 0]])
|
||||
image_grid_thw = torch.tensor([[1, 4, 4], [1, 4, 4]])
|
||||
|
||||
position_ids = build_qwen3_5_mrope_position_ids(
|
||||
input_ids=input_ids,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
image_grid_thw=image_grid_thw,
|
||||
spatial_merge_size=2,
|
||||
)
|
||||
|
||||
expected = torch.tensor(
|
||||
[
|
||||
[[0, 1, 1, 1, 1, 3, 3, 3, 3, 5]],
|
||||
[[0, 1, 1, 2, 2, 3, 3, 4, 4, 5]],
|
||||
[[0, 1, 2, 1, 2, 3, 4, 3, 4, 5]],
|
||||
]
|
||||
)
|
||||
torch.testing.assert_close(position_ids, expected)
|
||||
|
||||
|
||||
def test_qwen35_mrope_packed_segments_reset_independently():
|
||||
input_ids = torch.tensor([[10, 99, 99, 99, 99, 11, 99, 99, 99, 99]])
|
||||
mm_token_type_ids = torch.tensor([[0, 1, 1, 1, 1, 0, 1, 1, 1, 1]])
|
||||
image_grid_thw = torch.tensor([[1, 4, 4], [1, 4, 4]])
|
||||
seq_lens = torch.tensor([5, 5])
|
||||
|
||||
position_ids = build_qwen3_5_mrope_position_ids(
|
||||
input_ids=input_ids,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
image_grid_thw=image_grid_thw,
|
||||
spatial_merge_size=2,
|
||||
seq_lens=seq_lens,
|
||||
)
|
||||
|
||||
expected_segment = torch.tensor(
|
||||
[
|
||||
[0, 1, 1, 1, 1],
|
||||
[0, 1, 1, 2, 2],
|
||||
[0, 1, 2, 1, 2],
|
||||
]
|
||||
)
|
||||
torch.testing.assert_close(position_ids[:, 0, :5], expected_segment)
|
||||
torch.testing.assert_close(position_ids[:, 0, 5:], expected_segment)
|
||||
|
||||
|
||||
def test_qwen35_mrope_packed_matches_standalone_segments():
|
||||
segment_input_ids = torch.tensor([[10, 99, 99, 99, 99, 11]])
|
||||
segment_token_types = torch.tensor([[0, 1, 1, 1, 1, 0]])
|
||||
image_grid_thw = torch.tensor([[1, 4, 4]])
|
||||
|
||||
standalone = build_qwen3_5_mrope_position_ids(
|
||||
input_ids=segment_input_ids,
|
||||
mm_token_type_ids=segment_token_types,
|
||||
image_grid_thw=image_grid_thw,
|
||||
spatial_merge_size=2,
|
||||
)
|
||||
packed = build_qwen3_5_mrope_position_ids(
|
||||
input_ids=torch.cat([segment_input_ids, segment_input_ids], dim=1),
|
||||
mm_token_type_ids=torch.cat([segment_token_types, segment_token_types], dim=1),
|
||||
image_grid_thw=torch.cat([image_grid_thw, image_grid_thw], dim=0),
|
||||
spatial_merge_size=2,
|
||||
seq_lens=torch.tensor([segment_input_ids.shape[1], segment_input_ids.shape[1]]),
|
||||
)
|
||||
|
||||
torch.testing.assert_close(packed[:, :, : segment_input_ids.shape[1]], standalone)
|
||||
torch.testing.assert_close(packed[:, :, segment_input_ids.shape[1] :], standalone)
|
||||
|
||||
|
||||
def test_qwen35_mrope_rejects_image_length_grid_mismatch():
|
||||
input_ids = torch.tensor([[10, 99, 99]])
|
||||
mm_token_type_ids = torch.tensor([[0, 1, 1]])
|
||||
image_grid_thw = torch.tensor([[1, 4, 4]])
|
||||
|
||||
with pytest.raises(ValueError, match="Image token group length"):
|
||||
build_qwen3_5_mrope_position_ids(
|
||||
input_ids=input_ids,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
image_grid_thw=image_grid_thw,
|
||||
spatial_merge_size=2,
|
||||
)
|
||||
|
||||
|
||||
def test_qwen35_mrope_rejects_video_tokens():
|
||||
input_ids = torch.tensor([[10, 99]])
|
||||
mm_token_type_ids = torch.tensor([[0, 2]])
|
||||
|
||||
with pytest.raises(ValueError, match="video MRoPE"):
|
||||
build_qwen3_5_mrope_position_ids(
|
||||
input_ids=input_ids,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
image_grid_thw=None,
|
||||
spatial_merge_size=2,
|
||||
)
|
||||
|
||||
|
||||
def test_qwen35_rotary_matches_hf_for_2d_and_3d_positions():
|
||||
config = _tiny_config()
|
||||
prime_rotary = Qwen3_5MoeRotaryEmbedding(config)
|
||||
hf_rotary = HFQwen3_5MoeRotaryEmbedding(config)
|
||||
hidden_states = torch.randn(1, 6, config.hidden_size)
|
||||
|
||||
text_positions = torch.arange(6).unsqueeze(0)
|
||||
prime_cos, prime_sin = prime_rotary(hidden_states, text_positions)
|
||||
hf_cos, hf_sin = hf_rotary(hidden_states, text_positions)
|
||||
torch.testing.assert_close(prime_cos, hf_cos)
|
||||
torch.testing.assert_close(prime_sin, hf_sin)
|
||||
|
||||
mrope_positions = torch.stack(
|
||||
[
|
||||
torch.tensor([[0, 1, 2, 2, 2, 4]]),
|
||||
torch.tensor([[0, 1, 2, 2, 3, 4]]),
|
||||
torch.tensor([[0, 1, 2, 3, 2, 4]]),
|
||||
]
|
||||
)
|
||||
prime_cos, prime_sin = prime_rotary(hidden_states, mrope_positions)
|
||||
hf_cos, hf_sin = hf_rotary(hidden_states, mrope_positions)
|
||||
torch.testing.assert_close(prime_cos, hf_cos)
|
||||
torch.testing.assert_close(prime_sin, hf_sin)
|
||||
@@ -35,6 +35,7 @@ def _tiny_vlm_config():
|
||||
tc.linear_num_key_heads = 4
|
||||
tc.linear_num_value_heads = 8
|
||||
tc.use_cache = False
|
||||
tc.rope_parameters["mrope_section"] = [3, 3, 2]
|
||||
|
||||
vc = config.vision_config
|
||||
vc.depth = 2
|
||||
@@ -62,6 +63,12 @@ def _make_image_inputs(config, device="cuda", dtype=torch.float32):
|
||||
return pixel_values, image_grid_thw, num_image_tokens
|
||||
|
||||
|
||||
def _make_mm_token_type_ids(input_ids, image_token_id):
|
||||
mm_token_type_ids = torch.zeros_like(input_ids)
|
||||
mm_token_type_ids[input_ids == image_token_id] = 1
|
||||
return mm_token_type_ids
|
||||
|
||||
|
||||
def test_vlm_forward():
|
||||
"""Custom VLM produces logits for both text-only and multimodal inputs."""
|
||||
config = _tiny_vlm_config()
|
||||
@@ -82,8 +89,14 @@ def test_vlm_forward():
|
||||
text_part = torch.randint(0, 200, (1, 10), device="cuda")
|
||||
img_part = torch.full((1, n_img_tokens), config.image_token_id, device="cuda")
|
||||
input_ids_mm = torch.cat([text_part[:, :5], img_part, text_part[:, 5:]], dim=1)
|
||||
mm_token_type_ids = _make_mm_token_type_ids(input_ids_mm, config.image_token_id)
|
||||
|
||||
out_mm = model(input_ids=input_ids_mm, pixel_values=pixel_values, image_grid_thw=image_grid_thw)
|
||||
out_mm = model(
|
||||
input_ids=input_ids_mm,
|
||||
pixel_values=pixel_values,
|
||||
image_grid_thw=image_grid_thw,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
)
|
||||
assert out_mm["logits"].shape == (1, input_ids_mm.shape[1], vocab)
|
||||
|
||||
|
||||
@@ -98,8 +111,14 @@ def test_vlm_backward():
|
||||
text_part = torch.randint(0, 200, (1, 10), device="cuda")
|
||||
img_part = torch.full((1, n_img_tokens), config.image_token_id, device="cuda")
|
||||
input_ids = torch.cat([text_part[:, :5], img_part, text_part[:, 5:]], dim=1)
|
||||
mm_token_type_ids = _make_mm_token_type_ids(input_ids, config.image_token_id)
|
||||
|
||||
out = model(input_ids=input_ids, pixel_values=pixel_values, image_grid_thw=image_grid_thw)
|
||||
out = model(
|
||||
input_ids=input_ids,
|
||||
pixel_values=pixel_values,
|
||||
image_grid_thw=image_grid_thw,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
)
|
||||
out["logits"].sum().backward()
|
||||
|
||||
assert model.model.language_model.embed_tokens.weight.grad is not None
|
||||
@@ -170,6 +189,42 @@ def test_vlm_weight_roundtrip():
|
||||
assert torch.equal(roundtripped[original_vision_key], original_vision_weight)
|
||||
|
||||
|
||||
def test_vlm_forward_requires_mm_token_type_ids():
|
||||
"""Image MRoPE needs renderer-supplied modality token types."""
|
||||
config = _tiny_vlm_config()
|
||||
with torch.device("cuda"), default_dtype(torch.float32):
|
||||
model = Qwen3_5MoeForCausalLM(config)
|
||||
inject_prime_lm_head(model)
|
||||
|
||||
pixel_values, image_grid_thw, n_img_tokens = _make_image_inputs(config)
|
||||
input_ids = torch.full((1, n_img_tokens), config.image_token_id, device="cuda")
|
||||
|
||||
with pytest.raises(ValueError, match="mm_token_type_ids"):
|
||||
model(input_ids=input_ids, pixel_values=pixel_values, image_grid_thw=image_grid_thw)
|
||||
|
||||
|
||||
def test_vlm_forward_rejects_2d_positions_with_images():
|
||||
"""Trainer 1D/2D packed positions are not valid image MRoPE coordinates."""
|
||||
config = _tiny_vlm_config()
|
||||
with torch.device("cuda"), default_dtype(torch.float32):
|
||||
model = Qwen3_5MoeForCausalLM(config)
|
||||
inject_prime_lm_head(model)
|
||||
|
||||
pixel_values, image_grid_thw, n_img_tokens = _make_image_inputs(config)
|
||||
input_ids = torch.full((1, n_img_tokens), config.image_token_id, device="cuda")
|
||||
mm_token_type_ids = _make_mm_token_type_ids(input_ids, config.image_token_id)
|
||||
position_ids = torch.arange(n_img_tokens, device="cuda").unsqueeze(0)
|
||||
|
||||
with pytest.raises(ValueError, match="3D MRoPE position_ids"):
|
||||
model(
|
||||
input_ids=input_ids,
|
||||
position_ids=position_ids,
|
||||
pixel_values=pixel_values,
|
||||
image_grid_thw=image_grid_thw,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
)
|
||||
|
||||
|
||||
def test_vlm_router_replay():
|
||||
"""routed_experts bypasses router computation in VLM multimodal forward."""
|
||||
config = _tiny_vlm_config()
|
||||
@@ -182,6 +237,7 @@ def test_vlm_router_replay():
|
||||
text_part = torch.randint(0, 200, (1, 10), device="cuda")
|
||||
img_part = torch.full((1, n_img_tokens), config.image_token_id, device="cuda")
|
||||
input_ids = torch.cat([text_part[:, :5], img_part, text_part[:, 5:]], dim=1)
|
||||
mm_token_type_ids = _make_mm_token_type_ids(input_ids, config.image_token_id)
|
||||
seq_len = input_ids.shape[1]
|
||||
|
||||
num_layers = config.text_config.num_hidden_layers
|
||||
@@ -189,7 +245,11 @@ def test_vlm_router_replay():
|
||||
routed_experts = torch.randint(0, config.text_config.num_experts, (1, seq_len, num_layers, topk), device="cuda")
|
||||
|
||||
out = model(
|
||||
input_ids=input_ids, pixel_values=pixel_values, image_grid_thw=image_grid_thw, routed_experts=routed_experts
|
||||
input_ids=input_ids,
|
||||
pixel_values=pixel_values,
|
||||
image_grid_thw=image_grid_thw,
|
||||
mm_token_type_ids=mm_token_type_ids,
|
||||
routed_experts=routed_experts,
|
||||
)
|
||||
assert out["logits"].shape == (1, seq_len, vocab)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
import torch
|
||||
|
||||
from prime_rl.utils.sequence import get_cu_seqlens_from_position_ids
|
||||
from prime_rl.utils.sequence import get_cu_seqlens_from_position_ids, get_cu_seqlens_from_seq_lens
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -23,3 +23,16 @@ def test_get_cu_seqlens_from_position_ids_is_local_relative(
|
||||
assert cu_seqlens.dtype == torch.int32
|
||||
assert cu_seqlens.tolist() == expected_cu_seqlens
|
||||
assert max_seqlen == expected_max_seqlen
|
||||
|
||||
|
||||
def test_get_cu_seqlens_from_seq_lens():
|
||||
cu_seqlens, max_seqlen = get_cu_seqlens_from_seq_lens(torch.tensor([4, 3, 2]), total_tokens=9)
|
||||
|
||||
assert cu_seqlens.dtype == torch.int32
|
||||
assert cu_seqlens.tolist() == [0, 4, 7, 9]
|
||||
assert max_seqlen == 4
|
||||
|
||||
|
||||
def test_get_cu_seqlens_from_seq_lens_rejects_wrong_total():
|
||||
with pytest.raises(ValueError, match="sum must equal"):
|
||||
get_cu_seqlens_from_seq_lens(torch.tensor([4, 3]), total_tokens=9)
|
||||
|
||||
@@ -364,15 +364,15 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "beautifulsoup4"
|
||||
version = "4.14.3"
|
||||
version = "4.15.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "soupsieve", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "typing-extensions", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/c3/b0/1c6a16426d389813b48d95e26898aff79abbde42ad353958ad95cc8c9b21/beautifulsoup4-4.14.3.tar.gz", hash = "sha256:6292b1c5186d356bba669ef9f7f051757099565ad9ada5dd630bd9de5fa7fb86", size = 627737, upload-time = "2025-11-30T15:08:26.084Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/43/65/318323f98dbee45d42dff61d8f047181bc6f2268a9068cfad035a46be5af/beautifulsoup4-4.15.0.tar.gz", hash = "sha256:288e3ca7d54b06f2ac191970bc275c1939cb46d450b255bf6718b04aa37ab4f7", size = 632571, upload-time = "2026-06-07T16:44:20.453Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/1a/39/47f9197bdd44df24d67ac8893641e16f386c984a0619ef2ee4c51fbbc019/beautifulsoup4-4.14.3-py3-none-any.whl", hash = "sha256:0918bfe44902e6ad8d57732ba310582e98da931428d231a5ecb9e7c703a735bb", size = 107721, upload-time = "2025-11-30T15:08:24.087Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/88/c6/92fcd42f1ba33e1184263f25bfabf3d27c383410470f169e4b8163bf9c17/beautifulsoup4-4.15.0-py3-none-any.whl", hash = "sha256:d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9", size = 109924, upload-time = "2026-06-07T16:44:21.566Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -553,24 +553,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-env"
|
||||
version = "0.3.2"
|
||||
source = { editable = "deps/research-environments/environments/code_env" }
|
||||
dependencies = [
|
||||
{ name = "prime-sandboxes", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "prime-sandboxes", specifier = ">=0.2.19" },
|
||||
{ name = "pytest", marker = "extra == 'dev'" },
|
||||
{ name = "pytest-asyncio", marker = "extra == 'dev'" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev17" },
|
||||
]
|
||||
provides-extras = ["dev"]
|
||||
|
||||
[[package]]
|
||||
name = "code-golf-v1"
|
||||
version = "0.1.0"
|
||||
@@ -608,7 +590,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "compressed-tensors"
|
||||
version = "0.15.0.1"
|
||||
version = "0.17.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "loguru", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -616,9 +598,9 @@ dependencies = [
|
||||
{ name = "torch", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "transformers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/41/1b/c3c4a98ec5f2727656336f07a0c35862195c310d8eb0b2fa5b4be6848680/compressed_tensors-0.15.0.1.tar.gz", hash = "sha256:a8e93054e8a5ec49c980b09ed36c4c1249b4a8ee167920a8e461c4da26e78d99", size = 229412, upload-time = "2026-04-10T14:23:54.708Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/2c/9e/d7f18bd9a0354088abc11a0c1f2c7698f7c49e5a709faedf6a46e388f693/compressed_tensors-0.17.0.tar.gz", hash = "sha256:15c20d06bdbcf35b51fc99fd125e7b9be1e1855567c33b7a46dfac26ad6fb126", size = 257091, upload-time = "2026-06-03T16:49:17.208Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a8/52/93833dc1610e017ac5b7dcd59b8304d8ef67d1114c2d124e728a2cbbea12/compressed_tensors-0.15.0.1-py3-none-any.whl", hash = "sha256:e1b1f322e82e475715e242bad46925a304ea8e5c98b5055a15b8eb22fb6bfea9", size = 194260, upload-time = "2026-04-10T14:23:53.098Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/35/63/6edf0415b072fff0bf8b546074dea3f0f9b148e49b601ac98bdc60a76c68/compressed_tensors-0.17.0-py3-none-any.whl", hash = "sha256:4a1b89b508f7efb8ffb4eee8a6e69e0452d9b080cae130146025c64fbe9fa9aa", size = 211714, upload-time = "2026-06-03T16:49:15.672Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -719,6 +701,13 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/40/76/84cb68be463c827bf79da9fa0aa5140838de6455ef6f438bbe0ffa75d378/cuda_tile-1.3.0-cp312-cp312-manylinux2014_x86_64.whl", hash = "sha256:e4865acbff1172aaee304bf9c550586088d8b4545a384423597a590899386709", size = 247301, upload-time = "2026-04-20T15:51:04.042Z" },
|
||||
]
|
||||
|
||||
[package.optional-dependencies]
|
||||
tileiras = [
|
||||
{ name = "nvidia-cuda-nvcc", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "nvidia-cuda-tileiras", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "nvidia-nvvm", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cuda-toolkit"
|
||||
version = "12.8.1"
|
||||
@@ -871,7 +860,7 @@ dependencies = [
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "openai" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev381" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev397" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1116,11 +1105,11 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "fastcore"
|
||||
version = "1.13.2"
|
||||
version = "1.13.6"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/70/65/99f599a285033febf95f9c608d91d629ac5d9995f57e5b3ac3397097f440/fastcore-1.13.2.tar.gz", hash = "sha256:f660b3448de48ba31973b2866c994ea3cd5e0a654847f57d6911a1a4bffda777", size = 100337, upload-time = "2026-05-17T06:02:24.383Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/1d/80/8547a93161e6e1d868e1c6d0e6bd9b472486cdfaf8209727a42884b53a7d/fastcore-1.13.6.tar.gz", hash = "sha256:702fe22ff191c005e6909891125e5f7dbdd31bb8f444574e082030a31b960ead", size = 100742, upload-time = "2026-06-18T06:49:07.971Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c7/41/2c368f804bb9bd918da3b61324207fc4b410d0f32352c372c0680fc1f670/fastcore-1.13.2-py3-none-any.whl", hash = "sha256:2103c9e9e613311c0b36eab17299a221e778fd214ec526e8df1d32908928277c", size = 105060, upload-time = "2026-05-17T06:02:22.28Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/29/11/867a59ae2d233ce81da373513cabaca2abf03f0180b28e85cf3ae2d5f7f6/fastcore-1.13.6-py3-none-any.whl", hash = "sha256:59264df5bf003fcf44602b7418c6178b37d3c31ae87d8ac106139f716e73711f", size = 105794, upload-time = "2026-06-18T06:49:06.499Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1227,20 +1216,20 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "flashinfer-cubin"
|
||||
version = "0.6.11.post2"
|
||||
version = "0.6.12"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/29/96/da75a9f61c64c87b16baa339fc8216a6c3743c5d263c555fded30fcbe6f7/flashinfer_cubin-0.6.11.post2-py3-none-any.whl", hash = "sha256:eb01c2801ee31d145bbf7afb2c223150333e602c8208216017b0190b1087b990", size = 360908523, upload-time = "2026-05-14T04:57:41.355Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7d/c6/63b1bb7b1a7ae612ecf53c0e568312c3d004f9f7558b0ab5edcf7900c360/flashinfer_cubin-0.6.12-py3-none-any.whl", hash = "sha256:01de132c493bb21d5df42ebe6890966cf83b40aa970dae06b2a3c0bed85f13ec", size = 447533460, upload-time = "2026-05-29T23:45:27.579Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "flashinfer-python"
|
||||
version = "0.6.11.post2"
|
||||
version = "0.6.12"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "apache-tvm-ffi", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "click", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "cuda-tile", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "cuda-tile", extra = ["tileiras"], marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "einops", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "ninja", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "numpy", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -1253,9 +1242,9 @@ dependencies = [
|
||||
{ name = "torch", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "tqdm", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/db/53/dbf2157f2bbb96d6f7a6891cf6abfb2e6e18963760a0c53e96c2de5c59db/flashinfer_python-0.6.11.post2.tar.gz", hash = "sha256:e9fdac56aea9f0f58a4e69b0645c54993760d3cc6c7bf5c2df4ce5a0aecc7953", size = 9248515, upload-time = "2026-05-14T04:57:32.83Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/61/d0/114a64319f5a804def2f307d5ed8f95e6d94a2acdacac4ed5f57525cbf46/flashinfer_python-0.6.12.tar.gz", hash = "sha256:bed67f9c46d81dd22611dfef2787998fc412b2fe2648d9e7d336861dda912694", size = 9453326, upload-time = "2026-05-29T23:45:16.466Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c7/bc/518b092473f37d904ae07766ad37c772b93da13ea788777b22a80c3f1a7c/flashinfer_python-0.6.11.post2-py3-none-any.whl", hash = "sha256:550cbdb760f9f7ec0e42055e06636b9489d05f1a38989cafd77e6eb820de0138", size = 13746417, upload-time = "2026-05-14T04:57:30.25Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/85/26/3ca33edbf64906603633cb91904798e427c0ac1c55a13707f8081708f3ae/flashinfer_python-0.6.12-py3-none-any.whl", hash = "sha256:0c7a01e586b4796810d974cbf13a9c0eb2ade6a94d12e3220cf7782a1c09b8d3", size = 13985243, upload-time = "2026-05-29T23:45:13.477Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1462,7 +1451,7 @@ dependencies = [
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "openai" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev381" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev397" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1562,21 +1551,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/aa/b2/703569fc881f3284487e68cda7b42179978480da3c438042a6bbbb4a671c/hf_xet-1.5.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4b35549ce62601b84da4ff9b24d970032ace3d4430f52d91bcbb26c901d6c690", size = 4672414, upload-time = "2026-05-06T06:18:09.864Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hle"
|
||||
version = "0.2.1"
|
||||
source = { editable = "deps/research-environments/environments/hle" }
|
||||
dependencies = [
|
||||
{ name = "pillow", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "pillow", specifier = ">=12.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev17" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hpack"
|
||||
version = "4.1.0"
|
||||
@@ -1657,7 +1631,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "humming-kernels"
|
||||
version = "0.1.2"
|
||||
version = "0.1.4"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "cuda-bindings", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -1671,9 +1645,9 @@ dependencies = [
|
||||
{ name = "tqdm", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "triton", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/06/f4/e141f45697b7d0d38bfaf8766a7362d8f0136e3cff2620624f24f68e2700/humming_kernels-0.1.2.tar.gz", hash = "sha256:7894c80061c7866591bef12617da720ac4e925636ffc99464af433a5dcb035eb", size = 117251, upload-time = "2026-05-23T16:18:08.084Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f5/f6/05e95b66cca48def9db0d6c40374fe285c7d9c913fe126030bcfb7cb3088/humming_kernels-0.1.4.tar.gz", hash = "sha256:fdaf4f23cc6b03bb1be3fd24aa11dc7798881e5448826e2404b4f12d8096f0d0", size = 117555, upload-time = "2026-06-04T03:24:03.504Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/6d/41/288bf756d921dbe98982eeb3ec4c20e7cb5224ea6dcb164f2df3d2f68a7f/humming_kernels-0.1.2-py3-none-any.whl", hash = "sha256:f7434b0424946445ef5ad5682bcabf309d97721818ed5bdc4c6f61de3c6b9d2f", size = 160951, upload-time = "2026-05-23T16:18:06.405Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/ba/16/d9318061a560305034e14cb7bf6483ffc8735eff6b30f260907dbbd4e85d/humming_kernels-0.1.4-py3-none-any.whl", hash = "sha256:c85094cd7cf8cdd959c5e2f7f239a7d72a7640ec1f948787434bc06e24e9ed00", size = 161312, upload-time = "2026-06-04T03:24:01.897Z" },
|
||||
]
|
||||
|
||||
[package.optional-dependencies]
|
||||
@@ -1693,6 +1667,38 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/48/30/47d0bf6072f7252e6521f3447ccfa40b421b6824517f82854703d0f5a98b/hyperframe-6.1.0-py3-none-any.whl", hash = "sha256:b03380493a519fce58ea5af42e4a42317bf9bd425596f7a0835ffce80f1a42e5", size = 13007, upload-time = "2025-01-22T21:41:47.295Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "i3-code-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/i3_code_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "orjson", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "orjson" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev389" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "i3-science-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/i3_science_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev397" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "identify"
|
||||
version = "2.6.19"
|
||||
@@ -1712,10 +1718,11 @@ wheels = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ifeval"
|
||||
version = "0.1.1.1"
|
||||
source = { editable = "deps/research-environments/environments/ifeval" }
|
||||
name = "ifeval-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/ifeval_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "immutabledict", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "langdetect", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "nltk", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -1724,10 +1731,11 @@ dependencies = [
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "immutabledict" },
|
||||
{ name = "langdetect" },
|
||||
{ name = "nltk" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev17" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev389" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2362,18 +2370,18 @@ wheels = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "math500"
|
||||
version = "0.1.17"
|
||||
source = { editable = "deps/research-environments/environments/math500" }
|
||||
name = "math500-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/math500_v1" }
|
||||
dependencies = [
|
||||
{ name = "math-verify", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "math-verify", specifier = ">=0.8.0" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev17" },
|
||||
{ name = "datasets" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev381" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2457,7 +2465,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "mistral-common"
|
||||
version = "1.11.2"
|
||||
version = "1.11.3"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "jsonschema", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -2469,9 +2477,9 @@ dependencies = [
|
||||
{ name = "tiktoken", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "typing-extensions", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/c2/eb/12167a1bea9714582e5b4f539f9c019323363e314a499c72855ff0e5ad43/mistral_common-1.11.2.tar.gz", hash = "sha256:79f68fc2d1190f28637f40e053f919c8c2697e00b2aa679ddee562a95183f4ad", size = 6357845, upload-time = "2026-05-04T19:47:40.413Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/2e/03/3c5d4c9430da406f8444f9a7b058a6aa89c525fb068a57fe2ab8b04a6d08/mistral_common-1.11.3.tar.gz", hash = "sha256:6437e128fc8a307318440839ca14ddf2e8060056b062233ec0db10352651374c", size = 6360629, upload-time = "2026-06-04T09:01:11.131Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/47/f0/6a5d604b972e442b9d36c117d01788feddad099e4965699e3516ee6fefc3/mistral_common-1.11.2-py3-none-any.whl", hash = "sha256:ebb42062cd705a0aa2bc69b4cde2b83d446ae58150b7e29322c90cb08fcfca6c", size = 6531968, upload-time = "2026-05-04T19:47:37.718Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7b/76/dbfdf9c59e2a4b0116587626a3768c2a3b2ba1758b5756743918c2337fdc/mistral_common-1.11.3-py3-none-any.whl", hash = "sha256:dbfcef9d0c892727ee08a080f0c1039baed5430b291f5425ffd88892bf09e52c", size = 6533154, upload-time = "2026-06-04T09:01:14.186Z" },
|
||||
]
|
||||
|
||||
[package.optional-dependencies]
|
||||
@@ -2505,23 +2513,23 @@ wheels = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mmlu-pro"
|
||||
version = "0.1.3"
|
||||
source = { editable = "deps/research-environments/environments/mmlu_pro" }
|
||||
name = "mmlu-pro-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/mmlu_pro_v1" }
|
||||
dependencies = [
|
||||
{ name = "math-verify", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "math-verify", specifier = ">=0.8.0" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev17" },
|
||||
{ name = "datasets" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev381" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "modal"
|
||||
version = "1.4.3"
|
||||
version = "1.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "aiohttp", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -2538,9 +2546,9 @@ dependencies = [
|
||||
{ name = "typing-extensions", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "watchfiles", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/c6/7d/4126d0fe879ef3e86002ca821a34cb68a2588ea2e8ccb2bfe421d0f42ffe/modal-1.4.3.tar.gz", hash = "sha256:35b2fc840f759b512e12527afb538e1ea4cc232b84cfbfcef3f5d96d5a66abaa", size = 720488, upload-time = "2026-05-18T22:34:45.842Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/59/f9/87425e60db2a8597b248417772b409c49ca3a05ff6b1282a21cd7d856f09/modal-1.5.0.tar.gz", hash = "sha256:15033cf84f5f4f9f8a3dcf47a768cfcca36d1ad38ab7b3459fd3cbc29aa84a77", size = 771722, upload-time = "2026-06-09T22:37:27.5Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/56/54/400262056c144ceee5edab40efa2541ae8928ae5f244fd9025f3ad26c909/modal-1.4.3-py3-none-any.whl", hash = "sha256:802917181f576458a0cb833322157dab09c4f367326426c5a732661a0c519577", size = 826232, upload-time = "2026-05-18T22:34:43.335Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/5c/71/85e476e7d32c0a648d5aa97c4335ac02357d059c2bb734cf175b08446597/modal-1.5.0-py3-none-any.whl", hash = "sha256:9c5687eff775d1372bd70b87e43499e40777a1de160f23786c00807bf342fcb6", size = 882122, upload-time = "2026-06-09T22:37:24.608Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2843,6 +2851,15 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/18/2a/d4cd8506d2044e082f8cd921be57392e6a9b5ccd3ffdf050362430a3d5d5/nvidia_cuda_cccl_cu12-12.9.27-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:37869e17ce2e1ecec6eddf1927cca0f8c34e64fd848d40453df559091e2d7117", size = 3152243, upload-time = "2025-05-01T19:32:13.955Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cuda-crt"
|
||||
version = "13.3.33"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/d1/32/5ea57f8cd6ad5df2173d175ac5db4e06edde40028b1b1f6c539ea4c10290/nvidia_cuda_crt-13.3.33-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c8c257393f9c9146a85d3644f352be8154843d760031f756e673222c768a4930", size = 157348, upload-time = "2026-05-26T16:28:40.446Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8d/a7/998af901511d5efdc6e42fc597d32a69f34eecf86f1591a9d230ab3ab951/nvidia_cuda_crt-13.3.33-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:01ff37600c7b880a14cab4ade763b4c10c0ff92f25cc9dca30f0881ce52693c4", size = 157350, upload-time = "2026-05-26T16:29:22.315Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cuda-cupti-cu12"
|
||||
version = "12.8.90"
|
||||
@@ -2852,6 +2869,20 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/f8/02/2adcaa145158bf1a8295d83591d22e4103dbfd821bcaf6f3f53151ca4ffa/nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182", size = 10248621, upload-time = "2025-03-07T01:40:21.213Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cuda-nvcc"
|
||||
version = "13.2.78"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "nvidia-cuda-crt", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "nvidia-cuda-runtime", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "nvidia-nvvm", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/ec/df/faf551572ae1359290afa5cb05d2c4b7e6674b07b8283b20eab4dbad15f6/nvidia_cuda_nvcc-13.2.78-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:dfc76950c775cd00ce588f15192f08c9b858c0dcfa7da685acf39a3d0d8f588b", size = 38713559, upload-time = "2026-04-13T09:42:17.478Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/65/0f/c7c7d538c61794130e759ad74710ab5aa8cab1f700ee1754381f8c665605/nvidia_cuda_nvcc-13.2.78-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c3bd144dd9b6b25e062589acb7bbd43d93d3120c72fad71da808f9817aba1239", size = 44040318, upload-time = "2026-04-13T09:42:50.457Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cuda-nvcc-cu12"
|
||||
version = "12.9.86"
|
||||
@@ -2870,6 +2901,15 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/eb/d1/e50d0acaab360482034b84b6e27ee83c6738f7d32182b987f9c7a4e32962/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fc1fec1e1637854b4c0a65fb9a8346b51dd9ee69e61ebaccc82058441f15bce8", size = 43106076, upload-time = "2025-03-07T01:41:59.817Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cuda-runtime"
|
||||
version = "13.3.29"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/5f/e5/c1a221c8e6fecd071b80ea44c20fc253ae24f56e15e3f77cfbc3fb76e724/nvidia_cuda_runtime-13.3.29-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:73291e19c9dd919c140c91bda2f80b0eca487da5ee30a086ef7bc4918ecb90ea", size = 2356574, upload-time = "2026-05-26T16:29:56.333Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/97/be/5699b6e642b372f7d24c59c2f41383e2696825e20bab85f7399c7c6a56f7/nvidia_cuda_runtime-13.3.29-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e04420616e72f563167a7733272992d7e6df6dc5cb54b2f94f9f1520ea9e30c1", size = 2339786, upload-time = "2026-05-26T16:30:21.584Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cuda-runtime-cu12"
|
||||
version = "12.8.90"
|
||||
@@ -2879,6 +2919,19 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/0d/9b/a997b638fcd068ad6e4d53b8551a7d30fe8b404d6f1804abf1df69838932/nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90", size = 954765, upload-time = "2025-03-07T01:40:01.615Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cuda-tileiras"
|
||||
version = "13.2.78"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "nvidia-cuda-nvcc", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "nvidia-nvvm", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/48/04/eb26cc1d67c653f5dbe8c13fd6da9c1e844b097147051b5052ac5e6d4047/nvidia_cuda_tileiras-13.2.78-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:658299efca52a20496b425efb0b19cb1ea7d57406a18d3f5024d4df92d5b54c1", size = 36418791, upload-time = "2026-04-13T09:48:30.107Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/7f/b8/c8a96862268943c7cf30a014fe2d8f70c651d30fbfa790d54c3e347b6fa1/nvidia_cuda_tileiras-13.2.78-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5ce7c140a518aa8dfe033e7176f593617ed2fece0e50331e2a14dafd236723fd", size = 36970479, upload-time = "2026-04-13T09:48:49.919Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cudnn-cu12"
|
||||
version = "9.22.0.52"
|
||||
@@ -2893,11 +2946,11 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-cudnn-frontend"
|
||||
version = "1.18.0"
|
||||
version = "1.25.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e3/b4/604e230378680ee117849a4e1045baca092f93161a829291a84d5acce70c/nvidia_cudnn_frontend-1.18.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:310b417f2848a83d1437203fcaeea320a74fb7f28af20bf42bf5afc9c01f1c12", size = 2027408, upload-time = "2026-01-27T23:32:46.576Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/c6/52/08f98262e77b1cbcc834cc1a5db494d0661ea1dbdea58c2e2d51a57fdaca/nvidia_cudnn_frontend-1.18.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6c023539ca6de99234cf5102c3ec0d6af817f5396fc93028a22ba5b834a35b8a", size = 2159245, upload-time = "2026-01-27T23:07:32.664Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/28/0f/df39a194f2529093db737d43cc4cbf594c6a79712a09aa104b999e4d95d4/nvidia_cudnn_frontend-1.25.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09e6e1bc48ce1235743f89d8ea699c52b3008fd6dae7f2ecadb744bebf272a2b", size = 3263306, upload-time = "2026-06-10T21:07:48.093Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/03/65/3b45941d8a22128b971e910f2e9af6bf5ef453e92cc329c56b6eb53c53de/nvidia_cudnn_frontend-1.25.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9a94a72d736bd79eb35f451aaf26d9493778e02ecabccc92c05425508c9e7a83", size = 3414884, upload-time = "2026-06-10T21:08:08.603Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3035,6 +3088,15 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/a2/eb/86626c1bbc2edb86323022371c39aa48df6fd8b0a1647bc274577f72e90b/nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f", size = 89954, upload-time = "2025-03-07T01:42:44.131Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nvidia-nvvm"
|
||||
version = "13.2.78"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e8/1f/930d63ccc8adcdf27bfc051a24e3e4da2cf6ef987848d6d1d642e29d704b/nvidia_nvvm-13.2.78-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:f5aa433631109bbdec81802c5b5f319bf10bc891fe2f212e4e445845211d6f77", size = 64279462, upload-time = "2026-04-13T10:02:25.719Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/8b/fd/db44b7a662a6af75a9a0683ca4580c855a3f5fcfdf1261b0ddb9fce0ee26/nvidia_nvvm-13.2.78-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:88075f87a361a1dce95c799cabc028f7093af616a5702dcfb74eba4045dbbd5f", size = 61886055, upload-time = "2026-04-13T10:02:00.345Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "oauthlib"
|
||||
version = "3.3.1"
|
||||
@@ -3519,8 +3581,8 @@ dependencies = [
|
||||
{ name = "transformers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "uvloop", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "vllm", version = "0.22.0+cu129", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.22.0+cu129", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.23.0+cu129", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl" }, marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },
|
||||
{ name = "vllm", version = "0.23.0+cu129", source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl" }, marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
{ name = "wandb", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
@@ -3549,7 +3611,6 @@ envs = [
|
||||
{ name = "aime26-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "alphabet-sort", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "alphabet-sort-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "code-env", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "code-golf-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "color-codeword-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "deepdive-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -3559,26 +3620,25 @@ envs = [
|
||||
{ name = "glossary-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "gpqa-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "gsm8k-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "hle", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "ifeval", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "i3-code-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "i3-science-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "ifeval-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "livecodebench-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "logic-env", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "math-env", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "math-env-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "math-python", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "math500", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "mmlu-pro", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "math500-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "mmlu-pro-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "r2e-gym-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "reverse-text", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "reverse-text-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "rlm-search", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "rlm-swe", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "scaleswe-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "science-env", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "simpleqa-verified", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "simpleqa-verified-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "swebench-verified-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "swelego-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "tau2-bench", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "tau2-bench-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "terminal-bench-2-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "uuid-ctf-v1", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -3629,7 +3689,6 @@ requires-dist = [
|
||||
{ name = "alphabet-sort", marker = "extra == 'envs'", editable = "deps/verifiers/environments/alphabet_sort" },
|
||||
{ name = "alphabet-sort-v1", marker = "extra == 'envs'", editable = "deps/verifiers/environments/alphabet_sort_v1" },
|
||||
{ name = "beartype", specifier = ">=0.21.0" },
|
||||
{ name = "code-env", marker = "extra == 'envs'", editable = "deps/research-environments/environments/code_env" },
|
||||
{ name = "code-golf-v1", marker = "extra == 'envs'", editable = "deps/verifiers/environments/code_golf_v1" },
|
||||
{ name = "color-codeword-v1", marker = "extra == 'envs'", editable = "deps/verifiers/environments/color_codeword_v1" },
|
||||
{ name = "datasets", specifier = ">=4.0.0" },
|
||||
@@ -3647,8 +3706,9 @@ requires-dist = [
|
||||
{ name = "glossary-v1", marker = "extra == 'envs'", editable = "deps/verifiers/environments/glossary_v1" },
|
||||
{ name = "gpqa-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/gpqa_v1" },
|
||||
{ name = "gsm8k-v1", marker = "extra == 'envs'", editable = "deps/verifiers/environments/gsm8k_v1" },
|
||||
{ name = "hle", marker = "extra == 'envs'", editable = "deps/research-environments/environments/hle" },
|
||||
{ name = "ifeval", marker = "extra == 'envs'", editable = "deps/research-environments/environments/ifeval" },
|
||||
{ name = "i3-code-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/i3_code_v1" },
|
||||
{ name = "i3-science-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/i3_science_v1" },
|
||||
{ name = "ifeval-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/ifeval_v1" },
|
||||
{ name = "jaxtyping", specifier = ">=0.3.2" },
|
||||
{ name = "kernels", marker = "extra == 'gpt-oss'" },
|
||||
{ name = "liger-kernel", specifier = ">=0.5.10" },
|
||||
@@ -3658,8 +3718,8 @@ requires-dist = [
|
||||
{ name = "math-env", marker = "extra == 'envs'", editable = "deps/research-environments/environments/math_env" },
|
||||
{ name = "math-env-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/math_env_v1" },
|
||||
{ name = "math-python", marker = "extra == 'envs'", editable = "deps/verifiers/environments/math_python" },
|
||||
{ name = "math500", marker = "extra == 'envs'", editable = "deps/research-environments/environments/math500" },
|
||||
{ name = "mmlu-pro", marker = "extra == 'envs'", editable = "deps/research-environments/environments/mmlu_pro" },
|
||||
{ name = "math500-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/math500_v1" },
|
||||
{ name = "mmlu-pro-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/mmlu_pro_v1" },
|
||||
{ name = "modelexpress", marker = "extra == 'modelexpress'", specifier = "==0.3.0" },
|
||||
{ name = "mooncake-transfer-engine", specifier = ">=0.3.10.post2" },
|
||||
{ name = "msgspec", specifier = ">=0.18" },
|
||||
@@ -3692,12 +3752,10 @@ requires-dist = [
|
||||
{ name = "rlm-search", marker = "extra == 'envs'", editable = "deps/research-environments/environments/rlm_search" },
|
||||
{ name = "rlm-swe", marker = "extra == 'envs'", editable = "deps/research-environments/environments/rlm_swe" },
|
||||
{ name = "scaleswe-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/scaleswe_v1" },
|
||||
{ name = "science-env", marker = "extra == 'envs'", editable = "deps/research-environments/environments/science_env" },
|
||||
{ name = "setproctitle", specifier = ">=1.3.0" },
|
||||
{ name = "simpleqa-verified", marker = "extra == 'envs'", editable = "deps/research-environments/environments/simpleqa_verified" },
|
||||
{ name = "simpleqa-verified-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/simpleqa_verified_v1" },
|
||||
{ name = "swebench-verified-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/swebench_verified_v1" },
|
||||
{ name = "swelego-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/swelego_v1" },
|
||||
{ name = "tau2-bench", marker = "extra == 'envs'", editable = "deps/research-environments/environments/tau2_bench" },
|
||||
{ name = "tau2-bench-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/tau2_bench_v1" },
|
||||
{ name = "tenacity", specifier = ">=8.2.0" },
|
||||
{ name = "terminal-bench-2-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/terminal_bench_2_v1" },
|
||||
@@ -3711,9 +3769,9 @@ requires-dist = [
|
||||
{ name = "uuid-ctf-v1", marker = "extra == 'envs'", editable = "deps/research-environments/environments/uuid_ctf_v1" },
|
||||
{ name = "uvloop", specifier = ">=0.21.0" },
|
||||
{ name = "verifiers", editable = "deps/verifiers" },
|
||||
{ name = "vllm", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64'", specifier = ">=0.22.0" },
|
||||
{ name = "vllm", marker = "platform_machine == 'aarch64'", url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl" },
|
||||
{ name = "vllm", marker = "platform_machine == 'x86_64'", url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl" },
|
||||
{ name = "vllm", marker = "platform_machine != 'aarch64' and platform_machine != 'x86_64'", specifier = ">=0.23.0" },
|
||||
{ name = "vllm", marker = "platform_machine == 'aarch64'", url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl" },
|
||||
{ name = "vllm", marker = "platform_machine == 'x86_64'", url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl" },
|
||||
{ name = "vllm-router", marker = "platform_machine == 'x86_64' and extra == 'disagg'", url = "https://github.com/PrimeIntellect-ai/router/releases/download/v0.1.26/vllm_router-0.1.26-cp38-abi3-manylinux_2_28_x86_64.whl" },
|
||||
{ name = "wandb", specifier = ">=0.26.1" },
|
||||
{ name = "wiki-search", marker = "extra == 'envs'", editable = "deps/verifiers/environments/wiki_search" },
|
||||
@@ -4528,21 +4586,6 @@ requires-dist = [
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev381" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "science-env"
|
||||
version = "0.1.4"
|
||||
source = { editable = "deps/research-environments/environments/science_env" }
|
||||
dependencies = [
|
||||
{ name = "math-verify", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "math-verify", specifier = ">=0.8.0" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev17" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "scikit-learn"
|
||||
version = "1.9.0"
|
||||
@@ -4643,15 +4686,21 @@ wheels = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "simpleqa-verified"
|
||||
version = "0.1.2"
|
||||
source = { editable = "deps/research-environments/environments/simpleqa_verified" }
|
||||
name = "simpleqa-verified-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/simpleqa_verified_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "openai", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", specifier = ">=0.1.15.dev17" }]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "openai" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev397" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "six"
|
||||
@@ -4822,14 +4871,14 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "synchronicity"
|
||||
version = "0.12.3"
|
||||
version = "0.12.5"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "typing-extensions", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/ec/d5/e96e6082790c92480380f28aa53e111844cdac7b0f75846f4772cb535a43/synchronicity-0.12.3.tar.gz", hash = "sha256:0d4228b85eaf2805f23b4615b2039a9d24ea811646e2d9f8d0c033094eb85841", size = 60261, upload-time = "2026-05-28T12:33:50.206Z" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/5d/1c/f51dc54bbd302991026a53f9790735540e0e9e1184e9d5939f02446aa5bc/synchronicity-0.12.5.tar.gz", hash = "sha256:94d96b1d85698e3056b96a793b8c0949af6584e4a7d877fabdeb5385efe230aa", size = 60745, upload-time = "2026-06-18T21:06:23.545Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/57/ea/531a6ea751cbd989da386144810b1b8f529b0aae8c1a9beda8b40966c9c2/synchronicity-0.12.3-py3-none-any.whl", hash = "sha256:e476818cd14102136f41622c619de548f0000c024485fc18521c8fe908ea7574", size = 40982, upload-time = "2026-05-28T12:33:49.125Z" },
|
||||
{ url = "https://files.pythonhosted.org/packages/06/74/ad9b99520f70c0bc3318e582e359d360cfc0f7afd7bf368a7f24013cece7/synchronicity-0.12.5-py3-none-any.whl", hash = "sha256:fdbbb10d437bc08a6b0f814fc66fddd1b58ffed314533d42f1ab555801e781af", size = 41107, upload-time = "2026-06-18T21:06:22.505Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4874,21 +4923,6 @@ dependencies = [
|
||||
{ name = "watchdog", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tau2-bench"
|
||||
version = "0.2.3"
|
||||
source = { editable = "deps/research-environments/environments/tau2_bench" }
|
||||
dependencies = [
|
||||
{ name = "tau2", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "tau2", git = "https://github.com/sierra-research/tau2-bench.git?rev=337326e" },
|
||||
{ name = "verifiers", specifier = ">=0.1.15.dev17" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tau2-bench-v1"
|
||||
version = "0.2.0"
|
||||
@@ -5510,6 +5544,7 @@ requires-dist = [
|
||||
{ name = "deepspeed", marker = "extra == 'rl'", specifier = ">=0.17.6" },
|
||||
{ name = "flash-attn", marker = "extra == 'rl'", specifier = ">=2.8.3" },
|
||||
{ name = "gepa" },
|
||||
{ name = "harbor", marker = "python_full_version >= '3.12' and extra == 'harbor'", specifier = "==0.14.0" },
|
||||
{ name = "httpx", specifier = ">=0.27.0" },
|
||||
{ name = "liger-kernel", marker = "extra == 'rl'", specifier = ">=0.5.10" },
|
||||
{ name = "loguru", specifier = ">=0.7.0" },
|
||||
@@ -5548,7 +5583,7 @@ requires-dist = [
|
||||
{ name = "vllm", marker = "extra == 'rl'", specifier = ">=0.10.0,<0.11.0" },
|
||||
{ name = "wandb", marker = "extra == 'rl'" },
|
||||
]
|
||||
provides-extras = ["browser", "modal", "notebook", "quest", "rg", "rl", "ta"]
|
||||
provides-extras = ["browser", "harbor", "modal", "notebook", "quest", "rg", "rl", "ta"]
|
||||
|
||||
[package.metadata.requires-dev]
|
||||
dev = [
|
||||
@@ -5599,8 +5634,8 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "vllm"
|
||||
version = "0.22.0+cu129"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl" }
|
||||
version = "0.23.0+cu129"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl" }
|
||||
resolution-markers = [
|
||||
"platform_machine == 'aarch64' and sys_platform == 'linux'",
|
||||
]
|
||||
@@ -5678,7 +5713,7 @@ dependencies = [
|
||||
{ name = "xgrammar", marker = "platform_machine == 'aarch64' and sys_platform == 'linux'" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:14f586820f3ed2cecdbda39651ecfe1cd097102200e25bbff5e740ccecb6143d" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:17ac76bbfad014d5b584a9499bca22d3f871d24db93cbb1eb27a87deef0219aa" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
@@ -5691,20 +5726,20 @@ requires-dist = [
|
||||
{ name = "cachetools" },
|
||||
{ name = "cbor2" },
|
||||
{ name = "cloudpickle" },
|
||||
{ name = "compressed-tensors", specifier = "==0.15.0.1" },
|
||||
{ name = "compressed-tensors", specifier = "==0.17.0" },
|
||||
{ name = "datasets", marker = "extra == 'bench'" },
|
||||
{ name = "depyf", specifier = "==0.20.0" },
|
||||
{ name = "diskcache", specifier = "==5.6.3" },
|
||||
{ name = "einops" },
|
||||
{ name = "fastapi", extras = ["standard"], specifier = ">=0.115.0" },
|
||||
{ name = "fastsafetensors", specifier = ">=0.2.2" },
|
||||
{ name = "fastsafetensors", marker = "extra == 'fastsafetensors'", specifier = ">=0.2.2" },
|
||||
{ name = "fastsafetensors", specifier = ">=0.3.2" },
|
||||
{ name = "fastsafetensors", marker = "extra == 'fastsafetensors'", specifier = ">=0.3.2" },
|
||||
{ name = "filelock", specifier = ">=3.16.1" },
|
||||
{ name = "flashinfer-cubin", specifier = "==0.6.11.post2" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.11.post2" },
|
||||
{ name = "flashinfer-cubin", specifier = "==0.6.12" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.12" },
|
||||
{ name = "gguf", specifier = ">=0.17.0" },
|
||||
{ name = "helion", marker = "extra == 'helion'", specifier = "==1.0.0" },
|
||||
{ name = "humming-kernels", extras = ["cu12"], specifier = "==0.1.2" },
|
||||
{ name = "humming-kernels", extras = ["cu12"], specifier = "==0.1.4" },
|
||||
{ name = "ijson" },
|
||||
{ name = "instanttensor", marker = "extra == 'instanttensor'", specifier = ">=0.1.5" },
|
||||
{ name = "lark", specifier = "==1.2.2" },
|
||||
@@ -5713,13 +5748,13 @@ requires-dist = [
|
||||
{ name = "matplotlib", marker = "extra == 'bench'" },
|
||||
{ name = "mcp" },
|
||||
{ name = "mistral-common", extras = ["audio"], marker = "extra == 'audio'" },
|
||||
{ name = "mistral-common", extras = ["image"], specifier = ">=1.11.2" },
|
||||
{ name = "mistral-common", extras = ["image"], specifier = ">=1.11.3" },
|
||||
{ name = "model-hosting-container-standards", specifier = ">=0.1.14,<1.0.0" },
|
||||
{ name = "msgspec" },
|
||||
{ name = "ninja" },
|
||||
{ name = "numba", specifier = "==0.65.0" },
|
||||
{ name = "numpy" },
|
||||
{ name = "nvidia-cudnn-frontend", specifier = ">=1.13.0,<1.19.0" },
|
||||
{ name = "nvidia-cudnn-frontend", specifier = ">=1.19.1" },
|
||||
{ name = "nvidia-cutlass-dsl", specifier = "==4.5.2" },
|
||||
{ name = "openai", specifier = ">=2.0.0" },
|
||||
{ name = "openai-harmony", specifier = ">=0.0.3" },
|
||||
@@ -5774,14 +5809,14 @@ requires-dist = [
|
||||
{ name = "typing-extensions", specifier = ">=4.10" },
|
||||
{ name = "watchfiles" },
|
||||
{ name = "xgrammar", marker = "platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'ppc64le' or platform_machine == 's390x' or platform_machine == 'x86_64'", specifier = ">=0.2.0,<1.0.0" },
|
||||
{ name = "zentorch-weekly", marker = "extra == 'zen'", specifier = "==5.2.1.dev20260408" },
|
||||
{ name = "zentorch", marker = "extra == 'zen'", specifier = "==2.11.0.0" },
|
||||
]
|
||||
provides-extras = ["zen", "bench", "tensorizer", "fastsafetensors", "instanttensor", "runai", "audio", "video", "flashinfer", "helion", "grpc", "otel"]
|
||||
|
||||
[[package]]
|
||||
name = "vllm"
|
||||
version = "0.22.0+cu129"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl" }
|
||||
version = "0.23.0+cu129"
|
||||
source = { url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl" }
|
||||
resolution-markers = [
|
||||
"platform_machine == 'x86_64' and sys_platform == 'linux'",
|
||||
]
|
||||
@@ -5859,7 +5894,7 @@ dependencies = [
|
||||
{ name = "xgrammar", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
|
||||
]
|
||||
wheels = [
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.22.0/vllm-0.22.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:405319a7fde1af416eef6cbab0315d354d8b9c1a45b97097a9f1c3707bf05f74" },
|
||||
{ url = "https://github.com/vllm-project/vllm/releases/download/v0.23.0/vllm-0.23.0+cu129-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:8bc2203995d061e6b988916b71b9dee8a5970f5fdc5f37d4445a877a2fab2cc1" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
@@ -5872,20 +5907,20 @@ requires-dist = [
|
||||
{ name = "cachetools" },
|
||||
{ name = "cbor2" },
|
||||
{ name = "cloudpickle" },
|
||||
{ name = "compressed-tensors", specifier = "==0.15.0.1" },
|
||||
{ name = "compressed-tensors", specifier = "==0.17.0" },
|
||||
{ name = "datasets", marker = "extra == 'bench'" },
|
||||
{ name = "depyf", specifier = "==0.20.0" },
|
||||
{ name = "diskcache", specifier = "==5.6.3" },
|
||||
{ name = "einops" },
|
||||
{ name = "fastapi", extras = ["standard"], specifier = ">=0.115.0" },
|
||||
{ name = "fastsafetensors", specifier = ">=0.2.2" },
|
||||
{ name = "fastsafetensors", marker = "extra == 'fastsafetensors'", specifier = ">=0.2.2" },
|
||||
{ name = "fastsafetensors", specifier = ">=0.3.2" },
|
||||
{ name = "fastsafetensors", marker = "extra == 'fastsafetensors'", specifier = ">=0.3.2" },
|
||||
{ name = "filelock", specifier = ">=3.16.1" },
|
||||
{ name = "flashinfer-cubin", specifier = "==0.6.11.post2" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.11.post2" },
|
||||
{ name = "flashinfer-cubin", specifier = "==0.6.12" },
|
||||
{ name = "flashinfer-python", specifier = "==0.6.12" },
|
||||
{ name = "gguf", specifier = ">=0.17.0" },
|
||||
{ name = "helion", marker = "extra == 'helion'", specifier = "==1.0.0" },
|
||||
{ name = "humming-kernels", extras = ["cu12"], specifier = "==0.1.2" },
|
||||
{ name = "humming-kernels", extras = ["cu12"], specifier = "==0.1.4" },
|
||||
{ name = "ijson" },
|
||||
{ name = "instanttensor", marker = "extra == 'instanttensor'", specifier = ">=0.1.5" },
|
||||
{ name = "lark", specifier = "==1.2.2" },
|
||||
@@ -5894,13 +5929,13 @@ requires-dist = [
|
||||
{ name = "matplotlib", marker = "extra == 'bench'" },
|
||||
{ name = "mcp" },
|
||||
{ name = "mistral-common", extras = ["audio"], marker = "extra == 'audio'" },
|
||||
{ name = "mistral-common", extras = ["image"], specifier = ">=1.11.2" },
|
||||
{ name = "mistral-common", extras = ["image"], specifier = ">=1.11.3" },
|
||||
{ name = "model-hosting-container-standards", specifier = ">=0.1.14,<1.0.0" },
|
||||
{ name = "msgspec" },
|
||||
{ name = "ninja" },
|
||||
{ name = "numba", specifier = "==0.65.0" },
|
||||
{ name = "numpy" },
|
||||
{ name = "nvidia-cudnn-frontend", specifier = ">=1.13.0,<1.19.0" },
|
||||
{ name = "nvidia-cudnn-frontend", specifier = ">=1.19.1" },
|
||||
{ name = "nvidia-cutlass-dsl", specifier = "==4.5.2" },
|
||||
{ name = "openai", specifier = ">=2.0.0" },
|
||||
{ name = "openai-harmony", specifier = ">=0.0.3" },
|
||||
@@ -5955,7 +5990,7 @@ requires-dist = [
|
||||
{ name = "typing-extensions", specifier = ">=4.10" },
|
||||
{ name = "watchfiles" },
|
||||
{ name = "xgrammar", marker = "platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'ppc64le' or platform_machine == 's390x' or platform_machine == 'x86_64'", specifier = ">=0.2.0,<1.0.0" },
|
||||
{ name = "zentorch-weekly", marker = "extra == 'zen'", specifier = "==5.2.1.dev20260408" },
|
||||
{ name = "zentorch", marker = "extra == 'zen'", specifier = "==2.11.0.0" },
|
||||
]
|
||||
provides-extras = ["zen", "bench", "tensorizer", "fastsafetensors", "instanttensor", "runai", "audio", "video", "flashinfer", "helion", "grpc", "otel"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user