huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
134.29k stars 26.85k forks source link

Compile Grounding DINO #34556

Open pspdada opened 4 hours ago

pspdada commented 4 hours ago

Feature request

I found that the Gounding DINO model IDEA-Research/grounding-dino-base cann't be compiled. When I use torch.comple(<The model>), it raises many error, such as TypeError: unhashable type: 'dict'. can this be implemented?

Motivation

It's very slow for Grounding DINO to perform batch inference, so I want some way to speed it up.

Your contribution

Not sure.

zucchini-nlp commented 4 hours ago

maybe cc @yonigozlan who is working on compile for with a few vision models

yonigozlan commented 1 hour ago

Yes! I'll get to it once I have a bit more bandwidth, but in the meantime if you want to have a go at it, part of the solution should be similar to what was done in https://github.com/huggingface/transformers/pull/33600