Skip to content

Conversation

@Sunny-bot1
Copy link
Collaborator

@Sunny-bot1 Sunny-bot1 commented Dec 17, 2025

Motivation

  • 为了提升模型加载速度以及适配EPLB,支持离线量化重排,加载权重后无需其他操作
  • 支持dense在线量化、moe离线量化

Modifications

is_quantized:全局控制是否走离线量化逻辑

is_moe_quantized:控制moe的权重是否走离线量化逻辑

moe_dynamic_quant:控制moe的激活是否走在线量化逻辑

is_permuted:控制moe的权重是否离线重排

Usage or Command

w4afp8的量化组合:

dense block_wise_fp8权重 moe w4afp8激活 moe w4afp8权重 quantization_config
在线 在线 在线 "quantization_config":{ "dense_quant_type":"block_wise_fp8", "moe_quant_type":"w4afp8", "quantization":"mix_quant","hadamard_block_size": 512},
在线 在线 离线不重排 "quantization_config":{"dense_quant_type":"block_wise_fp8", "moe_quant_type":"w4afp8", "is_moe_quantized":true, "moe_dynamic_quant": true, "quantization":"mix_quant", "hadamard_block_size": 512, "is_permuted":false}
在线 在线 离线重排 "quantization_config":{"dense_quant_type":"block_wise_fp8", "moe_quant_type":"w4afp8", "is_moe_quantized":true, "moe_dynamic_quant": true,"quantization":"mix_quant","hadamard_block_size": 512, "is_permuted":true }
在线 离线 离线重排 "quantization_config":{"dense_quant_type":"block_wise_fp8", "moe_quant_type":"w4afp8", "is_moe_quantized":true, "quantization":"mix_quant", "hadamard_block_size": 512, "is_permuted":true}
离线 离线 离线重排 "is_quantized": true, "quantization_config":{"dense_quant_type":"block_wise_fp8", "moe_quant_type":"w4afp8", "quantization":"mix_quant","hadamard_block_size": 512, "is_permuted":true}

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

paddle-bot bot commented Dec 17, 2025

Thanks for your contribution!

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 13.63636% with 19 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@4f830aa). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...l_executor/layers/moe/fused_moe_cutlass_backend.py 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #5613   +/-   ##
==========================================
  Coverage           ?   64.57%           
==========================================
  Files              ?      329           
  Lines              ?    41780           
  Branches           ?     6397           
==========================================
  Hits               ?    26978           
  Misses             ?    12755           
  Partials           ?     2047           
Flag Coverage Δ
GPU 64.57% <13.63%> (?)

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.

@yangjianfengo1
Copy link
Contributor

LGTM

@Jiang-Jia-Jun Jiang-Jia-Jun merged commit 40f3897 into PaddlePaddle:develop Dec 22, 2025
15 of 20 checks passed
Sunny-bot1 added a commit to Sunny-bot1/FastDeploy that referenced this pull request Dec 22, 2025
Jiang-Jia-Jun pushed a commit that referenced this pull request Dec 23, 2025
… & load and DeepEP low latency two stage(#5613 #5608) (#5677)

* support w4afp8 moe offline permute & load (#5613)

* support w4afp8 two stage (#5608)

* fix
ckl117 pushed a commit to fxyfxy777/FastDeploy that referenced this pull request Dec 29, 2025
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