[Bug] Kimi-K3 chunked prefill submits different VocabParallelEmbedding ALLREDUCE sizes across TP ranks
Checklist
- I searched related issues but found no solution.
- The bug persists in the latest version.
- Issues without environment info and a minimal reproducible demo are hard to resolve and may receive no feedback.
- If this is not a bug report but a general question, please start a discussion at https://github.com/sgl-project/sglang/discussions. Otherwise, it will be closed.
- Please use English. Otherwise, it will be closed.
Describe the bug
When serving Kimi-K3 on a single 8-GPU B300 node, the scheduler occasionally stops making progress during chunked prefill. The HTTP process remains alive and continues serving /v1/models and /metrics, but the detokenizer heartbeat stops. Ten minutes later, the PyTorch NCCL watchdog aborts the scheduler processes.
This does not look like a generic NCCL transport timeout. In two independent occurrences, the same TP ALLREDUCE sequence number was submitted with different tensor sizes on different ranks. The tensors are outputs of VocabParallelEmbedding in the Kimi-K3 multimodal embedding path.
Occurrence 1:
WorkNCCL SeqNum=1320347, OpType=ALLREDUCE
rank 0/1/2/3/4/6/7: NumelIn=4501504 = 628 * 7168
rank 5: NumelIn=8171520 = 1140 * 7168Occurrence 2:
WorkNCCL SeqNum=1884583, OpType=ALLREDUCE
most ranks: NumelIn=43710464 = 6098 * 7168
rank 4: NumelIn=69400576 = 9682 * 71687168 is the Kimi-K3 hidden size, so these sizes correspond to different token-row counts entering the same TP collective. NCCL waits because the collective contract has already diverged across ranks.
Impact
- All in-flight generation requests stop making progress.
- Health checks begin failing because no detokenizer heartbeat is received.
- The NCCL watchdog waits for the configured 600-second distributed timeout.
- PyTorch then raises
c10::DistBackendErrorand aborts the scheduler with exit code-6(SIGABRT). - The service requires a process/container restart to recover.
Reproduction
We do not yet have a single-request deterministic reproducer. The failure has occurred twice under production traffic with the following common conditions:
- Model:
moonshotai/Kimi-K3 - Hardware: one node with 8 NVIDIA B300 GPUs
- Tensor parallelism: TP=8
- Chunked prefill size: 16384 tokens
- Kimi-K3 DSpark speculative decoding enabled
- Long-context requests and sustained concurrent traffic
- Multimodal Kimi-K3 model path (
general_mm_embed_routineappears in every TP timeout stack)
SGLang version: v0.5.18
- SGLang build commit: 71de97b264b04dcd514cf904003028aefe9775c8
- Official image label: lmsysorg/sglang:v0.5.18-runtime
- Image digest: sha256:87f476c9c044b5e4e12a00f56599fe74bd9607c6921234d537232676a1669527
- Image creation time: 2026-08-21T23:17:06Z
- Architecture / OS: amd64 / Linux
- PyTorch version: 2.13.0+cu130
- PyTorch CUDA build version: 13.0
- CUDA runtime/toolkit in image: 13.0.3 (CUDART 13.0.96)
- Maximum CUDA version reported by host driver: 13.1
- NVIDIA driver version: 590.48.01
- NCCL version in image: 2.28.3-1+cuda13.0
- cuDNN version in image: 9.14.0.64
The final successful scheduler activity in occurrence 2 was a sequence of 16,384-token prefill chunks. No further batch completed after the last prefill line.
Suggested stress reproduction:
- Start Kimi-K3 with the launch configuration below.
- Send concurrent long-context requests, including image requests, so that chunked prefill overlaps with active decode requests.
- Monitor per-rank progress and detokenizer heartbeats.
- If the server wedges, wait for the NCCL timeout or inspect
ProcessGroupNCCLflight-recorder output. - Compare
SeqNum,OpType, andNumelInacross all TP ranks.
Launch command
docker run -d \
--name <CONTAINER_NAME> \
--network host \
--device /dev/infiniband:/dev/infiniband:rwm \
--runtime=nvidia \
-v <HOST_KIMI_K3_MODEL_DIR>:/model:ro \
-v <HOST_KIMI_K3_DSPARK_MODEL_DIR>:/draft-model:ro \
-v <HOST_SGLANG_CACHE_DIR>:/root/.cache \
--cap-add=SYS_PTRACE \
--cap-add=SYS_NICE \
--shm-size=32g \
--ulimit memlock=-1 \
--ulimit stack=67108864 \
-e NVIDIA_DISABLE_REQUIRE=1 \
-e PYTORCH_ALLOC_CONF=expandable_segments:True \
-e LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64 \
-e MC_MS_FILTERS=<RDMA_DEVICE> \
-e TORCHINDUCTOR_COMPILE_THREADS=8 \
lmsysorg/sglang@sha256:87f476c9c044b5e4e12a00f56599fe74bd9607c6921234d537232676a1669527 \
sglang serve \
--model-path /model \
--host 0.0.0.0 \
--port 8050 \
--served-model-name kimi-k3 \
--trust-remote-code \
--tp-size 8 \
--dcp-size 8 \
--disable-custom-all-reduce \
--kv-cache-dtype fp8_e4m3 \
--mamba-full-memory-ratio 1 \
--max-running-requests 35 \
--chunked-prefill-size 16384 \
--mem-fraction-static 0.85 \
--enable-cache-report \
--enable-metrics \
--stream-response-default-include-usage \
--reasoning-parser kimi_k3 \
--tool-call-parser kimi_k3 \
--tokenizer-worker-num 4 \
--speculative-algorithm DSPARK \
--speculative-draft-model-path /draft-model \
--speculative-dspark-block-size 4 \
--enable-linear-replayssm-spec \
--enable-hierarchical-cache \
--hicache-size 150The production registry tag was an internal alias of the official image digest above. It is omitted because it does not identify different image contents.
Environment
Python: 3.12.3 (main, Jun 19 2026, 12:46:00) [GCC 13.3.0] CUDA available: True GPU 0,1,2,3,4,5,6,7: NVIDIA B300 SXM6 AC GPU 0,1,2,3,4,5,6,7 Compute Capability: 10.3 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 13.0, V13.0.88 CUDA Driver Version: 590.48.01 PyTorch: 2.13.0+cu130 sglang: 0.5.18 sglang-kernel: 0.4.6.post1 flashinfer_python: 0.6.17 flashinfer_cubin: 0.6.17 flashinfer_jit_cache: 0.6.17+cu130 triton: 3.7.1 transformers: 5.12.1 torchao: Module Not Found numpy: 2.3.5 aiohttp: 3.14.3 fastapi: 0.141.1 huggingface_hub: 1.28.0 interegular: 0.3.3 modelscope: 1.39.1 orjson: 3.12.0 outlines: 0.1.11 packaging: 26.3 psutil: 7.2.2 pydantic: 2.13.4 python-multipart: 0.0.32 pyzmq: 27.2.0 uvicorn: 0.52.4 uvloop: 0.22.1 vllm: Module Not Found xgrammar: 0.2.1 openai: 2.6.1 tiktoken: 0.14.0 anthropic: 1.0.0 litellm: Module Not Found torchcodec: 0.15.0+cu130 NVIDIA Topology: GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7 NIC0 NIC1 NIC2 NIC3 NIC4 NIC5 NIC6 NIC7 NIC8 CPU Affinity NUMA Affinity GPU NUMA ID GPU0 X NV18 NV18 NV18 NV18 NV18 NV18 NV18 PXB NODE SYS SYS SYS SYS SYS SYS SYS 0-31,128-159 0 N/A GPU1 NV18 X NV18 NV18 NV18 NV18 NV18 NV18 NODE PXB SYS SYS SYS SYS SYS SYS SYS 0-31,128-159 0 N/A GPU2 NV18 NV18 X NV18 NV18 NV18 NV18 NV18 SYS SYS PXB NODE SYS SYS SYS SYS SYS 32-63,160-191 1 N/A GPU3 NV18 NV18 NV18 X NV18 NV18 NV18 NV18 SYS SYS NODE PXB SYS SYS SYS SYS SYS 32-63,160-191 1 N/A GPU4 NV18 NV18 NV18 NV18 X NV18 NV18 NV18 SYS SYS SYS SYS PXB NODE NODE SYS SYS 64-95,192-223 2 N/A GPU5 NV18 NV18 NV18 NV18 NV18 X NV18 NV18 SYS SYS SYS SYS NODE PXB NODE SYS SYS 64-95,192-223 2 N/A GPU6 NV18 NV18 NV18 NV18 NV18 NV18 X NV18 SYS SYS SYS SYS SYS SYS SYS PXB NODE 96-127,224-255 3 N/A GPU7 NV18 NV18 NV18 NV18 NV18 NV18 NV18 X SYS SYS SYS SYS SYS SYS SYS NODE PXB 96-127,224-255 3 N/A NIC0 PXB NODE SYS SYS SYS SYS SYS SYS X NODE SYS SYS SYS SYS SYS SYS SYS NIC1 NODE PXB SYS SYS SYS SYS SYS SYS NODE X SYS SYS SYS SYS SYS SYS SYS NIC2 SYS SYS PXB NODE SYS SYS SYS SYS SYS SYS X NODE SYS SYS SYS SYS SYS NIC3 SYS SYS NODE PXB SYS SYS SYS SYS SYS SYS NODE X SYS SYS SYS SYS SYS NIC4 SYS SYS SYS SYS PXB NODE SYS SYS SYS SYS SYS SYS X NODE NODE SYS SYS NIC5 SYS SYS SYS SYS NODE PXB SYS SYS SYS SYS SYS SYS NODE X NODE SYS SYS NIC6 SYS SYS SYS SYS NODE NODE SYS SYS SYS SYS SYS SYS NODE NODE X SYS SYS NIC7 SYS SYS SYS SYS SYS SYS PXB NODE SYS SYS SYS SYS SYS SYS SYS X NODE NIC8 SYS SYS SYS SYS SYS SYS NODE PXB SYS SYS SYS SYS SYS SYS SYS NODE X
Legend:
X = Self SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI) NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU) PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge) PIX = Connection traversing at most a single PCIe bridge NV# = Connection traversing a bonded set of # NVLinks
NIC Legend:
NIC0: mlx5_0 NIC1: mlx5_1 NIC2: mlx5_2 NIC3: mlx5_3 NIC4: mlx5_4 NIC5: mlx5_9 NIC6: mlx5_10 NIC7: mlx5_11 NIC8: mlx5_12
ulimit soft: 1024
Source: sgl-project/sglang