Skip to content

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

Open
liuruyan wants to merge 4 commits intoPaddlePaddle:release/2.6from
liuruyan:ti_quant_scale_26
Open

[Cherry-Pick][TI-consistent] support quant use pow2scale(#7308)#7310
liuruyan wants to merge 4 commits intoPaddlePaddle:release/2.6from
liuruyan:ti_quant_scale_26

Conversation

@liuruyan
Copy link
Copy Markdown

@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!

@liuruyan liuruyan changed the title support quant use pow2scale [TI-consistent] support quant use pow2scale Apr 10, 2026
fastdeploy-bot

This comment was marked as outdated.

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.6@42b0f59). Learn more about missing BASE report.

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           
Flag Coverage Δ
GPU 73.85% <ø> (?)

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.

@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] [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 说明。

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