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 conversion script. #4176

Closed
wants to merge 7 commits into from
Closed

ONNX conversion script. #4176

wants to merge 7 commits into from

Conversation

mfuntowicz
Copy link
Member

This PR adds conversion script to export our models to ONNX IR.

Plan is to support both PyTorch and TensorFlow:

  • PyTorch
  • TensorFlow

TensorFlow currently blocked because of an issue in the conversion script provided by ONNX (seems fixed on master : onnx/tensorflow-onnx#876)

from transformers.tokenization_utils import BatchEncoding


class OnnxConverterArgumentParser(ArgumentParser):
Copy link
Member

@julien-c julien-c May 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you can maybe use HfArgumentParser which is dataclass-based and may be more compact (and more IDE-friendly)

Up to you though, this works too :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants