Rollout
Also called Episode, Trajectory
A rollout is one run of a model through a task in an environment, recorded so that training can learn from it. The model observes the environment, takes an action, and observes the result, again and again until the task ends. The run ends when the task succeeds, fails, or reaches a limit on steps or time. A score from the verifier is then attached to the record.
One pass through a task is called an episode, and the record it leaves is called a trajectory. The trajectory lists every observation and action in order, with each reward where it arrives, often only one at the end. For an agent, each action is usually a tool call, and each observation is what the tool returned. The trajectory is the data that the next update of the model learns from.
Training runs many rollouts of the same task and compares them. A single result says little, because the model chooses its actions at random to some degree. Comparing several attempts shows which choices tended to lead to success. Many methods group rollouts by task for this reason, and update the model from the differences between them.
Rollouts in parallel
Rollouts in parallel are how training gathers enough data in reasonable time. A single rollout of an agent can take minutes, since it runs real commands and waits for their results. Running one at a time would leave the GPUs that train the model idle for most of the day. Training systems therefore run hundreds or thousands of rollouts at once.
Simulated environments, such as games, can run many copies inside one process. An agent that runs code needs its own isolated environment for each rollout, usually a sandbox. Thousands of agent rollouts mean thousands of machines started, used for minutes, and reset or discarded. That turns training into a problem of capacity and placement as much as of learning. The scheduler has to place these machines quickly and evenly across hosts.
Rollouts also vary widely in length. Some finish in seconds, while others run until they hit their time limit. A training step that waits for every rollout in its batch moves only as fast as the slowest one. Systems reduce this cost by setting strict limits, or by starting new rollouts as soon as old ones finish.
Cost of a rollout
The cost of a rollout comes from two places, generating actions and carrying them out. Each action requires the model to produce text, which runs on GPUs through an inference server. Carrying out the action runs in the environment, which usually needs only an ordinary processor. Long tasks repeat both costs at every step, so the number of steps matters as much as the size of the model.
Environment time includes more than running commands. Starting a sandbox, installing dependencies and preparing the task all happen before the first action. Fast resets from a snapshot cut most of that work. Tasks that run test suites or build projects can also need a lot of processor time of their own.
Failed rollouts cost as much as successful ones, but they are not wasted. A comparison needs bad attempts as well as good ones to show what made the difference. Rollouts that fail for reasons outside the model, such as a broken environment, are wasted. They teach the model nothing and can teach it the wrong lesson if they are scored as failures.
| Part | Runs on | What it costs |
|---|---|---|
| Generation | GPUs | Model time for every action, growing with the length of the task. |
| Environment | Processors | A sandbox per rollout, plus the commands and tests the actions run. |
| Setup | Processors, storage | Starting or resetting the environment before the first action. |
| Scoring | Processors | Running the verifier once the rollout ends. |