huggingface / transformers

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

Compile Grounding DINO #34556

Open pspdada opened 3 weeks ago

pspdada commented 3 weeks 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 3 weeks ago

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

yonigozlan commented 3 weeks 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