neuralmagic / sparseml

Libraries for applying sparsification recipes to neural networks with a few lines of code, enabling faster and smaller models
Apache License 2.0
2.07k stars 148 forks source link

YOLOv8 Export Bug #2348

Closed yoloyash closed 3 months ago

yoloyash commented 4 months ago

Hi, while evaluating the performance of the quantized v8 models I realized that the current exporting pipeline does something slightly different from how the models were actually exported for the zoo. As you can see from the images, the slicing operation is done differently for the same model (YOLOv8m) and the consecutive conv layer is not being quantized. My guess is that it has to do something with #1497 . However, I might be wrong because it shows that 0 layers are being propagated that way, and I have even tried commenting it out.

Current: image

Zoo Models: image

I'm not sure why this is happening, I have tried to roll back to sparseml version 1.5 and 1.6 but the issue still remains. Are there any particular version I should rollback to? The zoo models were exported using what version of sparseml? Any help or hints on how to fix this are really appreciated! (Apologies for the spam)

bfineran commented 4 months ago

Hi @yoloyash unfortunately additional support for this yolo pathway is not on our immediate roadmap - since rolling back the version (to the version where the correct models were exported) did not work - you could potentially try looking at rolling back third party libraries that may have made a difference (ie pytorch, onnx, and ultralytics versions)

jeanniefinks commented 3 months ago

Hello @yoloyash As there have been no further comments on this thread, I am going to go ahead and close out this issue. We hope you're able to roll back the third-party libraries as recommended by @bfineran to see if that makes a difference?! Feel free to re-open it as needed. Best, Jeannie / Neural Magic