Stop Waiting for Weights: Efficient RL Updates with WeightBridge
Table of Contents
A library for efficient weight transfer across diverse LLM reinforcement learning settings
Xuanlin Jiang¹*, Samuel Hsia², Michael Kuchnik², Zachary DeVito², Minlan Yu¹, and Carole-Jean Wu²
¹ Harvard University · ² FAIR at Meta
Work carried out during an internship at Meta.
Open-source code · Paper · PyTorch Conference talk
Diverse RL Configurations Challenge Weight Transfer
RL alternates between rollout workers, which generate trajectories, and trainer workers, which use them to update the policy. Weight transfer sends the updated parameters back to rollouts. A typical system has one training engine and multiple independently running inference engines.
Sparse MoE models increase the parameters transferred relative to computation per token, while GPU compute improves faster than inter-node bandwidth. These two trends substantially increase weight transfer overhead in the RL pipeline and have drawn attention from Perplexity, ByteDance, Anyscale, Miles / LMSYS, Prime Intellect, and Ant Group.
Weight transfer involves three key questions:
- What weights go where? — Layout discovery: identify the elements each trainer holds and each rollout needs.
- How do they move? — Transfer planning: choose routes, RDMA operations, and layout-conversion kernels.
- When are they available? — Synchronization and scheduling: coordinate updates with computation while preserving RL semantics.
Why diversity makes these questions challenging
Supporting these three steps becomes harder as RL configurations diversify. Existing mechanisms are efficient only in subsets of the layout and synchronization space: other configurations expose redundant transfers, sender bottlenecks, or layout-conversion overhead. Details of existing solutions
This diversity creates three challenges.
1. Heterogeneous layouts complicate correspondence. Different models and hardware drive diverse parallelism strategies and model layouts for both trainers and rollouts. Trainers and rollouts usually use mismatched layouts because of their inherently different performance goals and algorithmic flows. For example, as shown in the figure below, the trainer uses larger tensor parallelism (TP) and pipeline parallelism (PP) degrees due to larger memory overhead of gradients and optimizer states. As a result, the weight correspondence between trainer and rollouts becomes highly complicated.
Specialized kernels in training and inference frameworks further increase differences in how they store tensors in the GPU — they may split, transpose or pad the same parameter tensor in entirely different ways. All these mismatches contribute significantly to the complexity of weight correspondence between the trainer and the rollouts.
2. Replication and topology complicate routing. Multiple trainers may hold the same weights, and multiple rollout workers may need them. Full-model broadcasts can deliver unneeded elements, causing redundancy, while independent fetches can overload one sender, causing imbalance. Efficient planning must eliminate redundant traffic and balance aggregate load across replica groups, using fast intra-node NVLink and slower inter-node RDMA appropriately.
3. Different staleness preferences of RL applications complicate worker coordination. Alignment tasks such as chat quality, instruction following, safety, and refusal behavior often have short rollouts that favor synchronous execution. Mathematics and competitive programming produce longer, variable rollouts that make blocking updates more expensive and motivate asynchronous execution. Algorithms also differ in stale-trajectory tolerance. The weight transfer mechanism must coordinate workers carefully to support these different synchronization modes while keeping the APIs simple enough to integrate into different backend engines.
Fast Weight Updates Across Diverse RL Configurations
WeightBridge lets RL framework developers support diverse configurations without giving up efficient weight transfer. The key is to separate what each worker needs from how those weights move and when they are applied: discover the layout correspondence once, optimize the communication globally, and reuse both behind a small interface. You can change model layouts and synchronization policies without rewriting model-specific transfer rules. The following three capabilities make that possible.
1. Support Different Layouts Without Handwritten Mappings
WeightBridge removes the need to hand-code tensor mappings for each model and trainer–rollout backend pair. It derives the correspondence from the backends’ existing weight loaders, so it can adapt to different sharding, fusion, and transpose patterns automatically. Unlike approaches that rely on fixed model-specific rules, the mapping comes from the behavior of your backend engine’s weight loader itself. Knowing exactly how weights correspond between workers avoids transfer redundancy.
The checkpoint provides a common coordinate system: WeightBridge probes each backend’s load_weights, recovers its source map, and matches the maps across workers. Layout discovery details
2. Keep Transfers Efficient as Sharding and Replication Change
WeightBridge avoids a choice between full-model broadcasts that waste bandwidth and independent P2P pulls that overload one trainer as rollout replication grows. Its global plan uses the correspondence across all workers to eliminate redundant data and distribute communication over available links. This makes the transfer efficient across different sharding and replication patterns, rather than tuning one point-to-point path for one layout.
Two principles guide the routing plan:
- Trainers collectively transmit only one copy of the model, avoiding redundant sends and a single-source bottleneck.
- Each rollout node receives exactly one copy of each weight element it needs over RDMA, with additional local replicas distributed over NVLink.
The planner assigns distinct slices to replicated workers, then executes three stages: receive slices from trainers, exchange across rollout nodes over RDMA, and distribute within each node over NVLink. Transfer planning details
3. Integrate Once, Choose the Synchronization Mode You Need
WeightBridge is designed to be easy to add to an existing RL framework: the same three API calls serve synchronous, asynchronous, and partially synchronous updates across supported models and backend stacks. Your framework keeps control of training, generation, and request scheduling; WeightBridge handles weight-transfer coordination. Supply your native loaders and runtime context, then call:
connect()establishes the trainer–rollout connection and prepares the reusable transfer plan.send_weights()initiates transfer of a new model version from trainer workers.poll_requests()services connection and update requests at rollout inference boundaries, coordinating when workers apply new weights.
Independent sender- and receiver-staging switches provide four synchronization modes: fully synchronous, fully asynchronous, or overlap on only one side. Host staging enables overlap but adds copies and memory costs; the application chooses its throughput-staleness tradeoff. Worker coordination details
import wbridge.frontend.adapters as wbridge
def trainer_worker_process():
adapter = wbridge.SenderAdapter(...) # WeightBridge
adapter.connect() # WeightBridge
for _ in range(num_iters):
train_one_step()
adapter.send_weights() # WeightBridge
def rollout_worker_process():
adapter = wbridge.ReceiverAdapter(...) # WeightBridge
while True:
generate_one_step()
updated = adapter.poll_requests() # WeightBridge
Minimal integration. Trainers connect once and send updated weights; rollouts poll between inference steps.
See the integration guide for API details and current implementation constraints.
Performance
Up to 42× Less GPU Stall Time Than Miles’ Native Weight Transfer
We evaluated WeightBridge with models from 16B to 1.03T parameters on 2–64 H100 nodes, with eight GPUs per node. We measure average GPU stall time: the sum of the time GPUs are blocked on a weight update, divided by the number of GPUs. Applying the same metric to all implementations, WeightBridge reduces average GPU stall time by 16.6–29.4× over Miles Broadcast and 5.4–42.0× over Miles P2P.
End-to-end RL throughput. The end-to-end gain depends on GPU compute time in each RL step and how much weight-transfer overhead remains exposed: the same reduction in transfer time has a larger impact when computation is shorter. On Meta internal workloads, we achieved up to 27% higher end-to-end RL throughput with WeightBridge.
Fast Integration into Different Backends
A coding agent integrated WeightBridge into Miles on its first attempt in 24.5 minutes of active work, excluding experiment waits. The integration reduced end-to-end weight-transfer time by 19.7× for Qwen3-30B-A3B and 8.84× for Qwen3-32B, with correctness checks passing.
WeightBridge also integrates with an internal framework using different training, rollout, and RDMA backends from Miles, demonstrating API generality across different backend stacks. With minimal manual integration effort, it reduced end-to-end weight-transfer time by 6.29–11.00× across one to four rollout replicas.
Try WeightBridge in your RL stack. Get the library, open source in PyTorch Monarch’s examples, and give your coding agent the integration guide to connect it to your trainer and rollout backends. WeightBridge separates RL-framework integration from the communication backend: it has been tested with Megatron-LM, FSDP, vLLM, and SGLang, supports Mooncake and Monarch transports, and is designed to accommodate additional training/inference backends and communication libraries. Watch the PyTorch Conference talk for an overview. If you hit an integration problem or want to collaborate, open an issue or contact Xuanlin Jiang.