Part IV / One Machine
RL is an inference workload
The learning loop manufactures experience by serving a policy, often many times per task. At scale, algorithm and inference architecture constrain each other.
Model forward passes, KV state, batching, versions, and evaluation.
Rollout freshness and diversity versus production SLOs.
Learned speculators and automated serving optimization.
The laboratory rents the factory
A car company tests new designs by building and driving prototypes. The research lab depends on manufacturing capacity; a cheaper prototype cycle enables more experiments. RL is similar. The optimizer may run for minutes, while generating long multi-sample trajectories and grading them requires hours of model execution.
Rollout inference converts accelerator time into experience. Measure its yield in valid, informative, sufficiently fresh trajectories per wall-clock and dollar.
For one prompt, GRPO may sample eight responses. Each response can call tools and add several model turns. A judge model may read every trace. Candidate evaluation repeats the workload across multiple seeds. The number of forward passes grows with samples, horizon, judges, and candidate versions. Accelerating rollout inference can change which RL experiments are affordable.
Price a reasoning update
A run samples 4,000 incident scenarios, eight trajectories each, six model turns per trajectory, and one judge pass. That is 192,000 policy turns plus 32,000 judge evaluations before training and release tests.
Prompt prefixes repeat within a scenario group, so shared prefill and branch-aware KV cache can save work. Tool waits create scheduling gaps, so inference should multiplex other trajectories. Background rollouts can operate at higher concurrency than user-facing production. Long episodes make policy staleness visible in asynchronous systems. The RL data contract becomes an inference scheduling problem.
Faster inference can also alter learning data. A different sampler, numerical format, runtime bug, or speculative implementation can change token trajectories. When exactness is required, verify distributional behavior. When approximate changes are intentional, treat them as a behavior-policy change and record the version.
Share primitives, separate policies
Production and rollout systems can share model packaging, kernels, prefix-cache primitives, quantization formats, observability, and autoscaling infrastructure. They should not automatically share queue discipline, decoding settings, tenant boundaries, or rollout cadence.
| Dimension | Production inference | Rollout inference |
|---|---|---|
| Primary SLO | User-visible TTFT, ITL, reliability | Time to valid fresh experience |
| Sampling | Product-calibrated behavior | Deliberate diversity and exploration |
| Load | Exogenous, bursty demand | Controllable batches and curricula |
| Version | Stable release and canary | Frequent candidate updates |
| Failure | Retry or degrade without harming user | Preserve semantic trajectory and provenance |
Colocation can improve utilization: rollout inference uses GPUs while the trainer is idle, then training reclaims them. It can also cause memory churn and interference. Disaggregation permits independent scaling, but model weight transfer and policy staleness enter the control plane. HybridFlow/verl explicitly targets flexible mapping of RL roles and dataflow onto devices.[source]
Distillation sits on the boundary
Distillation trains a smaller model to match a larger teacher. A speculative drafter is a specialized student whose product objective is accepted target progress per unit time. Training on contexts generated by the current target and workload resembles on-policy distillation: the data distribution follows deployed inference.
A learned speculator therefore has both a model objective and a systems objective. Cross-entropy or diffusion loss measures predictive fit; acceptance length, draft latency, target verification cost, memory, and concurrency determine speed. Online retraining can follow workload drift, but it adds data movement, version compatibility, canaries, and rollback.
Model routing follows the same principle. A small model handles easy tokens or tasks and escalates hard work to a larger model. The router's reward can combine quality, latency, and cost. Inference architecture becomes a learned policy over compute.
Auto-inference makes configuration an action space
Serving systems expose choices: runtime, precision, tensor-parallel degree, batch limits, chunk size, cache policy, speculative method, draft length, and autoscaling thresholds. An automated system can register configurations, run workload sweeps, measure quality and SLO goodput, and allocate more trials to promising regions.
This may be Bayesian optimization, bandits, evolutionary search, or agentic experiment orchestration rather than long-horizon RL. If configurations change future information and capacity, a sequential formulation may be justified. Call it auto-inference as a product capability, then specify the optimization method.
Modal's first-party Auto Endpoints material describes automated serving configuration, and the Gong/Alberti conversation discusses agents running inference experiments.[source][source] Treat product performance as vendor-reported; the general experimental pattern is independently useful.
Shared primitives can reduce duplication, while workload-specific admission, isolation, freshness, and failure policies remain necessary. Convergence is about interfaces and economics, not erasing every boundary.
The feedback loop can become circular
Production traces influence training; training changes output lengths and tool behavior; those changes alter serving load; serving optimizations change rollout cost; the new cost changes which data is collected. A team that evaluates model and serving changes separately can miss the circular effect.
Version the full system and run joint canaries. Compare task quality, trajectory shape, inference metrics, and cost. A policy that solves more incidents but doubles tool turns may still be worthwhile; capacity must be planned. A quantization change that preserves final accuracy but lowers reward variance can change RL dynamics. Review these changes across RL and inference teams because both are modifying one coupled system.
References
- HybridFlow/verl, OpenRLHF, and AReaL support RL systems and asynchronous rollout discussion.
- DFlash supports the learned block-speculator example.
- The Gong/Alberti conversation and Modal Auto Endpoints discuss convergence and automated inference optimization.