Bump prime-rl to trinity-dsv41: upstream main, PR #4057 (DeepSeek V4.1 Flash) with the engram port onto the shared n-gram module, and renderers tracking its trinity-dsv41 branch (v0.2.0 + the Hermes parser). Port the envs to the current verifiers v1 API, rl.toml to the new config schema (IPO loss kept as the new default), and bootstrap/launch/prepare scripts to the new layout. Decensor now runs DecensorEnv: the simulated user writes reviewed follow-ups up to each row's target_turns and every assistant turn is judged. Earlier runs trained on the first turn only. tests/test_multiturn_env.py drives the full loop against a mock endpoint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
"""nemotron-guard-v1: the shared nemotron anti-hacking guardrail as v1 helpers.
|
|
|
|
The reusable component behind the four `nemotron-*` category envs. Given a `vf.Trace` it
|
|
computes the v0 `anti_hacking_multiplier` (hard-zero gates plus judge/meta soft penalties)
|
|
and folds it into a task reward as `final = anti_hacking_multiplier * task_reward`.
|
|
|
|
It also carries `mixing`, the per-subtask blend control the four category tasksets share.
|
|
"""
|
|
|
|
from nemotron_guard_v1.guard import (
|
|
AntiHackingConfig,
|
|
GuardedTask,
|
|
anti_hacking_multiplier,
|
|
apply_guard,
|
|
)
|
|
from nemotron_guard_v1.mixing import SubtaskMix, apply_mix, distinct_task_ids, mix_summary
|
|
from nemotron_guard_v1.judges import (
|
|
CoherencyJudge,
|
|
GuardJudgeConfig,
|
|
MetaCommentaryJudge,
|
|
ReasoningCoherencyJudge,
|
|
ReasoningEthicsJudge,
|
|
ScoreTagJudge,
|
|
SDKRetryJudge,
|
|
)
|
|
|
|
__all__ = [
|
|
"AntiHackingConfig",
|
|
"GuardedTask",
|
|
"GuardJudgeConfig",
|
|
"anti_hacking_multiplier",
|
|
"apply_guard",
|
|
"CoherencyJudge",
|
|
"ReasoningEthicsJudge",
|
|
"ReasoningCoherencyJudge",
|
|
"MetaCommentaryJudge",
|
|
"ScoreTagJudge",
|
|
"SDKRetryJudge",
|
|
"SubtaskMix",
|
|
"apply_mix",
|
|
"distinct_task_ids",
|
|
"mix_summary",
|
|
]
|