vLLM Integrates Ray RDT for Trillion-Parameter Sharded Weight Transfer: Overlapping Preprocessing and Communication to Accelerate Online RL
vLLM introduces a native sharded weight-transfer engine leveraging Ray Direct Transport (RDT) to address synchronization bottlenecks in online Reinforcement Learning for large-scale models. Supporting dense, MoE, and quantized architectures, the solution simplifies framework integration via a unified API and overlaps data gathering, transport, and post-processing steps, significantly reducing memory consumption and accelerating training for trillion-parameter models like Kimi K2.
Related Entities
Full Report
Contents6 sections
Introduction
In online RL setups, model weights must be synced periodically to ensure that rollouts are generated from a recent weight version. As open source models continue to scale to trillion+ parameter counts, efficient weight transfer becomes important to bound memory consumption and transfer time.
In this blog, we detail a sharded weight transfer implementation in vLLM leveraging Ray Direct Transport (RDT). Our contributions are as follows:
- A native sharded weight-transfer engine in vLLM that works across a range of models — dense, MoE with fused or per-expert checkpoints, and quantized, utilizing the native RL APIs in vLLM.
- A simple API for RL frameworks to adopt, in which a framework can simply describe how its weights are laid out and the engine owns the entire transport.
- An optimized implementation that overlaps preprocessing with transport, so that the gather, the transfer, and the post-processing overlap with each other.
- A fault-tolerant rollout demonstration that illustrates the fault tolerance properties of RDT with NIXL.
We are able to achieve sharded weight transfer for the Kimi K2 model in BF16 in 7.53 seconds on 48 8xH100 nodes (32 nodes for the trainer, 16 for inference). The implementation is available in vLLM with an end-to-end example in SkyRL.

Overview: Broadcast-based weight transfer vs sharded weight transfer with RDT(NIXL backend). With NCCL, trainer rank 0 forms a collective communication group with all the inference ranks and transfers full weights via broadcast. With the sharded weight transfer engine, we utilize all trainer ranks in the transfer and further only send the shard that is needed. The transfer is further optimized to avoid gathering weights across PP ranks, and skips gathering expert layers.
Background
The standard weight sync is a NCCL broadcast. The trainer all-gathers each parameter into the HuggingFace format and broadcasts it to every inference worker. For models at modest scale this is fine, but as models grow it has the following drawbacks:
- Every worker receives the whole model: Under TP8 a worker keeps ⅛ of each weight and discards the rest. This is worse for large MoE models like Kimi K2 (often deployed under wide-expert parallelism) where the full parameters per layer can still be quite large (10s of GBs), hurting peak memory as well as transfer speeds.
- A broadcast is a collective: NCCL requires synchronous participation from all ranks, which can be problematic in dynamic scenarios. At large scale, you can have straggler ranks that can stall the collective, or even replica failures.
While there’s previous work in large-scale sharded weight transfer (1, 2), our primary focus is generality on two axes:
- Across models and layouts, being compatible with almost any model supported by vLLM.
- Across RL frameworks, allowing other RL frameworks to adopt the optimized weight transfer implementation.
Weight loading in vLLM
The journey of a weight
When a new weight tensor in HuggingFace format arrives at a vLLM worker, it must undergo the following operations:
- Fuse: weight partitions are fused, for example Q, K and V tensors in the attention layer
- Relayout: Weights can be transposed or reshaped depending on the format of the original weights
- Split/select: The fused tensor can be chunked or a subset of parameters can be selected (e.g., expert parallelism)
- Shard: The weight can be sliced for tensor parallelism
- Copy Into Buffer: The weights are copied back into a buffer allocated per layer (“layerwise buffer”). These layerwise buffers are staging buffers allocated by vLLM during weight loading.
- Process: Weights are optionally quantized, with some kernel-specific operations like padding, striding, etc.
- Copy: The final processed weights are copied into already allocated GPU memory
Operations 1-5 happen in vLLM’s weight loader, via layerwise reloading. Layerwise reloading helps ensure that weight updates preserve CUDA graphs while keeping memory usage bounded.
Overview of operations in layerwise reloading (Source)
Ideally, during weight transfer, we transmit the final processed weights (after step 6.) from the trainer and write directly into the storage of the live weights. However, in order to support a wide range of post-processing operations in step 6, we focus on weight transfer of sharded but unprocessed weights in BF16 format (i.e., after step 4.) and let the engine handle the rest. This allows us to also support different quantization schemes with vLLM.
Custom weight loading behaviors
Moving steps 1-4 to the trainer means the trainer has to know, for every worker and every weight, which bytes that worker will end up keeping.
The obvious way to get that is to compute it: read the parallel configuration, work out which band of which tensor belongs to which rank, and send accordingly. However, the exact operations to be performed can vary depending on the layer as well as the model. Two examples are:
- QKV fusion under grouped-query attention: Three tensors (
q_proj,k_proj,v_proj) are fused into one tensor. Under GQA, there can be fewer KV heads than TP ranks - so two workers can pull different Q tensors but identical K and V tensors. This is different from standard MHA models where the TP sharding is consistent for Q, K and V tensors. - Llama-4's fused expert: In Llama-4, the expert tensor in HuggingFace format is transposed, split into
gate_projandup_proj, from which the vLLM worker’s experts are selected.
These two illustrate the diverse set of operations that a weight loader can have. With the various architectures that vLLM supports, implementing steps 1-4 on the trainer would involve bespoke operations per model and layer. The only way to avoid this is by recording the exact set of operations in steps 1-4 for the given configuration at runtime.
Solution: a “recording tensor” dry run
To support custom weight loading behaviors as above, our solution is as follows: at engine initialization, we hand vLLM's loaders a “recording tensor” - a tensor subclass that reports the correct shape and dtype but owns no data. Every transformation - view, narrow, transpose, reshape, etc - gets appended to a chain of operations. When the loader copies into a parameter, we record what it copied from and where it landed. We utilize this sequence of operations (a “sharding plan”) during weight sync to transform full tensors on the trainer to sharded tensors required by the vLLM worker.
Because the plan comes from vLLM's own loaders, it is correct by construction for whatever those loaders do across different layers and models.
Thus, we perform steps 1-4 on the trainer, and transfer sharded weights in BF16 format to each vLLM rank. After receiving the sharded weights, we perform the remaining steps 5-7 to update the live weights on each rank.