Files
trinity-rl/envs/decensor/README.md
T
carsten 84d7fe4166 Trinity-Mini RL: envs, production recipe, and run scripts
Migrated from the rl-toolkit snapshot deployed for the 2026-09-15 production
run (toolkit e191cf1 plus uncommitted changes). PRIME-RL is now a submodule on
dphn/prime-rl@trinity; the v0 envs, parity tests, OPD experiment, and old
configs are not carried over.
2026-10-14 12:39:23 +00:00

2.4 KiB

decensor_v1

The agentic-review Decensor environment for the modern verifiers v1 API. It is a multi-turn rollout with a simulated Gemma user, structured per-turn Gemma reviews, and a multiplicative refusal/quality/length reward.

What it does

  • Loads NewEden/RL-seed-Decensor-Difficulty, selecting one of easy, medium, or hard and stratifying examples by harm type. System prompts come from the V2 Markdown, plaintext, and style datasets.
  • Samples one to six model turns with a geometric decay, then uses a validated follow-up simulator. Follow-up generation has three attempts, deterministic per-task seeds, and a structured semantic review before a message is accepted.
  • Reviews every assistant turn with structured tool calls. Reviews include visible-answer clarity, reasoning-trace clarity, safety/policy discussion, refusal severity, markdown, and meta-commentary signals. Service failures are recorded as unscored rollouts.
  • Logs the transcript, review attempts, aggregation, response-validation reason, and every numeric reward factor in trace.info and trace metrics.

Configuration defaults

DecensorTasksetConfig defaults to 2,000 examples, seed 42, easy difficulty, six maximum turns, 25% style prompts, 50% Markdown prompts, and enabled length prompts. The task config uses the shared Gemma endpoint (google/gemma-4-26B-A4B-it) for both the simulated user and judge. Judges use temperature 0, min_p=0.05, thinking disabled, 1,024 output tokens, and a 24-request concurrency cap; the user uses temperature 1, min_p=0, 256 output tokens, and the same cap.

The working Trinity configuration is configs/rl.toml. It keeps the taskset ID decensor-v1, so replacing an existing installation with this package selects the new implementation without changing the run's environment name.

Install

uv pip install ./envs/decensor

The package exports DecensorTaskset; it also exports the compatibility DecensorEnv when the installed verifiers version does not provide the v1 User API.

Runtime notes

  • The Trinity run uses the null harness. DecensorUser keeps its own transcript because the interception layer passes only the latest assistant message to the user callback.
  • Set VLLM_API_KEY in the environment of each env-server process. Dataset and prompt sources are fetched from Hugging Face at runtime; no data is vendored here.
  • Run pytest envs/decensor/tests before launching a run.