Compare commits

...
Author SHA1 Message Date
samsjaandGitHub ada6bd26db fix(docs): mark Qwen3/Qwen3.5 VLM CP as supported, drop stale 'Other HF' row (#3749)
**What**
- README Models-support table: CP for Qwen3 / Qwen3.5 VLMs was listed as
not supported (red cross) — changed to supported.
- Removed the stale 'Other HF causal LMs' row from the README table.
- Updated the same Qwen VLM CP claim in docs/advanced.md for
consistency.

**Why it's true**
CP works for the Qwen VLMs since #3099 (CP for hybrid + VLM SFT) and
#3103 (pack multimodal samples with CP): Qwen3_5ForCausalLM is the
unified class for the qwen3_5 / qwen3_5_moe VLM configs, cp_support()
returns ring + ulysses for them, and image grids / positions are sharded
under CP.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation-only changes to support matrices; no runtime or config
behavior is modified.
> 
> **Overview**
> Updates the **Models support** tables in `README.md` and
`docs/advanced.md` so **Qwen3 / Qwen3.5 VLMs** show **context
parallelism (CP) as supported** (✅), replacing the outdated ❌ that no
longer matches trainer behavior after recent CP + multimodal work.
> 
> The README also **drops the “Other HF causal LMs” row**, which was
redundant/stale relative to the family-specific table above it.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1f56cb4438ed93bf387a43019c4bd1982aa7f7f6. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-10-01 19:29:51 -07:00
Konstantin DunasandGitHub 70149e9e49 chore: bump verifiers to 185b67d and prime-envs to e82de8b (#3750) 2026-10-02 02:25:38 +02:00
Scott CabrinhaandGitHub 80f9bd1a63 fix(sft): reshard FSDP2 params after validation before grad clipping (#3737)
## Summary

SFT validation runs between backward and `clip_grad_norm_` (deliberate:
`torch.compile` sees the training graph first, and `eval_on_start`
evaluates untrained weights). The `[lm_head, norm]` FSDP2 group opts out
of `reshard_after_forward`, so the no-grad validation forward leaves it
unsharded. FSDP2 keeps the reduced gradients on the *sharded*
parameters, so `clip_grad_norm_` — which walks `model.parameters()` —
sees the grad-less unsharded parameters and skips them. The gradient
norm is too low on validation steps, and the skipped gradients are not
scaled.

Fix: reshard the FSDP modules right after `run_validation` (one call to
the existing `reshard_module` helper), before clipping. Affected runs:
SFT with `optim.max_norm` set and `[val]` enabled, on the GPU optimizer
or `optim_cpu_offload` (the `full_offload` path disables clipping by
config validation, and the RL trainer has no validation step between
backward and clipping, so both are unaffected).

Seen on prime-rl `7f9de649aa80` (GLM-5.3 SFT): on validation steps the
norm was 13.7% low (66.6 vs 77.2) and clipping saw 112 of 114
parameters.

- [ENG-6447](https://linear.app/primeintellect/issue/ENG-6447)

## Testing

- The GPU test that originally accompanied this fix was removed on
request; coverage of the reshard-before-clipping behavior now relies on
the external GLM-5.3 SFT run and the code-path trace in the ticket
below.
- `ruff check` + `ruff format` (v0.13.0, as pinned by pre-commit) pass
on the changed file.
- No CUDA locally, so the suite was not run here; nothing else in the
diff is behaviorally load-bearing beyond the 5-line fix.

## Notes for reviewers

- The 13.7% figure was measured on an external GLM-5.3 SFT cluster; we
could not reproduce it locally and did not try — the mechanism is
confirmed from the code path (see the Linear ticket for the full trace).
- `reshard_module` already existed in `trainer/model.py` but had no
callers.
2026-10-01 16:13:03 -06:00
15dc2c6f40 feat(sft): map dataset columns in data.columns (#3744)
## Summary

- add `[data.columns]`, which names the dataset columns the SFT trainer
reads. `messages`, `prompt`, and `completion` hold lists of OpenAI chat
messages and `tools` holds OpenAI function-calling schemas; each
defaults to today's name. `SFTDataset` reads the configured names per
row, so no dataset is rewritten up front. The defaults are optional
because a dataset carries either `messages` or `prompt`/`completion`; a
name set in the config must exist in the dataset
- add `[data.columns.renderer]`, a `renderer field = dataset column`
mapping that sets any renderer template control per sample, e.g.
`reasoning_effort = "effort"` for a dataset whose column is named
differently from the renderer field. It defaults to `reasoning_effort =
"reasoning_effort"` on the config. `RendererResolver` reads the mapped
columns per row and merges a row's non-null values through
`merge_chat_template_kwargs`, so the renderer's config validates them
and custom renderers' fields work too. Rows and datasets without a
mapped column use the configured renderer unchanged
- the trainer reads `tools` as OpenAI schemas as is (a list of dicts or
a JSON-encoded string of one); it no longer rewrites other shapes
- docs in `training.md`; unit tests for the resolver with default and
mapped renderer columns, for a renderer without the field, for mapped
message columns, and for tools passing through from the mapped column

## Breaking

- The trainer no longer falls back to a `tool_defs` column when `tools`
is absent, and no longer converts verifiers-shaped tool entries
(`name`/`description`/`parameters` at the top level) into OpenAI
function-calling schemas. Provide the `tools` column in OpenAI format,
under any name via `[data.columns] tools = "..."`.

## Verification

- `tests/unit/test_configs.py` and `tests/unit/train/sft`: 284 passed;
the two `test_prime_monitor.py` failures also fail on `main` in this
setup
- SFT e2e on 2 GPUs with the renderer mapping in place (reverse-text, 10
steps, custom renderer, dataset without a `reasoning_effort` column):
loss 4.64 → 3.56, matching the run without the mapping step for step

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Breaking SFT dataset contract for `tool_defs` and non-OAI tool shapes;
column mapping misconfiguration fails at dataset init or render time.
> 
> **Overview**
> Adds **`[data.columns]`** so SFT can read chat data and tool schemas
from differently named HF columns (`messages`, `prompt`/`completion`,
`tools`) without rewriting datasets. **`[data.columns.renderer]`**
generalizes per-row renderer overrides: any renderer template field can
map to a dataset column (default still `reasoning_effort`), merged via
`merge_chat_template_kwargs` in **`RendererResolver`**.
> 
> **Breaking:** the trainer no longer accepts a **`tool_defs`** fallback
or converts verifiers-style tool dicts to OpenAI function-calling
format—**`tools`** must be OpenAI-shaped (list or JSON string),
optionally under a custom name via **`[data.columns]`**.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
a07ffb838c5c6cbf1e9ab9f20662078c85b69ebf. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-01 14:47:50 -07:00
db699f39ee feat: custom renderers from local modules and files (#3743)
## Summary

- pin `deps/renderers` to `d43c430`, the PrimeIntellect-ai/renderers#168
merge on `main`, which adds `CustomRendererConfig` and
`renderers.custom`. `[renderer] name = "custom"` with `import_path =
"my_module.Class"` or `"path/to/file.py:Class"` selects a renderer that
lives outside the renderers package, for SFT and for RL via
`[orchestrator.renderer]`. The renderer's own `config_class` validates
the remaining `[renderer]` keys, which sit inline like every other
renderer config; the key names match `type = "custom"` + `import_path`
on custom losses and filters
- SFT applies a `reasoning_effort` column through
`merge_chat_template_kwargs`, so custom renderer configs honour the
column and renderers without the field reject it with the renderers
error
- docs in `training.md` and `algorithms.md`; unit tests for a custom
renderer in SFT and orchestrator configs, unknown fields rejected, and
the SFT resolver with a custom renderer's `reasoning_effort`, each
against a toy renderer written to `tmp_path`

#3744 stacks on this PR with a `[data.columns]` mapping.

## Verification

- `tests/unit/test_configs.py`, `tests/unit/inference`,
`tests/unit/train/sft`, `tests/unit/orchestrator/test_clients.py`: 308
passed (config tests rerun after the fixture change: 204 passed); the
two `test_prime_monitor.py` failures also fail on `main` in this setup
(they read source files by package path)
- the e2e runs below use a PrimeIntellect Qwen3 subclass that appends an
`instruction` template control to the system prompt (not checked in).
Rendered with the real `PrimeIntellect/Qwen3-0.6B` tokenizer, the
instruction lands in the system turn, and a conversation without a
system message gets one whose tokens carry message index -1 while the
user and assistant tokens match the base renderer exactly
- loaded the renderers README's GLM-5.3 no-thinking custom renderer
through an SFT config on this branch: it resolves and renders the
generation prompt as `<|assistant|><think></think>`
- SFT e2e on 2 GPUs (the reverse-text SFT config with that renderer as
`[renderer]`, 10 steps, evals at 5 and 10 with 8 rollouts): loss 4.64 →
3.56, no errors. Re-rendering the first dataset row with the run's
resolved config shows the instruction appended to the dataset's system
prompt
- RL e2e on 2 GPUs (the reverse-text RL config with that renderer as
`[orchestrator.renderer]`, 5 steps, 32-rollout eval at steps 0 and 5):
train reward 0.22 → 0.56, eval reward 0.05 → 0.74, no errors. Decoding
the prompt tokens of every trace in the run's stream: all 781 train
rollouts carry the instruction, the 64 eval rollouts (chat-completions
through vLLM's template) do not
- a downstream custom renderer passes 88 of its 94 tests against this
branch; the 6 per-sample column tests pass with #3744

🤖 Generated with [Claude Code](https://claude.com/claude-code)



<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Changes are config/docs plus SFT renderer resolution; behavior for
built-in renderers should stay equivalent via
`merge_chat_template_kwargs`, with risk limited to misconfigured custom
`import_path` at launch.
> 
> **Overview**
> Adds **custom renderer** support documented end-to-end: set
`[renderer]` or `[orchestrator.renderer]` to `name = "custom"` with
`import_path` pointing at a user class (`module.Class` or
`path/to/file.py:Class`). Extra TOML keys are validated by that class’s
`config_class`, matching the pattern used for custom losses/filters.
> 
> SFT **per-row `reasoning_effort`** now goes through the renderers
helper `merge_chat_template_kwargs` instead of hand-rolled Pydantic
checks, so custom configs that declare `reasoning_effort` (via
`_template_fields`) honor the dataset column and invalid values fail at
validation time.
> 
> **Tests** cover SFT and orchestrator config loading with a toy
renderer on disk, rejection of unknown renderer keys, and
`RendererResolver` caching when `reasoning_effort` overrides a custom
config.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
b051050d57b2acd707b07346081d8f229e2227b8. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-01 14:20:07 -07:00
15 changed files with 377 additions and 141 deletions
+1 -3
View File
@@ -53,15 +53,13 @@ With `[model] impl = "auto"` (the default), the trainer selects that custom stac
| GLM-5 (`glm_moe_dsa`) | `zai-org/GLM-5`, `zai-org/GLM-5-FP8` | yes | ✅ | ✅ |
| Qwen3 MoE (`qwen3_moe`) | `Qwen/Qwen3-30B-A3B`, … | yes | ✅ | ✅ |
| Qwen3.5 MoE (`qwen3_5_moe`) | `Qwen/Qwen3.5-35B-A3B`, … | yes | ✅ | ✅ |
| Qwen3 / Qwen3.5 VLMs | see [advanced.md](docs/advanced.md#multimodal-training) (`qwen3_vl`, `qwen3_5`, `qwen3_5_moe`) | MoE only on MoE VLMs | MoE only | ❌ |
| Qwen3 / Qwen3.5 VLMs | see [advanced.md](docs/advanced.md#multimodal-training) (`qwen3_vl`, `qwen3_5`, `qwen3_5_moe`) | MoE only on MoE VLMs | MoE only | ✅ |
| Poolside Laguna (`laguna`) | `poolside/Laguna-XS.2` | yes | ✅ | ✅ |
| MiniMax M2 (`minimax_m2`) | `MiniMax/MiniMax-M2` | yes | ✅ | ✅ |
| Nemotron H (`nemotron_h`) | `nvidia/Nemotron-3-Nano-30B-A3B`, `nvidia/Nemotron-3-Super-120B-A12B`, … | yes | ✅ | ✅ |
| Trinity (`afmoe`) | `arcee-ai/Trinity-Mini`, … | yes | ✅ | ✅ |
| GLM-4 · GLM-4.5 MoE · INTELLECT-3 (`glm4_moe`) | `THUDM/GLM-4-9B-0414`, `zai-org/GLM-4.5-Air`, `zai-org/GLM-4.5`, `PrimeIntellect/INTELLECT-3`, … | yes | ✅ | ✅ |
| GPT-OSS (`gpt_oss`) | `unsloth/gpt-oss-20b-BF16`, … | yes | ✅ | ✅ |
| Other HF causal LMs | Qwen3 dense, Mistral, … (`impl = "hf"`) | varies | ❌ | ✅ |
## Setup
+4 -2
View File
@@ -9,5 +9,7 @@ group_size = 4
env.taskset.id = "terminal-bench-2"
env.agent.harness.id = "bash"
env.agent.timeout.rollout = 3600
env.agent.retries.max_retries = 2
env.agent.retries.include = ["ProviderError", "SandboxError"]
env.agent.retries.rules = [
{type = "ProviderError", max_retries = 2},
{type = "SandboxError", max_retries = 2},
]
+1 -1
+1 -1
+1 -1
View File
@@ -28,7 +28,7 @@ impl = "custom" # or "hf" to force the HF path
| GLM-5 / GLM-5.2 (`glm_moe_dsa`) | `zai-org/GLM-5`, `zai-org/GLM-5-FP8`, `zai-org/GLM-5.2`, `zai-org/GLM-5.2-FP8` | ✅ | ✅ |
| Qwen3 MoE | `Qwen/Qwen3-30B-A3B`, … | ✅ | ✅ |
| Qwen3.5 MoE | `Qwen/Qwen3.5-35B-A3B`, … | ✅ | ✅ |
| Qwen3 / Qwen3.5 VLMs | see [Multimodal training](#multimodal-training) | MoE only | ❌ |
| Qwen3 / Qwen3.5 VLMs | see [Multimodal training](#multimodal-training) | MoE only | ✅ |
| Laguna | `poolside/Laguna-XS.2` | ✅ | ✅ |
| MiniMax M2 | `MiniMax/MiniMax-M2` | ✅ | ✅ |
| Nemotron H | `nvidia/Nemotron-3-Nano-30B-A3B`, … | ✅ | ❌ |
+2
View File
@@ -549,6 +549,8 @@ Hand-coded renderers ship for `qwen3`, `qwen3-vl`, `qwen3.5`, `glm-5`, `glm-4.5`
name = "auto" # detect from tokenizer; pass an explicit name for fine-tunes
```
A renderer outside the `renderers` package loads as a custom renderer: `name = "custom"` with `import_path = "my_module.Class"` (or `path/to/file.py:Class`), see [Custom renderers](training.md#dataset-format).
For the full design rationale (failure modes ruled out, empirical token-identity comparison against `apply_chat_template`, when to write a hand-coded renderer), see [the renderers writeup on the Prime Intellect blog](https://www.primeintellect.ai/blog/renderers) — the canonical reference.
### Discontinuous Trajectories
+4 -2
View File
@@ -185,8 +185,10 @@ env.taskset.id = "math"
group_size = 32 # this source's own value wins over the group's 16
[orchestrator.eval.env]
retries.max_retries = 3
retries.include = ["ProviderError", "SandboxError"]
retries.rules = [
{type = "ProviderError", max_retries = 3},
{type = "SandboxError", max_retries = 3},
]
timeout.episode = 7200
[orchestrator.eval.select] # evaluate 128 tasks of each taskset
+26 -3
View File
@@ -150,9 +150,15 @@ Two accepted layouts:
- **Prompt-completion**: a HF dataset with `prompt` and `completion` columns ([TRL format](https://huggingface.co/docs/trl/en/dataset_formats#prompt-completion)). The trainer masks out the prompt and computes loss only over the completion.
- **Messages**: a HF dataset with a single `messages` column containing a list of chat turns. The trainer interprets the whole conversation as one sample, applies role-based loss masking, and trains over all assistant turns.
If both columns are present, `messages` takes precedence.
If both columns are present, `messages` takes precedence. A dataset that stores these under other names maps them in `[data.columns]`; the trainer renames the columns at load time:
**Tool definitions and renderer controls.** For tool-use SFT, add a `tools` column (OpenAI function-calling format) or `tool_defs` ([`verifiers`](https://github.com/PrimeIntellect-ai/verifiers) rollout format). Each row's value can be either a list of dicts or a JSON-encoded string of a list — both are accepted, and `tool_defs` rows are auto-converted to OAI shape before being passed into the renderer.
```toml
[data.columns]
messages = "conversation"
tools = "schemas"
```
**Tool definitions and renderer controls.** For tool-use SFT, add a `tools` column in OpenAI function-calling format. Each row's value can be either a list of dicts or a JSON-encoded string of a list.
Renderer-backed SFT reads template controls from the typed `[renderer]` config in the SFT TOML. For example:
@@ -162,10 +168,27 @@ name = "qwen3"
enable_thinking = false
```
A `reasoning_effort` column in the dataset sets the renderer's `reasoning_effort` field per row, on top of the `[renderer]` config. The column requires a typed renderer that has that field (for example `gpt-oss`, `qwen3.8`, `deepseek-v4`); rows with a null value use the configured renderer unchanged. This lets one run mix reasoning efforts, with the `[renderer]` value as the default for rows that do not set one.
Dataset columns can set renderer template controls per row, on top of the `[renderer]` config. `[data.columns.renderer]` maps renderer fields to columns and defaults to `reasoning_effort = "reasoning_effort"`, so a `reasoning_effort` column sets that field on renderers that have it (for example `gpt-oss`, `qwen3.8`, `deepseek-v4`). Rows with a null value use the configured renderer unchanged. This lets one run mix reasoning efforts, with the `[renderer]` value as the default for rows that do not set one:
```toml
# The renderer field is reasoning_effort; this dataset stores it in an effort column.
[data.columns.renderer]
reasoning_effort = "effort"
```
If a model needs another template control, add it to that model's renderer config in `renderers` (for example a new field on the relevant `*RendererConfig`) and consume it in the renderer implementation.
**Custom renderers.** A renderer can also live outside the `renderers` package. Set `name = "custom"` and point `import_path` at the class, as `my_module.Class` or `path/to/file.py:Class`; relative file paths resolve against the launch directory. The class sets `config_class` to its own `BaseRendererConfig` subclass, which validates the remaining `[renderer]` keys and declares its template controls:
```toml
[renderer]
name = "custom"
import_path = "my_renderers.glm53_no_thinking.NoThinkingGLM53Renderer"
clear_thinking = true
```
The same config selects the renderer for RL under `[orchestrator.renderer]`. The [`renderers` README](https://github.com/PrimeIntellect-ai/renderers#custom-renderers) shows the class behind this example.
**Renderer-backed tokenization.** SFT tokenization is renderer-only. The [`renderers`](algorithms.md#renderers) package owns message-to-token conversion and loss attribution end-to-end, so position-dependent chat templates (for example templates that strip past `<think>` blocks across user turns) do not corrupt the loss mask. `[renderer]` defaults to `name = "auto"`; set a typed renderer config only when you need model-specific template controls. Hand-coded renderers ship for Qwen3, Qwen3.5, GLM-5, GLM-4.5, Kimi K2/K2.5, MiniMax M2, DeepSeek V3, Nemotron 3, GPT-OSS, and VLM families such as Qwen3-VL/Qwen3.5.
**VLM training requires a custom PrimeRL implementation.** Training a model with `[model.vlm]` set (SFT or RL) requires `model.impl = "custom"` and only works for models with a registered PrimeRL VLM class (currently Qwen3.5 dense and MoE).
@@ -85,6 +85,25 @@ class LossMaskConfig(BaseConfig):
"""Tool messages contribute to the loss."""
class SFTColumnsConfig(BaseConfig):
"""Dataset columns the trainer reads. Set a field to read a column under another name."""
messages: str = "messages"
"""Column with the whole chat as a list of OpenAI chat messages."""
prompt: str = "prompt"
"""Column with the prompt as a list of OpenAI chat messages, read with ``completion`` when a row has no messages."""
completion: str = "completion"
"""Column with the completion as a list of OpenAI chat messages."""
tools: str = "tools"
"""Column with the tool schemas in OpenAI function-calling format."""
renderer: dict[str, str] = {"reasoning_effort": "reasoning_effort"}
"""Per-sample renderer arguments as ``renderer field = dataset column``, e.g. ``reasoning_effort = "effort"``. A row's non-null value overrides the ``[renderer]`` setting; rows and datasets without the column use it unchanged."""
class SFTDataConfig(BaseDataConfig):
type: Literal["sft"] = "sft"
@@ -112,6 +131,9 @@ class SFTDataConfig(BaseDataConfig):
seed: int = 0
"""Random seed for shuffling. Re-shuffled per epoch by adding the epoch count to the seed."""
columns: SFTColumnsConfig = SFTColumnsConfig()
"""Columns that carry per-sample renderer arguments."""
# Configuring
loss_mask: LossMaskConfig = LossMaskConfig()
"""Which message types contribute to the loss."""
+49 -53
View File
@@ -10,7 +10,7 @@ import torch
from datasets import Dataset, interleave_datasets, load_dataset
from huggingface_hub import snapshot_download
from jaxtyping import Bool, Int
from renderers import AutoRendererConfig, RendererConfig
from renderers import AutoRendererConfig, RendererConfig, merge_chat_template_kwargs
from renderers.base import MultiModalData, PlaceholderRange, Renderer, build_training_sample, create_renderer
from torch import Tensor
from torch.distributed.checkpoint.stateful import Stateful
@@ -18,7 +18,7 @@ from torch.utils.data import IterableDataset, get_worker_info
from torchdata.stateful_dataloader import StatefulDataLoader
from transformers.tokenization_utils import PreTrainedTokenizer
from prime_rl.configs.sft import DataConfig, LossMaskConfig, SFTDataConfig
from prime_rl.configs.sft import DataConfig, LossMaskConfig, SFTColumnsConfig, SFTDataConfig
from prime_rl.trainer.world import get_world
from prime_rl.utils.chat_template import deserialize_tool_calls, normalize_messages
from prime_rl.utils.logger import get_logger
@@ -209,37 +209,41 @@ def _truncate_mm_data(mm: MultiModalData, cut: int) -> MultiModalData:
return MultiModalData(mm_hashes=new_hashes, mm_placeholders=new_placeholders, mm_items=new_items)
def with_reasoning_effort(config: RendererConfig, reasoning_effort: Any) -> RendererConfig:
"""Copy ``config`` with its ``reasoning_effort`` field set, validated by the config class."""
if isinstance(config, AutoRendererConfig):
raise ValueError(
"A reasoning_effort column requires a typed renderer config (e.g. [renderer] name = 'qwen3.8'), "
"not renderer.name = 'auto'"
)
if "reasoning_effort" not in type(config).model_fields:
raise ValueError(f"Renderer {config.name!r} has no reasoning_effort field, but a row sets {reasoning_effort!r}")
return type(config).model_validate({**config.model_dump(), "reasoning_effort": reasoning_effort})
class RendererResolver:
"""Picks the renderer for a dataset row.
A ``reasoning_effort`` column overrides the configured renderer's field of
the same name per row. Renderer configs are frozen, so renderers are cached
``columns`` maps renderer fields to dataset columns; a row's non-null
values override the configured renderer's fields, validated as
chat-template kwargs. Renderer configs are frozen, so renderers are cached
per config and rows that resolve to the same config share one instance.
"""
def __init__(self, tokenizer: PreTrainedTokenizer, config: RendererConfig, processor: Any | None = None):
def __init__(
self,
tokenizer: PreTrainedTokenizer,
config: RendererConfig,
processor: Any | None = None,
columns: dict[str, str] | None = None,
):
self.tokenizer = tokenizer
self.config = config
self.processor = processor
self.columns = SFTColumnsConfig().renderer if columns is None else columns
self.renderers: dict[RendererConfig, Renderer] = {}
def resolve_config(self, example: dict) -> RendererConfig:
kwargs = {field: example[column] for field, column in self.columns.items() if example.get(column) is not None}
if not kwargs:
return self.config
if isinstance(self.config, AutoRendererConfig):
raise ValueError(
f"Per-sample renderer arguments {sorted(kwargs)} require a typed renderer config "
"(e.g. [renderer] name = 'qwen3.8'), not renderer.name = 'auto'"
)
return merge_chat_template_kwargs(self.config, kwargs)
def __call__(self, example: dict) -> Renderer:
config = self.config
reasoning_effort = example.get("reasoning_effort")
if reasoning_effort is not None:
config = with_reasoning_effort(config, reasoning_effort)
config = self.resolve_config(example)
renderer = self.renderers.get(config)
if renderer is None:
renderer = create_renderer(self.tokenizer, config)
@@ -264,12 +268,21 @@ class SFTDataset(StatefulIterableDataset):
max_examples: int | None = None,
max_epochs: int | None = None,
multimodal: bool = False,
columns: SFTColumnsConfig = SFTColumnsConfig(),
):
super().__init__(non_dp_size)
self.logger = get_logger()
self.dataset = dataset
self.num_examples = len(self.dataset)
self.renderers = renderers
self.columns = columns
# Default names are optional: a dataset carries either messages or
# prompt/completion, and tools only for tool use. A name set in the
# config must exist.
for field in ("messages", "prompt", "completion", "tools"):
column = getattr(columns, field)
if column != field and column not in dataset.column_names:
raise ValueError(f"data.columns.{field} is {column!r}, but the dataset has only {dataset.column_names}")
self.shuffle = shuffle
self.seed = seed
self.seq_len = seq_len
@@ -289,16 +302,17 @@ class SFTDataset(StatefulIterableDataset):
# as a whole-chat training sample with an empty prompt. Null-check rather
# than key-check: Arrow schema union adds `messages: null` to
# prompt/completion rows whenever other rows have a `messages` column.
if example.get("messages") is not None:
messages = normalize_messages(example["messages"], default_role="assistant")
elif example.get("prompt") is not None and example.get("completion") is not None:
messages = normalize_messages(example["prompt"], default_role="user") + normalize_messages(
example["completion"], default_role="assistant"
columns = self.columns
if example.get(columns.messages) is not None:
messages = normalize_messages(example[columns.messages], default_role="assistant")
elif example.get(columns.prompt) is not None and example.get(columns.completion) is not None:
messages = normalize_messages(example[columns.prompt], default_role="user") + normalize_messages(
example[columns.completion], default_role="assistant"
)
else:
raise ValueError(
"All examples in the dataset must have either a 'messages' column "
"or both 'prompt' and 'completion' columns for SFT"
f"All examples in the dataset must have either a {columns.messages!r} column "
f"or both {columns.prompt!r} and {columns.completion!r} columns for SFT"
)
# Strip nulls before deserializing so genuine nulls inside tool-call
@@ -308,30 +322,11 @@ class SFTDataset(StatefulIterableDataset):
messages = resolve_messages(example)
# Parse available tools, if present - assumes OAI format. Accepts either
# `tools` or `tool_defs` (the verifiers rollout format), as either a
# JSON-encoded string of a list or a list of dicts; verifiers-shaped
# tools are converted to OAI form for the chat template.
raw_tools = example.get("tools", example.get("tool_defs"))
if not raw_tools:
tools = []
else:
if isinstance(raw_tools, str):
raw_tools = json.loads(raw_tools)
tools = [
t
if isinstance(t, dict) and t.get("type") == "function" and "function" in t
else {
"type": "function",
"function": {
"name": t.get("name"),
"description": t.get("description"),
"parameters": t.get("parameters"),
**({} if t.get("strict") is None else {"strict": t["strict"]}),
},
}
for t in raw_tools
]
# Tool schemas in OpenAI function-calling format, as a list of dicts or a
# JSON-encoded string of one.
tools = example.get(self.columns.tools) or []
if isinstance(tools, str):
tools = json.loads(tools)
def should_mask(message: dict) -> bool:
assert "role" in message, "Message must have a role"
@@ -741,7 +736,7 @@ def setup_dataset(
raise ValueError("SFT data requires a renderer config.")
if raw_dataset is None:
raw_dataset = load_sft_dataset(config)
renderers = RendererResolver(tokenizer, renderer_config, processor=processor)
renderers = RendererResolver(tokenizer, renderer_config, processor=processor, columns=config.columns.renderer)
return SFTDataset(
raw_dataset,
renderers,
@@ -752,6 +747,7 @@ def setup_dataset(
non_dp_size=non_dp_size,
max_epochs=max_epochs,
multimodal=multimodal,
columns=config.columns,
)
else:
raise ValueError(f"Invalid dataset type: {config.type}")
+5
View File
@@ -30,6 +30,7 @@ from prime_rl.trainer.model import (
get_global_moe_stats,
get_load_balance_stats,
is_tt_moe_model,
reshard_module,
setup_processor,
setup_tokenizer,
setup_model,
@@ -494,6 +495,10 @@ def train(config: SFTConfig):
# optimizer step (so eval_on_start evaluates untrained weights)
if run_validation_this_step:
run_validation(progress.step)
# The no-grad validation forward leaves the [lm_head, norm] FSDP2 group unsharded (it
# opts out of reshard_after_forward), so clip_grad_norm_ below would skip its grad-less
# unsharded parameters. Reshard so clipping sees every gradient.
reshard_module(model)
# Compute the global mean loss for logging.
dist.all_reduce(step_loss_sum, op=dist.ReduceOp.SUM, group=dp_cp_group)
+77
View File
@@ -6,6 +6,7 @@ import pytest
import tomli_w
from pydantic import BaseModel, Field, ValidationError
from pydantic_config import ConfigFileError
from renderers import custom_renderer_config
from prime_rl.configs.env_server import EnvServerConfig
from prime_rl.configs.eval import EvalConfig, SFTOnlineEvalConfig
@@ -1037,3 +1038,79 @@ def test_combined_replay_uses_v2_runner(monkeypatch):
assert config.enable_return_sampling_mask is True
assert config.vllm.enable_return_routed_experts is True
assert os.environ["VLLM_USE_V2_MODEL_RUNNER"] == "1"
CUSTOM_RENDERER_SOURCE = """
from typing import Literal
from renderers.configs import BaseRendererConfig
class InstructedRendererConfig(BaseRendererConfig):
name: Literal["instructed"] = "instructed"
_template_fields = frozenset({"instruction"})
instruction: str = "Think step by step."
class InstructedRenderer:
config_class = InstructedRendererConfig
"""
@pytest.fixture
def custom_renderer_import_path(tmp_path):
path = tmp_path / "instructed_renderer.py"
path.write_text(CUSTOM_RENDERER_SOURCE)
return f"{path}:InstructedRenderer"
def test_sft_config_accepts_custom_renderer(tmp_path, custom_renderer_import_path):
config_file = tmp_path / "sft.toml"
config_file.write_text(
tomli_w.dumps(
{
"model": {"name": "PrimeIntellect/Qwen3-0.6B"},
"data": {"name": "willcb/R1-reverse-wikipedia-paragraphs-v1-1000"},
"renderer": {"name": "custom", "import_path": custom_renderer_import_path, "instruction": "Be brief."},
}
)
)
config = cli(SFTConfig, args=["@", str(config_file)])
assert config.renderer.name == "custom"
assert custom_renderer_config(config.renderer).name == "instructed"
assert custom_renderer_config(config.renderer).instruction == "Be brief."
def test_orchestrator_config_accepts_custom_renderer(tmp_path, custom_renderer_import_path):
config_file = tmp_path / "orch.toml"
config_file.write_text(
tomli_w.dumps(
{
"model": {"name": "PrimeIntellect/Qwen3-0.6B-Reverse-Text-SFT"},
"renderer": {"name": "custom", "import_path": custom_renderer_import_path},
}
)
)
config = cli(OrchestratorConfig, args=["@", str(config_file)])
assert config.renderer.name == "custom"
assert custom_renderer_config(config.renderer).instruction == "Think step by step."
def test_custom_renderer_rejects_unknown_fields(tmp_path, custom_renderer_import_path):
config_file = tmp_path / "sft.toml"
config_file.write_text(
tomli_w.dumps(
{
"model": {"name": "PrimeIntellect/Qwen3-0.6B"},
"renderer": {"name": "custom", "import_path": custom_renderer_import_path, "depth": 3},
}
)
)
with pytest.raises(ConfigFileError, match="depth"):
cli(SFTConfig, args=["@", str(config_file)])
+109
View File
@@ -1,3 +1,4 @@
import json
from collections import Counter
import pytest
@@ -485,3 +486,111 @@ def test_cat_dataset_packs_text_and_multimodal_samples_together():
assert text_pack["seq_lens"] == [5]
assert text_pack["mm_kwargs"] is None
assert text_pack["mm_token_type_ids"] is None
CUSTOM_RENDERER_SOURCE = """
from typing import Literal
from renderers.base import RenderedTokens
from renderers.configs import BaseRendererConfig
class EffortRendererConfig(BaseRendererConfig):
name: Literal["effort"] = "effort"
_template_fields = frozenset({"reasoning_effort"})
reasoning_effort: Literal["low", "high"] = "low"
class EffortRenderer:
config_class = EffortRendererConfig
def __init__(self, tokenizer, config):
self.config = config
def render(self, messages, **kwargs):
return RenderedTokens(token_ids=[0, 1], message_indices=[-1, 0], sampled_mask=[False, True])
def get_stop_token_ids(self):
return [1]
"""
@pytest.fixture
def custom_renderer_config(tmp_path):
from renderers import CustomRendererConfig
path = tmp_path / "effort_renderer.py"
path.write_text(CUSTOM_RENDERER_SOURCE)
return CustomRendererConfig(import_path=f"{path}:EffortRenderer")
def test_renderer_resolver_applies_renderer_columns_to_custom_renderer(custom_renderer_config):
resolver = sft_data.RendererResolver(tokenizer=None, config=custom_renderer_config)
default = resolver({"messages": [], "reasoning_effort": None})
high = resolver({"messages": [], "reasoning_effort": "high"})
assert default.config.reasoning_effort == "low"
assert high.config.reasoning_effort == "high"
assert resolver({"messages": [], "reasoning_effort": "high"}) is high
with pytest.raises(ValueError):
resolver({"messages": [], "reasoning_effort": "medium"})
def test_renderer_resolver_reads_mapped_columns(custom_renderer_config):
resolver = sft_data.RendererResolver(
tokenizer=None, config=custom_renderer_config, columns={"reasoning_effort": "effort"}
)
assert resolver({"effort": "high", "reasoning_effort": "low"}).config.reasoning_effort == "high"
assert resolver({"reasoning_effort": "high"}).config.reasoning_effort == "low"
def test_renderer_resolver_rejects_renderer_columns_without_the_field():
from renderers import PrimeQwen3RendererConfig
resolver = sft_data.RendererResolver(tokenizer=None, config=PrimeQwen3RendererConfig())
with pytest.raises(ValueError, match="reasoning_effort"):
resolver({"messages": [], "reasoning_effort": "high"})
def test_sft_dataset_reads_mapped_message_columns(dummy_renderer):
from prime_rl.configs.sft import SFTColumnsConfig
dataset = Dataset.from_list([{"conversation": [{"role": "assistant", "content": "a0"}]}])
sample = next(
iter(SFTDataset(dataset, lambda _: dummy_renderer, columns=SFTColumnsConfig(messages="conversation")))
)
assert sample["input_ids"] == [_BOS_TOKEN_ID, *_sample_token_ids("a0")]
assert sample["target_ids"] == [*_sample_token_ids("a0"), _STOP_TOKEN_ID]
with pytest.raises(ValueError, match="'messages' column"):
next(iter(SFTDataset(dataset, lambda _: dummy_renderer)))
with pytest.raises(ValueError, match="data.columns.prompt"):
SFTDataset(dataset, lambda _: dummy_renderer, columns=SFTColumnsConfig(prompt="question"))
def test_sft_dataset_passes_tools_through_from_the_mapped_column(dummy_renderer):
from prime_rl.configs.sft import SFTColumnsConfig
tools = [{"type": "function", "function": {"name": "lookup", "parameters": {"type": "object"}}}]
dataset = Dataset.from_list(
[{"messages": [{"role": "assistant", "content": "a0"}], "schemas": json.dumps(tools), "tools": []}]
)
seen: list = []
class RecordingRenderer:
def render(self, messages, tools=None, **kwargs):
seen.append(tools)
return dummy_renderer.render(messages)
def get_stop_token_ids(self):
return dummy_renderer.get_stop_token_ids()
next(iter(SFTDataset(dataset, lambda _: RecordingRenderer())))
next(iter(SFTDataset(dataset, lambda _: RecordingRenderer(), columns=SFTColumnsConfig(tools="schemas"))))
assert seen == [[], tools]
Generated
+74 -74
View File
@@ -17,26 +17,26 @@ exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for
exclude-newer-span = "P7D"
[options.exclude-newer-package]
deep-ep = false
deep-gemm = false
verifiers = false
prime-pydantic-config = false
harbor = "2026-08-11T00:00:00Z"
prime-traces = false
vllm-router = false
dion = false
fastokens = false
flash-attn-3 = false
harbor = "2026-08-11T00:00:00Z"
nixl-cu13 = false
prime = false
prime-evals = false
prime-kernels = false
prime-pydantic-config = false
prime-runs = false
prime-sandboxes = false
prime-traces = false
flash-attn-3 = false
prime-tunnel = false
renderers = false
tokenspeed-mla = false
deep-gemm = false
prime-evals = false
torchao = false
verifiers = false
vllm-router = false
tokenspeed-mla = false
nixl-cu13 = false
deep-ep = false
prime-sandboxes = false
renderers = false
prime-kernels = false
prime = false
[manifest]
members = [
@@ -68,6 +68,7 @@ members = [
"graphwalks",
"gsm8k",
"hle",
"hle-diamond",
"humaneval",
"i3-code",
"i3-logic",
@@ -107,16 +108,17 @@ members = [
"patterned-needle-in-haystack",
"pi-deepswe",
"pi-officeqa-pro-v2",
"pi-programbench",
"pi-terminal-bench-2",
"pinchbench",
"prime-rl",
"programbench-env",
"prolog",
"proofnet",
"proposer-solver",
"proverbench",
"putnambench",
"r2e-gym",
"recursive-task-synthesis",
"redsearcher",
"reverse-text",
"s1-deepresearch",
@@ -2264,6 +2266,25 @@ requires-dist = [
{ name = "verifiers", specifier = ">=0.3.1" },
]
[[package]]
name = "hle-diamond"
version = "0.1.0"
source = { editable = "deps/prime-envs/environments/knowledge/hle_diamond" }
dependencies = [
{ name = "datasets" },
{ name = "httpx" },
{ name = "pillow" },
{ name = "verifiers" },
]
[package.metadata]
requires-dist = [
{ name = "datasets", specifier = ">=4" },
{ name = "httpx", specifier = ">=0.28" },
{ name = "pillow", specifier = ">=12.3.0" },
{ name = "verifiers", specifier = ">=0.3.2.dev160" },
]
[[package]]
name = "hpack"
version = "4.2.0"
@@ -2878,15 +2899,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", size = 18437, upload-time = "2025-09-08T01:34:57.871Z" },
]
[[package]]
name = "junitparser"
version = "5.0.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/12/ed/063362ed6c5e39273879ba3db91da13b00551c6277de6842e45ab55a1a22/junitparser-5.0.1.tar.gz", hash = "sha256:45d100ca35ce5e2596c1f251de5e0f9411827aa93edaba7ad2d8eef423eecdd0", size = 12051, upload-time = "2026-06-05T03:55:55.888Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/e5/32/15c6dd4267d530c38ca8b661c8322d201a6766087efd81ef81d3456e3cad/junitparser-5.0.1-py3-none-any.whl", hash = "sha256:019410471ac82c6b49c3cd500b930b3f39a5dae34e5ca5d5f719c4dcd9bb7e9a", size = 15014, upload-time = "2026-06-05T03:55:54.478Z" },
]
[[package]]
name = "jupyter-client"
version = "8.8.0"
@@ -4674,6 +4686,17 @@ requires-dist = [
{ name = "verifiers", specifier = ">=0.3.1" },
]
[[package]]
name = "pi-programbench"
version = "0.1.0"
source = { editable = "deps/prime-envs/environments/code/pi_programbench" }
dependencies = [
{ name = "verifiers", extra = ["harbor"] },
]
[package.metadata]
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.3.2.dev165" }]
[[package]]
name = "pi-terminal-bench-2"
version = "0.1.0"
@@ -4687,17 +4710,15 @@ requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.3.1
[[package]]
name = "pillow"
version = "12.2.0"
version = "12.3.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/8c/21/c2bcdd5906101a30244eaffc1b6e6ce71a31bd0742a01eb89e660ebfac2d/pillow-12.2.0.tar.gz", hash = "sha256:a830b1a40919539d07806aa58e1b114df53ddd43213d9c8b75847eee6c0182b5", size = 46987819, upload-time = "2026-04-01T14:46:17.687Z" }
sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035, upload-time = "2026-07-01T11:56:38.965Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/d8/95/0a351b9289c2b5cbde0bacd4a83ebc44023e835490a727b2a3bd60ddc0f4/pillow-12.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3f40b3c5a968281fd507d519e444c35f0ff171237f4fdde090dd60699458421", size = 4695490, upload-time = "2026-04-01T14:43:15.584Z" },
{ url = "https://files.pythonhosted.org/packages/de/af/4e8e6869cbed569d43c416fad3dc4ecb944cb5d9492defaed89ddd6fe871/pillow-12.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:03e7e372d5240cc23e9f07deca4d775c0817bffc641b01e9c3af208dbd300987", size = 6284462, upload-time = "2026-04-01T14:43:18.268Z" },
{ url = "https://files.pythonhosted.org/packages/e9/9e/c05e19657fd57841e476be1ab46c4d501bffbadbafdc31a6d665f8b737b6/pillow-12.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b86024e52a1b269467a802258c25521e6d742349d760728092e1bc2d135b4d76", size = 8094744, upload-time = "2026-04-01T14:43:20.716Z" },
{ url = "https://files.pythonhosted.org/packages/2b/54/1789c455ed10176066b6e7e6da1b01e50e36f94ba584dc68d9eebfe9156d/pillow-12.2.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7371b48c4fa448d20d2714c9a1f775a81155050d383333e0a6c15b1123dda005", size = 6398371, upload-time = "2026-04-01T14:43:23.443Z" },
{ url = "https://files.pythonhosted.org/packages/43/e3/fdc657359e919462369869f1c9f0e973f353f9a9ee295a39b1fea8ee1a77/pillow-12.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62f5409336adb0663b7caa0da5c7d9e7bdbaae9ce761d34669420c2a801b2780", size = 7087215, upload-time = "2026-04-01T14:43:26.758Z" },
{ url = "https://files.pythonhosted.org/packages/8b/f8/2f6825e441d5b1959d2ca5adec984210f1ec086435b0ed5f52c19b3b8a6e/pillow-12.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:01afa7cf67f74f09523699b4e88c73fb55c13346d212a59a2db1f86b0a63e8c5", size = 6509783, upload-time = "2026-04-01T14:43:29.56Z" },
{ url = "https://files.pythonhosted.org/packages/67/f9/029a27095ad20f854f9dba026b3ea6428548316e057e6fc3545409e86651/pillow-12.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc3d34d4a8fbec3e88a79b92e5465e0f9b842b628675850d860b8bd300b159f5", size = 7212112, upload-time = "2026-04-01T14:43:32.091Z" },
{ url = "https://files.pythonhosted.org/packages/d8/66/9a386a92561f402389a4fc70c18838bf6d35eb5eb5c6850b4b2dc64f5048/pillow-12.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffd0c5368496f41b0944be820fcb7a838aa6e623d250b01acf2643939c3f99d7", size = 4780323, upload-time = "2026-07-01T11:54:09.351Z" },
{ url = "https://files.pythonhosted.org/packages/25/27/ac8f99618ffd3dde21db0f4d4b1d2ab00c0880595bfd17df103f7f39fd0c/pillow-12.3.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d9c7f76c0673154f044e9d78c8655fb4213f6ca31a836df48b40fe5d187717b9", size = 6266838, upload-time = "2026-07-01T11:54:11.71Z" },
{ url = "https://files.pythonhosted.org/packages/84/21/a35af28dcc61f37ed850a2d64c65c701321dfbf25085e469d5559360cbbf/pillow-12.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91", size = 6940830, upload-time = "2026-07-01T11:54:13.732Z" },
{ url = "https://files.pythonhosted.org/packages/eb/51/8b08617af3ad95e33ce6d7dd2c99ed6c8298f7fb131636303956be022e25/pillow-12.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e491916b378fba47242221bb9ead245211b70d504f495d105d17b14a24b4907c", size = 6344383, upload-time = "2026-07-01T11:54:15.756Z" },
{ url = "https://files.pythonhosted.org/packages/1d/72/cf78ac9780bb93c28328f408973845a309d4d145041665f734572ced1b52/pillow-12.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0dd2064cbc55aaec028ef5fbb60fa47bb6c3e7918e07ff17935284b227a9d2df", size = 7052934, upload-time = "2026-07-01T11:54:17.721Z" },
]
[[package]]
@@ -5236,44 +5257,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/d0/7f/6ea38563db9414ed208758de6e8dc557b20e245787e42568f89531fc6717/prime_tunnel-0.1.11-py3-none-any.whl", hash = "sha256:19c5e02e389e5e61fff1507f07c46db9b05ad01424ff3b6a0cbe66187c957f61", size = 16676, upload-time = "2026-09-04T17:09:24.157Z" },
]
[[package]]
name = "programbench"
version = "1.2.3"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
{ name = "jinja2" },
{ name = "junitparser" },
{ name = "pydantic" },
{ name = "pyyaml" },
{ name = "rich" },
{ name = "tqdm" },
{ name = "typer" },
]
sdist = { url = "https://files.pythonhosted.org/packages/81/bd/6b9c812af45f35b1389110dcd9a10275281d9e31783a5b8e092e5e157558/programbench-1.2.3.tar.gz", hash = "sha256:adfd70c9bb2f840fb8e917bbf6694eaa0c9056b7ded9c4705289533c92a4c44a", size = 3291509, upload-time = "2026-06-29T15:25:39.889Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b5/6f/43682764ca319706a599de89a0675cbe499a4fb351dc9a7b143a7a447803/programbench-1.2.3-py3-none-any.whl", hash = "sha256:214b1e16a5f62b3b0fb45d0b4beb6f5eb5958705ca9200b135c3fa0fc20d8ecd", size = 3446421, upload-time = "2026-06-29T15:25:38.297Z" },
]
[[package]]
name = "programbench-env"
version = "0.2.0"
source = { editable = "deps/prime-envs/environments/code/programbench_env" }
dependencies = [
{ name = "huggingface-hub", version = "1.16.1", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform != 'linux'" },
{ name = "huggingface-hub", version = "1.32.0", source = { registry = "https://pypi.org/simple" }, marker = "sys_platform == 'linux'" },
{ name = "programbench" },
{ name = "verifiers" },
]
[package.metadata]
requires-dist = [
{ name = "huggingface-hub", specifier = ">=0.20" },
{ name = "programbench", specifier = ">=1.0.2" },
{ name = "verifiers", specifier = ">=0.3.1" },
]
[[package]]
name = "prolog"
version = "0.5.1"
@@ -5979,6 +5962,23 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/13/60/164246615e8b059f6d53d34648a0784260421ec98a07eb1e45160f063221/realtime-2.31.0-py3-none-any.whl", hash = "sha256:f6e494b53d6a6e80b6efcee6711c8dd40413a52e766271de1bce8ced6c36cc1d", size = 22374, upload-time = "2026-06-04T13:37:21.162Z" },
]
[[package]]
name = "recursive-task-synthesis"
version = "0.1.2"
source = { editable = "deps/prime-envs/environments/terminal/recursive_task_synthesis" }
dependencies = [
{ name = "httpx" },
{ name = "pyarrow" },
{ name = "verifiers", extra = ["harbor"] },
]
[package.metadata]
requires-dist = [
{ name = "httpx", specifier = ">=0.27" },
{ name = "pyarrow", specifier = ">=17" },
{ name = "verifiers", extras = ["harbor"], specifier = ">=0.3.1" },
]
[[package]]
name = "redsearcher"
version = "0.1.0"
@@ -6755,14 +6755,14 @@ requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.3.1
[[package]]
name = "swebench-pro"
version = "0.2.1"
version = "0.2.2"
source = { editable = "deps/prime-envs/environments/swe/swebench_pro" }
dependencies = [
{ name = "verifiers", extra = ["harbor"] },
]
[package.metadata]
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.3.2.dev137" }]
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.3.2.dev139" }]
[[package]]
name = "swebench-verified"