Skip to content

[Roadmap] Pipeline parallelism roadmapΒ #11857

Open

Description

@ShangmingCai

Motivation

Pipeline parallelism is an important feature that can effectively reduce Long Context (e.g., 1M input tokens) TTFT, and it is also a promising optional parallel strategy for improving throughput.

Pipeline Parallelism Roadmap

  • Long context prefill + PD Disaggregation @ShangmingCai @XucSh @alpha-baby @whybeyoung
    • Achieve almost linear scaling by doing chunked pipeline parallelism with prefill on a long context (e.g., 1M)
    • Compatible with different tp degree on decode (e.g., PP8TP8 on prefill +TP4 on decode, PP8TP1 on prefill + TP8 on decode)
  • High throughput decoding @ShangmingCai @bluecoffee8

Currently, SGLang has supported Pipeline parallelism (#5724) in the main branch, and also made it compatible with the PD Disaggregation feature (#8846), but the implementation is not perfect, and there remains a lot of space for performance improvements. In other words, there still exist many pipeline bubbles (e.g., GPU's idle time) in the whole cluster for the current implementation.

To reduce PP bubbles, the refactoring works can be divided into the following sub-tasks:

Refactoring the PP communication strategy

Make new disagg prefill event loop compatible with PD Disaggregation

Implement decode PP for PD Disaggregation

Compatibility with HiCache

Compatibility with Context Parallelism

Reduce code duplication and improve code readability

We welcome contributors who are interested in these tasks and willing to join us for rapid development.

Related resources

No response

Activity

  1. self-assigned this
    on Oct 20, 2025
  2. changed the title [-][Feature] Refactoring and Improving Pipeline Parallelism[/-] [+][Roadmap] Pipeline parallelism refactoring roadmap[/+] on Oct 21, 2025
  3. jianfei-wangg commented on Nov 18, 2025

    @jianfei-wangg
    Contributor

    Hello,is there any plan to support speculative decoding when pp is enabled?

  4. ShangmingCai commented on Nov 18, 2025

    @ShangmingCai
    CollaboratorAuthor

    Hello,is there any plan to support speculative decoding when pp is enabled?

    @jianfei-wangg It should be OK with PD disaggregation (Prefill PP + Decode MTP), but for normal pp loop, I think we are not gonna make it a high-priority task currently.

  5. jianfei-wangg commented on Nov 18, 2025

    @jianfei-wangg
    Contributor

    Hello,is there any plan to support speculative decoding when pp is enabled?

    @jianfei-wangg It should be OK with PD disaggregation (Prefill PP + Decode MTP), but for normal pp loop, I think we are not gonna make it a high-priority task currently.

    @ShangmingCai Thanks for reply. But I wonder whether it is OK with PD.

    Image Image When P node is PP enabled with MTP disabled, P will not seed draft_model kv cache and last_hidden_states. Without draft_model prefill kv_cache, the accept ratio will drop a lot. Right?
  6. ShangmingCai commented on Nov 18, 2025

    @ShangmingCai
    CollaboratorAuthor

    @jianfei-wangg It does affect the accept rate to some extent, not too much for MTP, but could be significant for draft-model-based methods. In fact, I haven't put too much effort and attention into PD + draft-model-based spec methods, we think MTP and EAGLE are more important.

  7. ShangmingCai commented on Dec 12, 2025

    @ShangmingCai
    CollaboratorAuthor

    More info:

    • Will write a doc about dynamic chunking today to guide users in tuning the performance.
    • PR of decode pp event loop will be released today as well.
  8. changed the title [-][Roadmap] Pipeline parallelism refactoring roadmap[/-] [+][Roadmap] Pipeline parallelism roadmap[/+] on Jan 8, 2026
  9. nihao1997 commented on Jan 22, 2026

    @nihao1997

    Hello, great work! However, I currently have an issue: if our requests include a grammar, it can cause inconsistencies among the requests in the disagg_prefill_bootstrap_queue across different pipeline parallel (PP) stages, leading SGLang to crash.

    For now, I’ve modified the code to synchronously wait for the grammar processing to complete before enqueuing the request. Is there a better solution to this problem?

    added_to_grammar_queue = self.grammar_manager.process_req_with_grammar(req)

  10. ShangmingCai commented on Jan 22, 2026

    @ShangmingCai
    CollaboratorAuthor

    Hello, great work! However, I currently have an issue: if our requests include a grammar, it can cause inconsistencies among the requests in the disagg_prefill_bootstrap_queue across different pipeline parallel (PP) stages, leading SGLang to crash.

    For now, I’ve modified the code to synchronously wait for the grammar processing to complete before enqueuing the request. Is there a better solution to this problem?

    sglang/python/sglang/srt/managers/scheduler.py

    Line 1573 in d6e2b88

    added_to_grammar_queue = self.grammar_manager.process_req_with_grammar(req)

    @nihao1997 Hello, you can reference this PR: #16820. If this won't help, welcome submit an issue or a PR to discuss this problem.

  11. zwc163 commented on Jan 28, 2026

    @zwc163

    Can we support MTP under PP parallelism?

  12. ShangmingCai commented on Jan 29, 2026

    @ShangmingCai
    CollaboratorAuthor

    Can we support MTP under PP parallelism?

    @zwc163 Yes, of course. Prefill PP (without setting mtp params) + Decode MTP has already been supported. But MTP compatibility when prefill nodes are configured MTP (with draft cache transfer) still needs some time. I am currently busy with other things.

  13. guoyuhong commented on Jan 29, 2026

    @guoyuhong
    Collaborator

    Can we support MTP under PP parallelism?

    @zwc163 Yes, of course. Prefill PP (without setting mtp params) + Decode MTP has already been supported. But MTP compatibility when prefill nodes are configured MTP (with draft cache transfer) still needs some time. I am currently busy with other things.

    @ShangmingCai It seems your use case involves disaggregation. If we don’t use PD Disaggregation, would it still be possible to support PP + MTP?

  14. ShangmingCai commented on Jan 30, 2026

    @ShangmingCai
    CollaboratorAuthor

    Can we support MTP under PP parallelism?

    @zwc163 Yes, of course. Prefill PP (without setting mtp params) + Decode MTP has already been supported. But MTP compatibility when prefill nodes are configured MTP (with draft cache transfer) still needs some time. I am currently busy with other things.

    @ShangmingCai It seems your use case involves disaggregation. If we don’t use PD Disaggregation, would it still be possible to support PP + MTP?

    @guoyuhong I guess you mean decode PP + MTP? Not yet. We need to make PP compatible with MTP first.

  15. CloudyDory commented on Jan 31, 2026

    @CloudyDory

    Hi, vLLM has a environment variable "VLLM_PP_LAYER_PARTITION" that controls how to split model in pipeline parallelism. This is very useful in scenarios where the GPUs in a cluster are different (for example, 4090s + 5090s). Does sglang has a similar feature?

  16. ShangmingCai commented on Jan 31, 2026

    @ShangmingCai
    CollaboratorAuthor

    Hi, vLLM has a environment variable "VLLM_PP_LAYER_PARTITION" that controls how to split model in pipeline parallelism. This is very useful in scenarios where the GPUs in a cluster are different (for example, 4090s + 5090s). Does sglang has a similar feature?

    @CloudyDory Sure, try SGLANG_PP_LAYER_PARTITION. You can find all env vars here: https://github.com/sgl-project/sglang/blob/main/docs/references/environment_variables.md?plain=1

  17. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    This issue has been automatically closed due to inactivity. Please feel free to reopen it if needed.

  18. github-actions commented on Jun 19, 2026

    @github-actions
    Contributor

    This issue has been automatically closed due to inactivity. Please feel free to reopen it if needed.

  19. Eviannn commented on Jul 1, 2026

    @Eviannn

    Hi, are u planning to support piecewise-cuda-graph + pp and overlap-schedule + pp?

  20. ShangmingCai commented on Jul 1, 2026

    @ShangmingCai
    CollaboratorAuthor

    Hi, are u planning to support piecewise-cuda-graph + pp and overlap-schedule + pp?

    @Eviannn I think PP does not need overlap scheduling since the CPU overhead is already hidden either in the GPU execution or in the proxy communication. You can consider it is inherited inside PP.

    As for PCG/BCG, I think it would be great if this feature works under PP mode, but I think this combination has some specific impl need to be handled, not sure whether it works for all kinds of models currently. Welcome to testing and contributing if you find this topic interesting.

  21. dongyibo commented on Jul 9, 2026

    @dongyibo

    @ShangmingCai Hello, our current deployment setup is pd-disagg + mtp. However, due to the urgent need for 1M context, we need to enable pp on the p node, but we don't want to lose the acceleration effect of mtp on the d node.

    Therefore, we hope the p node can support the pp+mtp functionality. Could you please consider this when you have time? Thank you~

  22. liao4s commented on Sep 3, 2026

    @liao4s

    Hello. Although the roadmap indicates that asynchronous communication for PP ranks has been implemented, I have found that inter-PP-rank communication in sglang still synchronous. As shown in the code snippet below, this implementation forces the GPU to wait for the proxy tensor from the previous operation to finish sending before proceeding to the next inference batch, resulting in significant bubbles. The recv operation is the same. This can be confirmed by the trace screenshot below (based on a deployment of the first 64 layers of the Kimi-K3 model using PP=16 on H20 GPUs).

    Really hope to receive a reply after you see this. Thank you!

    Image Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions