Using adaround for quantification takes too much time.

I performed a quantization conversion based on the YOLOv26m model, and I corrected 1024 images from the dataset using a NVIDIA GeForce GTX 3090 graphics card. However, when I checked with adaround, it was indicated that 126 training rounds are required, with each round processing 327,680 images. This process is too slow and is expected to take more than a day. Is this normal?

Hi @user1111,

Yes - this is generally expected behavior.

So, if we set the batch_size parameter in post_quantization_optimization(adaround, policy=enabled, batch_size=1) to a larger value, will it speed up the process? Additionally, will it have any impact on the accuracy assessment?

Hi @user1111,

Yes, increasing the batch_size generally speeds up AdaRound because more samples are processed in parallel per training step, making better use of your GPU’s compute capacity. The default is already 32, so if you’ve set it to 1, that would explain why things are extremely slow - you might try setting it back to the default or even higher (e.g. 64) if your GTX 3090’s 24GB VRAM can handle it. However, if you go too high you could run out of GPU memory.
As for accuracy, batch_size is a training hyperparameter for the AdaRound optimization itself, and in practice moderate changes to it (e.g. 16 vs 32 vs 64) are unlikely to have a significant impact on the final quantized model accuracy.

Thanks for the answer; I will try to increase the value of batch_size. Additionally, the default value set in the link(hailo_model_zoo/hailo_model_zoo/cfg/alls/generic/yolo26m.alls at v2.18 · hailo-ai/hailo_model_zoo · GitHub) is currently 1.

Thanks @user1111 for letting us know the default is 1.