AI Pulse by Inblix

TRL v0.18.0 lets you train and serve LLMs on the same GPUs, cutting idle time

Hugging Face Blog · Jun 3, 2025 · 2 min read · Read original article →

Curated by the Inblix editorial team


Featured image for article: TRL v0.18.0 lets you train and serve LLMs on the same GPUs, cutting idle time

The latest release of Hugging Face’s Transformer Reinforcement Learning (TRL) library, v0.18.0, solves a maddening inefficiency that’s been burning GPU hours and budget. Before this update, using vLLM to speed up generation during GRPO training meant running it as a separate server on its own set of GPUs, communicating via HTTP. The result was a costly game of ping-pong: training GPUs sat idle while waiting for vLLM to generate text, and the inference GPU gathered dust during training steps.

That’s history now. Pull request #3394 introduces a colocation feature that lets developers abandon the separate server model entirely. Instead, vLLM is embedded directly into the same distributed process group as the training loop. Both tasks now share the same devices, taking turns without the overhead of REST API calls or complex inter-process communication setups. The fix works seamlessly with torchrun for multi-node scaling and supports Tensor and Data Parallelism out of the box.

For anyone running online learning algorithms like GRPO—where the model constantly generates its own responses to learn from them—this is a direct line to faster iterations and lower cloud bills. You’re no longer forced to provision extra GPUs just to run inference. The idle time that was previously a structural feature of the architecture is simply gone.

What makes this particularly neat is the implementation’s simplicity. It uses a Single Program, Multiple Data (SPMD) pattern where each GPU runs its own synchronized vLLM engine instance. This avoids the headache of manually setting up distributed process groups between independent server and trainer codebases. It’s a textbook example of how tightening the integration between two critical components—in this case, training and inference—can produce a step-change in efficiency that tuning hyperparameters never could.

💡 Key Takeaways

  1. TRL v0.18.0 eliminates GPU idle time by co-locating vLLM inference directly inside the training process group, rather than running it as a separate server.
  2. The integration skips HTTP communication entirely, avoiding network overhead and the complexity of managing inter-process distributed groups.
  3. This is a major efficiency unlock for online learning algorithms like GRPO, where frequent generation during training previously forced costly hardware provisioning.

Keep reading: See related articles below for more coverage on this topic.

Get smarter about AI

The sharpest AI news, curated daily. Delivered free to your inbox.

Learn more

Glossary terms

← Back to all articles