Skip to content

[Cherry-Pick] CP 3 prs which is about fixing and optimizing(#7237)(#7425)(#7426)#7436

Merged
RichardWooSJTU merged 3 commits intoPaddlePaddle:release/online/20260415from
RichardWooSJTU:wfs_0416
Apr 16, 2026
Merged

[Cherry-Pick] CP 3 prs which is about fixing and optimizing(#7237)(#7425)(#7426)#7436
RichardWooSJTU merged 3 commits intoPaddlePaddle:release/online/20260415from
RichardWooSJTU:wfs_0416

Conversation

@RichardWooSJTU
Copy link
Copy Markdown
Collaborator

Motivation

💡 If this PR is a Cherry Pick, the PR title needs to follow the format by adding the [Cherry-Pick] label at the very beginning and appending the original PR ID at the end. For example, [Cherry-Pick][CI] Add check trigger and logic(#5191)

💡 如若此PR是Cherry Pick,PR标题需遵循格式,在最开始加上[Cherry-Pick]标签,以及最后面加上原PR ID,例如[Cherry-Pick][CI] Add check trigger and logic(#5191)

Modifications

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

paddle-bot bot commented Apr 16, 2026

Thanks for your contribution!

@RichardWooSJTU RichardWooSJTU merged commit f5f8ca5 into PaddlePaddle:release/online/20260415 Apr 16, 2026
23 of 31 checks passed
Copy link
Copy Markdown

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Choose a reason for hiding this comment

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

🤖 AI Code Review | 2026-04-16 19:56 CST

📋 Review 摘要

PR 概述:Cherry-pick 3 个 PR(#7237, #7425, #7426),包含 num_max_dispatch_tokens_per_rank 自动计算、数据并行启动优化、以及 DeepSeek V3 模型 deep_gemm 导入统一。
变更范围config.pyengine/engine.pymodel_executor/models/deepseek_v3.py
影响面 TagFDConfig Engine Models

📝 PR 规范检查

PR 标题缺少功能性 Tag(仅有 [Cherry-Pick]),且 Motivation / Modifications 章节未填写。

标题建议(可直接复制):

  • [Cherry-Pick][BugFix][Optimization] CP 3 prs which is about fixing and optimizing(#7237)(#7425)(#7426)

描述建议:请补充 Motivation(说明这 3 个原始 PR 分别解决什么问题)和 Modifications(概述三处变更的具体内容)。

问题

级别 文件 概述
🟡 建议 config.py:2166 getattr truthiness 检查可改用 is not None 更清晰

总体评价

三处变更逻辑正确:config 自动计算 dispatch tokens 确保一致性、engine 并行启动优化减少等待时间、deepseek_v3 统一使用 fp8_utils 集中管理 deep_gemm 导入。仅有一处代码风格建议,无阻塞性问题。

Comment thread fastdeploy/config.py
else:
auto_dispatch_tokens = self.scheduler_config.max_num_seqs
if (
getattr(self.model_config, "num_max_dispatch_tokens_per_rank", None)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 建议 getattr(..., None) 依赖 truthiness 判断属性是否存在,当值恰好为 0 或其他 falsy 值时会被跳过。

虽然 num_max_dispatch_tokens_per_rank 默认值为 128,实际不太可能为 0,但使用 is not None 能更精确地表达"属性存在即覆盖"的意图,避免潜在的边界情况。

建议修改为:

if (
    getattr(self.model_config, "num_max_dispatch_tokens_per_rank", None) is not None
    and self.model_config.num_max_dispatch_tokens_per_rank != auto_dispatch_tokens
):

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.

2 participants