TL;DR
This guide develops Serving and Inference for RL: KV Caches, Prefix Reuse, and Why Rollouts Are Slow from its central engineering problem to practical design choices and limitations. It synthesizes the roadmap topics without claiming new experimental results. Reported findings belong to the cited sources.
Target searches: “vLLM RL rollouts”, “inference optimization RL training”
Why This Topic Matters
Modern LLM and agent training turns familiar reinforcement-learning ideas into systems problems: actions may be tool calls, rewards may come from fallible graders, and trajectories may span many partially observed steps. The classical foundation is distributed RL; this article focuses on what changes in the newer setting.
The Core Ideas
1. Rollout generation as an inference problem with unusual properties — same prompt sampled G times (huge prefix-reuse opportunity), highly variable output length, throughput matters far more than latency
2. Prefix caching across a group: the free win most people leave on the table
3. Continuous batching and why it changes rollout scheduling
4. Speculative decoding in rollouts — helps or hurts?
5. Quantized rollouts with full-precision training: does the mismatch break anything?
6. Connection to your recommender inference-optimization post — same techniques, different setting
Practical Checklist
- Define the state, action, termination condition, and reward before choosing an optimizer.
- Log raw trajectories and every reward component, not only the aggregate score.
- Separate training measurements from held-out evaluation and adversarial tests.
- Treat generated code, tool calls, and environment actions as untrusted.
- Record model, framework, benchmark, and grader versions so comparisons remain reproducible.
Limitations
This area changes quickly. Framework support and benchmark leaderboards are time-sensitive, while many recent methods are preprints rather than settled practice. The article describes mechanisms and reported evidence; it does not present an original training run.
Key Learnings
- Rollout generation as an inference problem with unusual properties — same prompt sampled G times (huge prefix-reuse opportunity), highly variable output length, throughput matters far more than latency
- Prefix caching across a group: the free win most people leave on the table
- Continuous batching and why it changes rollout scheduling