Skip to main content
StateSet Agents pairs memory-efficient long-context policy optimization across all four flagship RL trainers (GSPOTrainer, DAPOTrainer, GEPOTrainer, and VAPOTrainer) with six deterministic enterprise MCP sandboxes, turn-level credit assignment, adaptive curriculum scheduling, and an online reward-hacking circuit breaker.
This guide reflects the v0.99.1 release candidate for v1.0.0 reviewed on November 24, 2026. The retained 3-seed ablation (benchmark_results/open_weight_rl/ablation_v1_rc.json) verifies the full pipeline on CPU with a tiny transformer; live 8B+ multi-GPU and CUDA Triton kernel measurements remain an explicit pre-graduation gate recorded in contracts/component_maturity_v1.json.

Chunked and Triton-fused LM-head loss

Large-vocabulary open-weight models (for example Qwen3 with vocab_size = 152,064 at 16k sequence length) require roughly 37.1 GB just to materialize full [B, T, V] logits. Enabling chunked_loss_chunk_size projects [B, T, H] hidden states through lm_head in token chunks, auto-dispatching a single-pass Triton online-logsumexp SRAM kernel on CUDA with a bit-exact PyTorch chunked fallback on CPU:
  • 16k Qwen3 projection (B=4, chunk_size=256): 37.123 GB -> 0.145 GB (99.61% peak logit VRAM saved) with 0.0 forward/backward log-prob delta against full logits.
  • MoE and FP8 stability: moe_router_aux_loss penalizes router collapse, while tis_clip_max (Truncated Importance Sampling) and double-sided icepop_bounds stabilize FP8 rollout workers paired with BF16 learners.

Six concurrent verifiable MCP sandboxes

MultiDomainSandboxPool runs mixed multi-turn batches across six zero-dependency enterprise state-machine verifiers with per-domain z-score advantage normalization and automatic turn-level PRM credit assignment: All sandboxes also plug directly into River AI’s native rl.RolloutEngine through river_mcp_sandbox_factory(domain) in stateset_agents.remote.river_environment. See the Controlled Frontier RL Stack for the full closed-universe legal/enterprise stack, dr_cispo objective, and 5-model frontier fine-tuning matrix.

Closed-loop adaptive runtime and Step-0 warm-start

DisaggregatedRLRuntime.run_adaptive_sandbox_loop(...) unifies:
  1. Step-0 PyTorch CAA warm-start: extract_torch_caa_vector and bake_torch_caa_steering apply reversible rank1_weight_bake or bias_shift edits to PyTorch/HF/PEFT causal LMs before RL step 1.
  2. Adaptive difficulty curriculum: AdaptiveDifficultyCurriculum concentrates rollouts in the 20%–80% solve band, promotes failing OTLP production traces into the active replay queue, and synthesizes multi-constraint variants of mastered tasks.
  3. Turn-level credit and reward-hacking defense: compute_turn_level_advantages attributes terminal rewards to exact tool calls, while OnlineRewardHackingGuard flags calibration drift (REWEIGHT_JUDGE), entropy collapse, length explosion (INCREASE_KL), or reward hacking (HALT_AND_ROLLBACK).
  4. vLLM Level-1 sleep/wake weight sync: sync_vllm_sleep_wake sleeps the rollout engine, pushes updated weights, and wakes it without OOM spikes.

Quick offline verification and blueprints

Run the local shootout, inspect a cloud/River blueprint, or execute the end-to-end demo without a GPU or API key:
The retained v0.99.1 ablation (benchmark_results/open_weight_rl/ablation_v1_rc.json) records +1.846 ± 0.0298 mean log-prob margin gain (0.0375 -> 1.8836), 3/3 seeds improved, and 6/6 verifiable sandboxes passing in 114.64 ms on CPU. Continue with the 3D Weight Studio and Live RL Cockpit, River AI 0.11 training and serving, or the CLI reference.
Last modified on November 30, 2026