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

Large calibration images while quantizing #128

Open
waquey opened this issue Oct 26, 2024 · 1 comment
Open

Large calibration images while quantizing #128

waquey opened this issue Oct 26, 2024 · 1 comment
Assignees

Comments

@waquey
Copy link

waquey commented Oct 26, 2024

Dear great authors,

I'd like to quantize large input size models such as 1x1024x1024x3.
However, when I try the method of RyzenAI_quant_tutorial/onnx_example/onnx_model_ptq, out of memory issues occurred.
As documents illustrated, calibration needs around 100~1000 images.
But one image takes ~3g. Is there any method to quantize models with large input resolution?

PS: If it is transformer-based, is there any recommended method to do before quantization?

Thanks

@cyndwith cyndwith self-assigned this Oct 29, 2024
@cyndwith
Copy link
Collaborator

When dealing with large image sizes, memory errors can occur due to the high memory consumption required to load and process the images.

One options it to try and reduce the batch size to accommodate the images based on the available system memory.

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

No branches or pull requests

2 participants