# Cannot handle cases where distributed draft workers generate no tokens

**URL:** <https://discuss.vllm.ai/t/cannot-handle-cases-where-distributed-draft-workers-generate-no-tokens/1162>\
**Category:** General\
**Created:** [July 24, 2025, 2:30am UTC](https://discuss.vllm.ai/t/cannot-handle-cases-where-distributed-draft-workers-generate-no-tokens/1162 "2025-07-24T02:30:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sun-Xiaohui](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/sun-xiaohui/32/197_2.png) [@Sun-Xiaohui](https://discuss.vllm.ai/u/Sun-Xiaohui)\
**Post date:** [July 24, 2025, 2:30am UTC](https://discuss.vllm.ai/t/cannot-handle-cases-where-distributed-draft-workers-generate-no-tokens/1162/1 "2025-07-24T02:30:45Z")

</div>

Hello, vLLM team! I meet an error when I use draft model with tp=2, command is:

```auto
MODEL='/data/framework_vllm/models/Qwen3-32B'
SPEC_MODEL='/data/framework_vllm/models/Qwen3-1.7B'
NUM_SPEC_TOKENS=3
SPEC_CFG="{\"model\": \"$SPEC_MODEL\", \"num_speculative_tokens\": $NUM_SPEC_TOKENS}"

DEVICE_IDS=0,1
N_GPUS=2

CUDA_VISIBLE_DEVICES=${DEVICE_IDS} \
vllm serve $MODEL \
    --swap-space 16 \
    --disable-log-requests \
    --speculative_config "$SPEC_CFG" \
    --tensor_parallel_size ${N_GPUS} \

```

most time, it servers normly. But sometimes, it reports an error:

```auto
ERROR 07-24 02:12:54 [engine.py:165] return self._run_speculative_decoding_step(execute_model_req,
ERROR 07-24 02:12:54 [engine.py:165] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 07-24 02:12:54 [engine.py:165] File "/root/anaconda3/envs/vllm_sxh/lib/python3.12/contextlib.py", line 81, in inner
ERROR 07-24 02:12:54 [engine.py:165] return func(*args, **kwds)
ERROR 07-24 02:12:54 [engine.py:165] ^^^^^^^^^^^^^^^^^^^
ERROR 07-24 02:12:54 [engine.py:165] File "/root/anaconda3/envs/vllm_sxh/lib/python3.12/site-packages/vllm/spec_decode/spec_decode_worker.py", line 790, in _run_speculative_decoding_step
ERROR 07-24 02:12:54 [engine.py:165] raise RuntimeError("Cannot handle cases where distributed draft "
ERROR 07-24 02:12:54 [engine.py:165] RuntimeError: Cannot handle cases where distributed draft workers generate no tokens

```

what should I do if I want to keep draft model on tp = 2 ?

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [July 24, 2025, 2:31am UTC](https://discuss.vllm.ai/t/cannot-handle-cases-where-distributed-draft-workers-generate-no-tokens/1162/2 "2025-07-24T02:31:04Z")

</div>

Speculative decoding in vLLM currently only supports draft models with tensor parallelism (TP) set to 1, not TP \> 1. The error you encountered, “Cannot handle cases where distributed draft workers generate no tokens,” is a known limitation when using TP \> 1 for the draft model. To use speculative decoding reliably, set the draft model’s tensor parallel size to 1, even if the main model uses TP \> 1. This is documented in both the official docs and multiple GitHub issues—see [Speculative Decoding docs](https://docs.vllm.ai/en/stable/features/spec_decode.html) and [related GitHub issue](https://github.com/vllm-project/vllm/issues/8731).

If you need to use a larger draft model that doesn’t fit on a single GPU, consider using a smaller or quantized draft model, or wait for future vLLM releases that may add support for TP \> 1 in draft models. Would you like more detail on workarounds or configuration examples?

Sources:

- [GitHub Issue #8731](https://github.com/vllm-project/vllm/issues/8731)
- [Speculative Decoding docs](https://docs.vllm.ai/en/stable/features/spec_decode.html)

---

<div class="post-metadata">

**Author:** ![Sun-Xiaohui](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/sun-xiaohui/32/197_2.png) [@Sun-Xiaohui](https://discuss.vllm.ai/u/Sun-Xiaohui)\
**Post date:** [July 24, 2025, 3:02am UTC](https://discuss.vllm.ai/t/cannot-handle-cases-where-distributed-draft-workers-generate-no-tokens/1162/3 "2025-07-24T03:02:27Z")

</div>

Ok, thanks！But the official docs[https://docs.vllm.ai/en/stable/features/spec\_decode.html](https://docs.vllm.ai/en/stable/features/spec_decode.html) only say not support PP now.

> Currently, speculative decoding in vLLM is not compatible with pipeline parallelism.

Besides, default parallel policy is: draft model has the same tp size as target model? [https://github.com/vllm-project/vllm/pull/5414](https://github.com/vllm-project/vllm/pull/5414). This pr also confuses me.

---

<div class="post-metadata">

**Author:** ![RunLLM](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/runllm/32/233_2.png) [@RunLLM](https://discuss.vllm.ai/u/RunLLM)\
**Post date:** [July 24, 2025, 3:02am UTC](https://discuss.vllm.ai/t/cannot-handle-cases-where-distributed-draft-workers-generate-no-tokens/1162/4 "2025-07-24T03:02:45Z")

</div>

You’re correct that the official docs explicitly state speculative decoding is not compatible with pipeline parallelism (PP), but the situation with tensor parallelism (TP) is more nuanced. By default, vLLM sets the draft model’s TP to match the target model’s TP unless you explicitly set draft\_tensor\_parallel\_size to 1. However, as of now, only draft\_tensor\_parallel\_size=1 is fully supported and stable—using TP\>1 for the draft model can lead to errors like the one you encountered, and this is acknowledged in [PR #5414](https://github.com/vllm-project/vllm/pull/5414) and related discussions.

The PR you referenced ([#5414](https://github.com/vllm-project/vllm/pull/5414)) added infrastructure for supporting different TP sizes between draft and target models, but it was merged with TP\>1 for the draft model disabled by default due to unresolved issues. So, while the config allows you to set TP\>1, in practice, only TP=1 for the draft model is recommended and supported. Would you like a step-by-step explanation of how to configure this?

Sources:

- [Speculative Decoding docs](https://docs.vllm.ai/en/stable/features/spec_decode.html)
- [PR #5414](https://github.com/vllm-project/vllm/pull/5414)

---

<div class="post-metadata">

**Author:** ![Sun-Xiaohui](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.vllm.ai/sun-xiaohui/32/197_2.png) [@Sun-Xiaohui](https://discuss.vllm.ai/u/Sun-Xiaohui)\
**Post date:** [July 24, 2025, 3:13am UTC](https://discuss.vllm.ai/t/cannot-handle-cases-where-distributed-draft-workers-generate-no-tokens/1162/5 "2025-07-24T03:13:43Z")

</div>

Thanks very much! I know how to configure it. Thanks!
