Skip to main content
StateSet Agents ships a controlled closed-universe legal and enterprise RL stack built for apples-to-apples multi-model fine-tuning across open-weight and pre-release hosted models using the same StateSet Sandboxes, binary expert rubric reward, judge, and rank-64 LoRA optimization settings.
This stack (ClientMatterSandbox, HierarchicalRubricReward, dr_cispo, FrontierRLRunner, VLLMLoRASyncClient, trace_sandbox_compiler, TinkerRLRunner, stateset_rl_core v0.2.0, and the frontier-rl, controlled-study, tinker-rl, and compile-sandbox CLI commands) ships in StateSet Agents v1.1.0. Model checkpoint metadata is pinned from live Hugging Face audits, and architecture, kernel, canary, control-plane, and Rust parity verification is captured in benchmark_results/controlled_frontier_rl/README.md; live multi-GPU FSDP+vLLM and hosted Tinker training require provisioned cluster or Tinker credentials.

Environments: Closed-Universe Client Matter Sandboxes

Each ClientMatterTask (stateset_agents.core.client_matter_sandbox) places an agent in a self-contained client matter containing both key controlling documents and peripheral distractor documents. The environment is registered as the 7th domain (client_matter) in both MultiDomainSandboxPool and river_mcp_sandbox_factory. Agents operate inside a confined workspace with six sandbox tools:

Reward: Hierarchical Binary Rubric (Zero Length Penalty)

Deliverables are graded against an expert rubric of strictly binary pass (1) / fail (0) criteria grouped by legal or domain issue (stateset_agents.rewards.rubric_reward):
  • Judges: LLMRubricJudge (temperature 0.0, fail-closed JSON verdict parsing) for live runs and DeterministicRubricJudge for reproducible offline verification.
  • Reward formula: Weighted sum of criteria pass fraction, full issue-group pass fraction, and an all-pass bonus, with explicitly zero length penalty (length_penalty = 0.0, enforced fail-closed by RubricRewardConfig):
Default weights are criteria_weight = 0.50, issue_group_weight = 0.35, all_pass_bonus = 0.15, and length_penalty = 0.0.

Optimization: Rank-64 LoRA + CISPO + Dr. GRPO (dr_cispo)

Every model in a controlled study trains a rank-64 LoRA adapter (lora_alpha = 128) with the dr_cispo objective preset across stateset_agents.training.objectives, chunked_rl_loss, river_rl, and tinker_rl:
  • Dr. GRPO advantage normalization: Unscaled group-mean centering A_i = R_i - mean(R_group) (no standard-deviation division).
  • Dr. GRPO loss normalization: Constant-denominator token-sum normalization (seq_sum_const / normalization="dr_grpo"), dividing by batch_size * max_completion_length to remove response-length bias.
  • CISPO asynchronous importance clipping: Per-token detached clipped importance weights (clip="cispo", cispo_is_cap = 5.0, or Tinker loss_fn="cispo" with clip_low_threshold, clip_high_threshold, and eps_max = 6.0) for asynchronous rollout sampling.
River AI LoRA rank cap: River’s hosted service enforces MAX_LORA_RANK = 32 (stateset_agents.remote.river_batches.MAX_LORA_RANK). Both FrontierRLConfig and validate_study_controls() fail closed if lora_rank > 32 is requested on river. Use distributed_fsdp_vllm for the four open-weight checkpoints and tinker for Inkling 2 Small when training rank-64 LoRA adapters, or cap lora_rank <= 32 when targeting River.

Audited 5-Model Frontier Fine-Tuning Matrix

All five models run rollouts in StateSet Sandboxes under the lab_default harness, with (learning_rate, rollout_group_size) swept on Nemotron 3.5 Super VL and transferred verbatim to the other four models:

CLI Quickstart and Controls Verification

All three frontier RL CLI commands import lazily with zero eager torch startup overhead:

Disaggregated Async RL, Trace-to-Sandbox Compiler & Rust Accelerator

  • Live vLLM LoRA Hot-Swap & Pickle-Free Resume: VLLMLoRASyncClient syncs updated attention-only LoRA adapters into disaggregated vLLM workers between rounds (/v1/load_lora_adapter, /v1/unload_lora_adapter, /health, transient retries, SSRF localhost/HTTPS guard), while create_vllm_rollout_fn(active_model_fn=...) routes rollouts dynamically without restarting the inference server. FrontierRLRunner saves pickle-free safetensors adapter + AdamW resume checkpoints validated by a fail-closed config_sha256 fingerprint, and max_policy_lag_rounds drops stale async rollouts via policy_version.
  • Production Trace-to-Sandbox Compiler: stateset_agents.core.trace_sandbox_compiler turns OpenAI-chat or normalized production logs into deterministic offline replay sandboxes (CompiledTraceSandbox), binary issue-group rubrics, anti-reward-hacking canary reports (golden vs. empty deflection vs. forbidden claim vs. 25x verbose padding with length_penalty == 0.0), and ClientMatterTask JSONL datasets. Exposed with full parity across CLI (compile-sandbox), Weight Studio REST (POST /api/weight-studio/rl/compile-sandbox), stdio/HTTP MCP (studio_compile_sandbox), and @stateset/agents (client.studio.compileSandbox(...)).
  • Native Rust Accelerator (stateset_rl_core v0.2.0): Optional abi3-py310 PyO3 wheel providing Rayon-parallel compute_dr_grpo_advantages (up to 13x faster), batch_score_hierarchical_rubrics (up to 94x faster), batch_compute_gae (up to 20x faster), and compute_dr_cispo_batch_loss with bit-exact NumPy/Python fallback when the wheel is not installed.
For interactive GPU execution on Google AI Ultra (H100 / A100 / L4, with T4/CPU fallback), open notebooks/controlled_frontier_rl_colab.ipynb to run ClientMatterSandbox + .jsonl matter loading, real rank-64 attention LoRA dr_cispo updates via FrontierRLRunner, the Nemotron 3.5 Super VL sweep + Appendix export, and opt-in TinkerRLRunner for Inkling 2 Small. controlled-study --output-dir writes both study_manifest.json and appendix_training_config.md capturing the exact shared environment, reward weights, judge prompt, LoRA rank/targets, swept hyperparameters from Nemotron 3.5 Super VL, and pinned checkpoint revisions. Continue with the Open-Weight RL suite, River AI training, or the StateSet Agents CLI reference.
Last modified on November 30, 2026