Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ONNX Export #30

Open
minimaxir opened this issue Jun 4, 2020 · 5 comments
Open

ONNX Export #30

minimaxir opened this issue Jun 4, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@minimaxir
Copy link
Owner

ONNX has good transformers export and is a point of focus for the ONNX team. ONNX exporting may be more useful/flexible than TorchScript (I have a specific secret use case in mind...)

@minimaxir minimaxir added the enhancement New feature or request label Jun 4, 2020
@minimaxir
Copy link
Owner Author

A demo script that allows an ONNX export to support past is available here: huggingface/transformers#4805 (comment)

That may be dependent on #7 though.

@minimaxir
Copy link
Owner Author

@minimaxir
Copy link
Owner Author

ONNX export currently deprioritized by lack of Python 3.9 support, which has become increasingly comment (it will likely be added in the next version of onnx, but no ETA on that.

@minimaxir minimaxir pinned this issue Mar 14, 2021
@minimaxir
Copy link
Owner Author

The latest version of Transformers now explicitly has Python exporting, which removes one of the annoying parts: https://huggingface.co/transformers/serialization.html#onnx-onnxruntime

However, a bunch of generation is tied explicitly to PyTorch, so may have to reevaluate that.

@C00reNUT
Copy link

The latest version of Transformers now explicitly has Python exporting, which removes one of the annoying parts: https://huggingface.co/transformers/serialization.html#onnx-onnxruntime

However, a bunch of generation is tied explicitly to PyTorch, so may have to reevaluate that.

Here is a repo where they combine ONNX model and generation strategies implemented in Transformers - https://github.com/rayhern/convert-gpt2-xl-to-onnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants