-
Notifications
You must be signed in to change notification settings - Fork 391
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
Assistance Needed for Saving ONNX Model in QDQ or QOperator Formats #3220
Comments
Hello @tuanbos, In aimet onnx export method, you need to set use_embedded_encodings to true to get the onnx with QDQ nodes. Please note that this feature is support currently for int8 QDQ nodes only. |
Hi, Thank you for your response. I understand that use_embedded_encodings is only available when converting a model from PyTorch and saving the output to ONNX. This feature is implemented in the QuantizationSimModel class for PyTorch, as seen here: QuantizationSimModel for PyTorch. For ONNX model input, I need to use the QuantizationSimModel for ONNX, which can be found here: QuantizationSimModel for ONNX. However, this class does not yet support exporting to QDQ or QOperation. Is my understanding correct? |
yes, your understanding is correct. My bad I didn't see you are using aimet_onnx TBH, I don't use aimet_onnx, but in the code it seems there is no option at the moment to generate the model with QDQ nodes. I hope that would help |
yes they are not native QDQ nodes, you can try to do something similar to what they implemented in aimet_torch here |
Hi authors,
Thank you for your excellent work.
Currently, I don't see an option to save the ONNX model after it has been quantized into QDQ or QOperator formats. I am using the ONNX format as input, and the output includes the ONNX format in FP32 as well as encoding information (scale, bias).
Could you please show me how to obtain QDQ or QOperator in ONNX from the FP32 model and the encoding information?
Thank you very much, and I look forward to your response.
The text was updated successfully, but these errors were encountered: