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.53k stars 453 forks source link

Support for gemma2-2b-it(gemma 2nd version) Model Export in Optimum for OpenVINO #2006

Open chakka12345677 opened 1 month ago

chakka12345677 commented 1 month ago

Feature request

please provide Support for gemma2 Model Export in Optimum for OpenVINO version:optimum(1.21.4) transformers:4.43.4

Motivation

I encountered an issue while trying to export a gemma2 model using the optimum library for ONNX export. The error message suggests that the gemma2 model is either a custom or unsupported architecture, and I need to provide a custom export configuration.

error:raise ValueError( ValueError: Trying to export a gemma2 model, that is a custom or unsupported architecture, but no custom export configuration was passed as custom_export_configs. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum-intel/issues if you would like the model type gemma2 to be supported natively in the OpenVINO export

Your contribution

It would be great if support for the gemma2 model could be added natively in the optimum library for OpenVINO export. Alternatively, detailed guidance on how to create a custom export configuration for this model would be appreciated.i

yonkel commented 1 week ago

+1, adding ONNX support for gemma-2 models would be appreciated