Recipes

SAO

Single-Rollout Asynchronous Optimization (arXiv:2607.07508) trains on one scored rollout per prompt. A scored rollout joins the next optimizer step without waiting for other rollouts.

What it trains#

The served model's weights. Each report gives one rollout's receipt and its score:

JSON
{"references": ["<inference receipt>"], "score": 1.0}

The sao algorithm trains a critic (value model) beside the policy. It calibrates the policy gradient with the DIS ratio against the old-policy log-probabilities, which the actor computes with the weights at the start of the job. One job holds job-samples rollouts from as many prompts.

When to use it#

  • Each prompt gets one scored attempt, such as a math problem with a checker.
  • Each rollout should train as soon as it is scored, while the model keeps serving.

For several scored attempts at each question, use SDPO. For many attempts at one problem without a known answer, use TTT-Discover.

Requirements#

  • The Slime GPU environment of Train model weights.
  • Docker: Harbor runs each task's verifier in a container.
  • Two GPUs for the example: the actor and the critic share one, the serving engine uses the other.

Run the example#

Shell
cd recipes/sao/examples/imo_answerbench
uv pip install -e .
hf download Qwen/Qwen2.5-1.5B-Instruct --local-dir ~/models/Qwen2.5-1.5B-Instruct
./run.sh

run.py solves three IMOAnswerBench problems in order, six scored rollouts each. With a batch of one, each rollout makes one job and one snapshot. The first ten steps train only the critic. The service log is work/reef.log. SAO on IMOAnswerBench also has the paper-scale configurations, and SAO on CEO-Bench trains on long conversations.

Configuration#

  • recipe.jobs.job-samples: the rollouts of one job. Set it to Slime's global-batch-size (the paper uses 128, the smoke example 1).
  • recipe.samples.max-artifact-lag: how many artifacts a rollout may lag behind the served one and still train (SAOSettings; 0 by default, 18 in the example).
  • recipe.algorithm: the options of slime/algorithm.py, such as length-adaptive-lambda and lambda-alpha, each the Slime flag sao-<name>.
  • training.options: the objective's Slime flags: use-critic, eps-clip and eps-clip-high (the DIS mask), critic-lr, critic-steps-per-actor and num-critic-only-steps. The recipe refuses an optimization section.
  • training.options model flags, such as padded-vocab-size and add-qkv-bias: match them to the model family.

The settings reference describes the other keys.

Results#

  • IMOAnswerBench comparison: Qwen3-30B-A3B-Thinking-2507, 128 rollouts per step, no tools. SAO trained stably for 99 steps and gained 2 to 4 points on AIME 2025 and IMO-AnswerBench, within the per-checkpoint intervals. A GRPO(+DIS) control fell to 9.6% on AIME 2025 by step 140.
  • CEO-Bench: one rollout of Qwen3.6-27B trained in the run completed the game with $257,682; the untrained rollout went bankrupt on day 255.

Files#

Text
sao/
  __init__.py            exports the recipe and its stages
  recipe.py              SAORecipe: the four classes (the report, the samples, the algorithm, the evaluation) and the jobs class
  samples.py             samples service: SAOSamples (one scored rollout, one sample) and SAOSettings
  jobs.py                samples, the data of a job: SAOJobData (a job holds the samples as they come)
  slime/
    algorithm.py         training service: SaoAlgorithm (the critic beside the actor), SaoSchedule, the --sao-* flags
    rows.py              training service: the row that a sample becomes
    worker.py            GPU workers: the advantages from the critic's values, and the policy loss
  examples/
    imo_answerbench/     three IMOAnswerBench problems as Harbor tasks, and the batch-128 comparison
    ceobench/            CEO-Bench through Reef, trained in the rollout

The tests are in tests/recipes/sao/.