Skip to content

Conversation

@liyonghua0910
Copy link
Collaborator

@liyonghua0910 liyonghua0910 commented Jan 5, 2026

Motivation

修复 PD 分离时 MTP 启动失败问题,在 PD 分离场景需要由 cache messager 创建 cache,而 gpu model runner 需要等待 cache 创建完成的信号,才能开始读取 cache。

此前的 PR (#5841) 把 mtp 模块的 cache 初始化提前到了主模型 cache 初始化前面,主模型有这个等待逻辑,而 mtp 模型中没有,导致初始化出错。

Modifications

将 cache 的等待逻辑从 gpu_model_runner.py 同步到 mtp.py 文件

Usage or Command

Accuracy Tests

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@paddle-bot
Copy link

paddle-bot bot commented Jan 5, 2026

Thanks for your contribution!

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/2.4@2a71e42). Learn more about missing BASE report.

Files with missing lines Patch % Lines
fastdeploy/spec_decode/mtp.py 50.00% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             release/2.4    #5885   +/-   ##
==============================================
  Coverage               ?   58.97%           
==============================================
  Files                  ?      329           
  Lines                  ?    40795           
  Branches               ?     6209           
==============================================
  Hits                   ?    24060           
  Misses                 ?    14864           
  Partials               ?     1871           
Flag Coverage Δ
GPU 58.97% <50.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@EmmonsCurse EmmonsCurse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for skipping mtp coverage.

@EmmonsCurse EmmonsCurse merged commit 682e1ab into PaddlePaddle:release/2.4 Jan 6, 2026
12 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants