Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FP8 PTQ With Physical Dependency 0515 #1875

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

YZW-explorer
Copy link

@YZW-explorer YZW-explorer commented May 15, 2024

描述:定义新的FP8 observer,目前只支持e4m3格式
功能:统计量化对象的abs_max,并根据abs_max和fp8格式的取值范围计算scale
PaddleSlim设计逻辑:
paddleslim/quant/observers/fp8uniform.py
定义FP8UniformObserverLayer类用以统计量化对象的abs_max以及根据用户选择的要量化到的FP8类型设置正确的量化区间,并最终计算出scale,方便FP8LinearQuanterDequanter进行量化和反量化操作
paddleslim/quant/observers/init.py
将FP8UniformObserver添加到__init__中方便外部调用

Copy link

paddle-bot bot commented May 15, 2024

Thanks for your contribution!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants