-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
add new format of quantization #41041
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qingqing01
requested review from
wanghaoshuang,
juncaipeng,
qingqing01 and
ceci3
March 29, 2022 07:46
yghstill
force-pushed
the
add_new_quant_format
branch
from
March 29, 2022 09:57
cfdfc69
to
c4d378a
Compare
ceci3
reviewed
Mar 30, 2022
ceci3
reviewed
Mar 30, 2022
python/paddle/fluid/contrib/slim/quantization/quantization_pass.py
Outdated
Show resolved
Hide resolved
python/paddle/fluid/contrib/slim/quantization/quantization_pass.py
Outdated
Show resolved
Hide resolved
python/paddle/fluid/contrib/slim/quantization/quantization_pass.py
Outdated
Show resolved
Hide resolved
python/paddle/fluid/contrib/slim/quantization/quantization_pass.py
Outdated
Show resolved
Hide resolved
wanghaoshuang
previously approved these changes
Apr 1, 2022
ceci3
previously approved these changes
Apr 1, 2022
ceci3
previously approved these changes
Apr 2, 2022
Aurelius84
previously approved these changes
Apr 4, 2022
Aurelius84
approved these changes
Apr 4, 2022
Aurelius84
approved these changes
Apr 4, 2022
Aurelius84
previously approved these changes
Apr 4, 2022
TCChenlong
reviewed
Apr 4, 2022
python/paddle/fluid/contrib/slim/quantization/quantization_pass.py
Outdated
Show resolved
Hide resolved
python/paddle/fluid/contrib/slim/quantization/quantization_pass.py
Outdated
Show resolved
Hide resolved
python/paddle/fluid/contrib/slim/quantization/quantization_pass.py
Outdated
Show resolved
Hide resolved
ceci3
previously approved these changes
Apr 4, 2022
TCChenlong
approved these changes
Apr 4, 2022
jzhang533
approved these changes
Apr 4, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
XiaoguangHu01
approved these changes
Apr 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
New features
PR changes
APIs
Describe
Add new format of quantization.
补充说明:
fake_quantize_abs_max
、fake_quantize_range_abs_max
等,并且预测库需要解析多种fake op类型,并且量化时给模型原生op attr增加很多属性,适配起来比较复杂。 3)为了使得量化模型更加统一,同时对齐onnx量化模型标准,提升Paddle中模型量化易用性,易扩展,所以对量化模型格式做新的升级。PostTrainingQuantization
设置onnx_format=True
即选择新格式。2)动态图量化API中save_quantized_model
接口中设置onnx_format=True
即选择新格式。