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

[Bug] fp8 quantization, weight_error is empty, but qdq_err is normal #21113

Open
zccyman opened this issue Jun 20, 2024 · 1 comment
Open

[Bug] fp8 quantization, weight_error is empty, but qdq_err is normal #21113

zccyman opened this issue Jun 20, 2024 · 1 comment
Labels
quantization issues related to quantization stale issues that have not been addressed in a while; categorized by a bot

Comments

@zccyman
Copy link

zccyman commented Jun 20, 2024

Describe:

        weight_type=QuantType.QFLOAT8E4M3FN,
        activation_type=QuantType.QFLOAT8E4M3FN,
        calibrate_method=CalibrationMethod.Distribution,
        extra_options=dict(
            QDQKeepRemovableActivations=True,
            ActivationSymmetric=False,
            WeightSymmetric=False,
            AddQDQPairToWeight=True,
            QuantizeBias=True,
            ForceQuantizeNoInputCheck=True,
            TensorQuantOverrides=dict(),
        ),

weight errors is empty, but qdq_err is normal.

Comparing weights of float model vs qdq model.....
weight errors: 

------------------------------------------------

Augmenting models to save intermediate activations......
------------------------------------------------

Running the augmented floating point model to collect activations......
------------------------------------------------

Running the augmented qdq model to collect activations......
2024-06-20 06:53:28.508970448 [W:onnxruntime:, graph.cc:4093 CleanUnusedInitializersAndNodeArgs] Removing initializer 'conv1.bias_quantized_zero_point'. It is not used by any node and should be removed from the model.
2024-06-20 06:53:28.508988421 [W:onnxruntime:, graph.cc:4093 CleanUnusedInitializersAndNodeArgs] Removing initializer '/conv1/Conv_output_0_scale'. It is not used by any node and should be removed from the model.
2024-06-20 06:53:28.508992868 [W:onnxruntime:, graph.cc:4093 CleanUnusedInitializersAndNodeArgs] Removing initializer '/conv1/Conv_output_0_zero_point'. It is not used by any node and should be removed from the model.
2024-06-20 06:53:28.508997639 [W:onnxruntime:, graph.cc:4093 CleanUnusedInitializersAndNodeArgs] Removing initializer 'conv1.bias_quantized_scale'. It is not used by any node and should be removed from the model.
------------------------------------------------

Comparing activations of float model vs qdq model......
qdq_err: 

output 0.0839491831621686
input 0.036262167281220226
xmodel_err: 

output 0.15343184633604956
input 0.036262167281220226
@github-actions github-actions bot added the quantization issues related to quantization label Jun 20, 2024
Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quantization issues related to quantization stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

1 participant