ALBERT
BART
BERT
CamemBERT
DistilBERT
GPT Neo
I-BERT
LayoutLM
Longformer
Marian
mBART
OpenAI GPT-2
RoBERTa
T5
XLM-RoBERTa
The ONNX conversion is supported for the PyTorch versions of the models. If you
would like to be able to convert a TensorFlow model, please let us know by
opening an issue.
In the next two sections, we'll show you how to:
Export a supported model using the transformers.onnx package.
Export a custom model for an unsupported architecture.
Exporting a model to ONNX
To export a 🤗 Transformers model to ONNX, you'll first need to install some
extra dependencies:
bash
pip install transformers[onnx]
The transformers.onnx package can then be used as a Python module:
```bash
python -m transformers.onnx --help
usage: Hugging Face Transformers ONNX exporter [-h] -m MODEL [--feature {causal-lm, ...}] [--opset OPSET] [--atol ATOL] output
