huggingface / optimum

πŸš€ Accelerate training and inference of πŸ€— Transformers and πŸ€— Diffusers with easy to use hardware optimization tools
https://huggingface.co/docs/optimum/main/
Apache License 2.0
2.46k stars 436 forks source link

Add all available ONNX models to ORTConfigManager #351

Open chainyo opened 2 years ago

chainyo commented 2 years ago

This issue is linked to the ONNXConfig for all working group created for implementing an ONNXConfig for all available models. Let's extend our work and try to add all models with a fully functional ONNXConfig implemented to ORTConfigManager.

Adding models to ORTConfigManager will allow πŸ€— Optimum users to boost even more their model with ONNX optimization capacity!

Feel free to join us in this adventure! Join the org by clicking here

Here is a non-exhaustive list of models that have one ONNXConfig and could be added to ORTConfigManager:

This includes only models with ONNXConfig implemented, if your target model doesn't have an ONNXConfig, please open an issue/or implement it (even cooler) in the πŸ€— Transformers repository. Check this issue to know how to do

If you want an example of implementation, I did one for MT5 #341.

You need to check how the attention_heads number and hidden_size arguments are named in the original implementation of your target model in the πŸ€— Transformers source code. And then add it to the _conf dictionary. Finally, add your implemented model to tests to make it fully functional.

mszsorondo commented 1 year ago

To update the list of supported models: BlenderBot, BLOOM, GptBigCode, GPT-NEOX, GPTJ, LongT5, Llama, mBART, M2M100, nystromformer, Pegasus,T5 ,ViT ,Whisper @michaelbenayoun @fxmarty is there still interest in advancing with other models?

chainyo commented 1 year ago

Thanks @mszsorondo I just updated the list based on your comment πŸ™ .