[Cherry-Pick][TI-consistent] support quant use pow2scale(#7308)#7310
[Cherry-Pick][TI-consistent] support quant use pow2scale(#7308)#7310liuruyan wants to merge 4 commits intoPaddlePaddle:release/2.6from
Conversation
|
Thanks for your contribution! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/2.6 #7310 +/- ##
==============================================
Coverage ? 73.85%
==============================================
Files ? 376
Lines ? 52960
Branches ? 8268
==============================================
Hits ? 39112
Misses ? 11114
Partials ? 2734
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fastdeploy-bot
left a comment
There was a problem hiding this comment.
🤖 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] [RL]
📝 PR 规范检查
标题 Tag 问题:标题使用了 [Cherry-Pick][TI-consistent],其中 [TI-consistent] 不在官方 Tag 列表中。根据 PR 描述中的 "train-infer consistency" 和 FD_ENABLE_RL 相关性,应使用 [RL] Tag。
标题建议:
[Cherry-Pick][Quantization][RL] support quant use pow2scale(#7308)[Cherry-Pick][RL][Quantization] support quant use pow2scale(#7308)
描述建议:
- ✅ Motivation 已填写
- ✅ Modifications 已填写
⚠️ 建议补充 Usage 说明(如何设置环境变量)⚠️ Checklist 中的 "Add at least a tag in the PR title" 未勾选,当前 Tag 不符合规范
问题
| 级别 | 文件 | 概述 |
|---|---|---|
| 🟡 建议 | PR 标题 | [TI-consistent] 不在官方 Tag 列表中,应使用 [RL] |
未发现阻塞性问题。
总体评价
代码逻辑正确,环境变量定义和使用方式符合项目规范。新增的 FD_FP8_QUANT_WITH_POW2SCALE 通过 or 逻辑与原有配置组合,提供了灵活的量化模式控制。建议修正 PR 标题中的 Tag 并补充 Usage 说明。
Motivation
针对训推一致性对齐需求,在FD中支持quant 选择pow2scale模式,通过FD_FP8_QUANT_WITH_POW2SCALE控制
Modifications
新增FD_FP8_QUANT_WITH_POW2SCALE参数
Usage or Command
Accuracy Tests
Checklist
[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]]pre-commitbefore commit.releasebranch, make sure the PR has been submitted to thedevelopbranch, then cherry-pick it to thereleasebranch with the[Cherry-Pick]PR tag.