Skip to content

[Graph Optimization] Support deepseekV3 SOT Dy2St && CUDAGraph#4785

Open
DrRyanHuang wants to merge 22 commits intoPaddlePaddle:developfrom
cattidea:deepseek_new
Open

[Graph Optimization] Support deepseekV3 SOT Dy2St && CUDAGraph#4785
DrRyanHuang wants to merge 22 commits intoPaddlePaddle:developfrom
cattidea:deepseek_new

Conversation

@DrRyanHuang
Copy link
Copy Markdown
Collaborator

@DrRyanHuang DrRyanHuang commented Nov 3, 2025

Motivation

支持 Deepseek V3 SOT 动转静 + 开启 CUDAGraph

Modifications

修改 Deepseek V3 组网,将两个 if 分支移出到新函数,并添加装饰器 @paddle.jit.marker.capture_control_flow 进行 AST 局部转静,前置PR:

Usage or Command

None

Accuracy Tests

None

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
Copy Markdown

paddle-bot Bot commented Nov 3, 2025

Thanks for your contribution!

Comment thread fastdeploy/model_executor/models/deepseek_v3.py Outdated
@DrRyanHuang DrRyanHuang changed the title [PD Disaggregation] Support deepseekV3 sot dy2st [Graph Optimization] Support deepseekV3 sot dy2st Nov 4, 2025
@DrRyanHuang DrRyanHuang changed the title [Graph Optimization] Support deepseekV3 sot dy2st [Graph Optimization] Support deepseekV3 SOT Dy2St && CUDAGraph Nov 5, 2025
Comment thread fastdeploy/model_executor/models/deepseek_v3.py Outdated
Comment thread fastdeploy/model_executor/layers/attention/mla_attention_backend.py
Comment thread fastdeploy/model_executor/models/deepseek_v3.py Outdated
Comment thread fastdeploy/model_executor/models/deepseek_v3.py Outdated
Comment thread fastdeploy/model_executor/layers/attention/mla_attention_backend.py Outdated
Comment thread fastdeploy/model_executor/layers/attention/mla_attention_backend.py
SigureMo
SigureMo previously approved these changes Nov 6, 2025
Comment thread fastdeploy/model_executor/forward_meta.py
gongshaotian
gongshaotian previously approved these changes Nov 6, 2025
Copy link
Copy Markdown
Collaborator

@gongshaotian gongshaotian left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 94.44444% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@dda27e5). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...executor/layers/attention/mla_attention_backend.py 71.42% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #4785   +/-   ##
==========================================
  Coverage           ?   67.62%           
==========================================
  Files              ?      353           
  Lines              ?    45810           
  Branches           ?     7073           
==========================================
  Hits               ?    30979           
  Misses             ?    12579           
  Partials           ?     2252           
Flag Coverage Δ
GPU 67.62% <94.44%> (?)

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.

Comment thread tests/e2e/test_DeepSeek_V3_5layers_serving.py Outdated
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.

5 participants