optimum
optimum copied to clipboard
Add support for Ernie model
Solve #555 This submission enables optimum to support the Ernie family model and support onnxruntime export of related models. The onnx code related to this model has been verified.
https://github.com/huggingface/transformers/tree/main/src/transformers/models/ernie
Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you make sure to update the documentation with your changes?
- [x] Did you write any new necessary tests?
@BrightXiaoHan Could you add ernie as well to https://github.com/huggingface/optimum/blob/7e08a820b65a359a61444abe51df4eb96b26b2e3/tests/exporters/exporters_utils.py#L82 ? Also can you use https://huggingface.co/hf-internal-testing/tiny-random-ErnieModel instead of https://huggingface.co/hf-internal-testing/tiny-random-ErnieMModel? They appear to be two different model types in transformers and the test currently fail due to this.