capstan v0.1.0

Measure, verify, and speed up the rollout step of RL post-training for flow and diffusion models. Capstan plugs into the RL framework you already run, profiles where step time goes, and gates every rollout speedup on rollout-vs-trainer log-prob drift.

uv pip install capstan-rl

First results

Qwen-Image OCR LoRA · MixGRPO · verl-omni 81f3b65 · Modal H100s · paired same-host 5-step runs.

2.83×
faster rollout with batching (295 → 104 s; 1.54× full step), drift unchanged
3.2×
fewer drift failures with enforce_eager=True (6.6% → 2.05% over 1e-4), 0% speed cost
1.19e-7
max per-element batch invariance drift (batch 1 vs 16 on 1x H100, 1 fp32 ULP)
Step time: request mode vs batched step mode (max_num_seqs=16) 4x H100 80 GB HBM3 · same host
Request 533 s 295 s (55%) Batched 345 s (1.54×) 104 s
Rollout Actor update Reward Recompute + LoRA sync

Full tables & root-cause analysis: profile · drift · before/after · consistency.

What exists & what's next

Shipped (v0.1.0)
  • Profiler for verl-omni + vllm-omni (per-phase step time & rollout GPU split, request and step mode)
  • Numerics check: per-element drift, batch invariance, and paired baseline gate (capstan gate)
  • Upstream fix for step-mode double-rounded timesteps (verl-omni#907)
  • Modal runner (bench/modal_app.py) reproducing every number on one host
Planned (not built yet)
  • Other diffusion/flow image and video DiTs
  • FP8 (and experimental FP4) rollout paths gated by the drift check
  • Streaming audio / TTS and state-space models
  • Dedicated rollout kernels, engine, and weight sync
  • Adapters for verl, prime-rl, SkyRL, and TRL

Scope note: Tested only on Qwen-Image OCR LoRA (5 steps, Modal H100s). Not a new RL algorithm, not a framework replacement, and not a text-LLM inference server.