PipelineRL Migrates vLLM from 0.8.5 to 0.18.1, Fixing Train‑Inference Mismatch
Patch vLLM to 0.18.1, enable processed_logprobs, disable prefix caching and async scheduling, configure weight‑update handling with pause_generation(mode='keep', clear_cache=False), and enable fp32 lm_head to restore training parity.
Patch vLLM to 0.18.1, set logprobs-mode=processed_logprobs, disable prefix caching and async scheduling, configure weight‑update handling with engine.pause_generation(mode='keep', clear_cache=False), and enable fp32 lm_head to match trainer expectations.
Summary
PipelineRL recently migrated its inference engine from vLLM 0.8.5 to the new 0.18.1 release, a change that required extensive backend adjustments to preserve training dynamics. The migration uncovered a train‑inference mismatch caused by four key differences: v1’s default logprobs-mode returned raw logits instead of processed probabilities, the new runtime enabled prefix caching and async scheduling by default, the inflight weight‑update path behaved differently, and the final projection used fp32 logits in v0 but not v1. By setting logprobs-mode=processed_logprobs, disabling prefix caching and async scheduling, aligning the weight‑update sequence with engine.pause_generation(mode="keep", clear_cache=False), and enabling fp32 lm_head, the authors restored parity across clip rate, KL, entropy, and reward curves, bringing the v1 run back in line with the v0 reference. The study also highlighted that similar mismatches can surface in PPO, GRPO, or any online RL system that treats rollout‑side logprobs as part of the optimization target, underscoring the importance of backend correctness before applying objective‑side corrections.
Key changes
- vLLM 0.18.1 defaults to raw logprobs; set logprobs-mode=processed_logprobs to match trainer expectations
- prefix caching is enabled by default in v1; disable it to match v0 behavior
- async scheduling is enabled by default in v1; disable async-scheduling to avoid timing differences
- inflight weight updates now use a different sequence; use engine.pause_generation(mode='keep', clear_cache=False) to emulate v0 weight‑update handling
- fp32 lm_head was not used in v1 by default; enable fp32 lm_head for final projection to match v0 fp32 logits
- runtime defaults for prefix caching and async scheduling must be explicitly set in vllm_config for parity