SGLangWeightSender¶
- class torchrl.weight_update.llm.SGLangWeightSender(scheme: SGLangWeightSyncScheme)[source]¶
Sends weights to SGLang workers using NCCL broadcast.
- Parameters:
scheme – The SGLangWeightSyncScheme configuration.
- flush_cache() bool[source]¶
Flush the SGLang server’s radix cache after weight update.
- Returns:
True if cache was flushed successfully.
- Return type:
bool
- init_all_workers_group(model_metadata: dict[str, tuple[dtype, Size]]) None[source]¶
Initialize the NCCL communication group.
- Parameters:
model_metadata – Dict mapping param names to (dtype, shape) tuples.