huggingface / optimum-quanto

A pytorch quantization backend for optimum
Apache License 2.0
776 stars 55 forks source link

Add owlv2 detection example #210

Closed dacorvo closed 3 months ago

dacorvo commented 3 months ago

What does this PR do?

This pull-request fixes #192 and adds an object detection example based on owlv2 models.

The quantized model detections are equivalent to those of the float model when using int8, slightly different when using float8, and not so good using int4, although this can be improved by avoiding the quantization of the detection heads.