From bdaefbbfbdb26e19ce94a01cffaf7e4d782c4e1d Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Mon, 26 May 2025 22:32:41 -0700 Subject: [PATCH] Add environment flag for disabling message queue broadcaster (#6403) --- python/sglang/srt/distributed/parallel_state.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/distributed/parallel_state.py b/python/sglang/srt/distributed/parallel_state.py index a9161b5c3..943bccc53 100644 --- a/python/sglang/srt/distributed/parallel_state.py +++ b/python/sglang/srt/distributed/parallel_state.py @@ -41,6 +41,7 @@ from torch.distributed import Backend, ProcessGroup from sglang.srt.utils import ( direct_register_custom_op, + get_bool_env_var, is_cuda_alike, is_npu, supports_custom_op, @@ -1153,7 +1154,9 @@ def initialize_model_parallel( group_ranks, get_world_group().local_rank, backend, - use_message_queue_broadcaster=True, + use_message_queue_broadcaster=get_bool_env_var( + "SGLANG_USE_MESSAGE_QUEUE_BROADCASTER", "true" + ), group_name="tp", )