Skip to content

[Cherry-Pick][TI-consistent] support quant use pow2scale(#7308)#7303

Merged
yuanlehome merged 6 commits intoPaddlePaddle:release/2.5from
liuruyan:ti_quant_scale
Apr 13, 2026
Merged

[Cherry-Pick][TI-consistent] support quant use pow2scale(#7308)#7303
yuanlehome merged 6 commits intoPaddlePaddle:release/2.5from
liuruyan:ti_quant_scale

Conversation

@liuruyan
Copy link
Copy Markdown
Contributor

@liuruyan liuruyan commented Apr 10, 2026

Motivation

针对训推一致性对齐需求,在FD中支持quant 选择pow2scale模式,通过FD_FP8_QUANT_WITH_POW2SCALE控制

Modifications

新增FD_FP8_QUANT_WITH_POW2SCALE参数

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 10, 2026

Thanks for your contribution!

fastdeploy-bot

This comment was marked as outdated.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/2.5@ffe2cf1). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             release/2.5    #7303   +/-   ##
==============================================
  Coverage               ?   69.95%           
==============================================
  Files                  ?      390           
  Lines                  ?    54429           
  Branches               ?     8583           
==============================================
  Hits                   ?    38077           
  Misses                 ?    13614           
  Partials               ?     2738           
Flag Coverage Δ
GPU 69.95% <ø> (?)

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.

fastdeploy-bot

This comment was marked as outdated.

fastdeploy-bot

This comment was marked as outdated.

@liuruyan
Copy link
Copy Markdown
Contributor Author

/re-run ci_xpu

@liuruyan liuruyan changed the title [TI-consistent] support quant use pow2scale [Cherry-Pick][TI-consistent] support quant use pow2scale(#7308) Apr 11, 2026
Copy link
Copy Markdown

@fastdeploy-bot fastdeploy-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-11

📋 Review 摘要

PR 概述:新增 FD_FP8_QUANT_WITH_POW2SCALE 环境变量支持 FP8 量化使用 pow2scale 模式

变更范围:fastdeploy/envs.py、model_executor/layers/moe/、model_executor/layers/quantization/

影响面 Tag[Quantization]

📝 PR 规范检查

PR 标题缺少有效的 [Tag] 标签。[Cherry-Pick][TI-consistent] 不在官方标签列表中。

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

  • [Quantization] [Cherry-Pick] support quant use pow2scale(#7308)
  • [RL] [Cherry-Pick] support quant use pow2scale(#7308)

描述建议:建议补充完整的 Modifications 列表(各文件修改的具体调用点数量)和 Accuracy 测试结果。

问题

无阻塞性问题。

总体评价

变更逻辑清晰,通过新增环境变量 FD_FP8_QUANT_WITH_POW2SCALE 统一控制 FP8 量化的 pow2scale 模式,便于训推一致性对齐。使用 or 运算符确保当环境变量为 True 时强制启用 pow2scale,符合预期行为。

@yuanlehome yuanlehome merged commit 144576c into PaddlePaddle:release/2.5 Apr 13, 2026
50 of 56 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.

6 participants