It seems you are encountering a common issue when trying to convert Hugging Face models to ONNX format using Olive. The error message ValueError: Unable to get dummy inputs for the model typically indicates that the model you are trying to convert does not have the necessary configuration for input extraction, which is often required for the conversion process.
Here are some steps you can take to troubleshoot and potentially resolve this issue:
- Check Model Compatibility: Ensure that the models you are trying to convert are compatible with the version of Olive you are using. Some models may require specific configurations or may not yet be supported.
- Install Optimum: Make sure you have the latest version of the Optimum library installed, as it provides additional support for model export. You can install it using:
pip install optimum - Define
io_config: If the models you are using require it, you may need to manually define anio_configfor the models. This configuration helps Olive understand how to handle the inputs and outputs of the model. - Consult Documentation: Refer to the official Microsoft documentation for any updates or notes regarding the models you are using. Sometimes, specific models may have known issues or additional requirements.
- Community Support: If the issue persists, consider reaching out to the community through forums or GitHub issues, as other users may have encountered similar problems and can offer solutions.
By following these steps, you should be able to address the error and successfully convert your Hugging Face models using Olive.
References: