huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
134.68k stars 26.93k forks source link

XGLM onnx support #17422

Closed FrankHeijden closed 2 years ago

FrankHeijden commented 2 years ago

Feature request

I am trying to convert an XGLM based model using the following command, but am receiving an error that onnx does not support an XGLM based model:

./venv/bin/python -m transformers.onnx --model=facebook/incoder-1B onnx/

Error:

KeyError: "xglm is not supported yet. Only ['albert', 'bart', 'beit', 'bert', 'big-bird', 'bigbird-pegasus', 'blenderbot', 'blenderbot-small', 'camembert', 'convbert', 'data2vec-text', 'deit', 'distilbert', 'electra', 'flaubert', 'gpt2', 'gptj', 'gpt-neo', 'ibert', 'layoutlm', 'marian', 'mbart', 'mobilebert', 'm2m-100', 'roberta', 'roformer', 't5', 'vit', 'xlm-roberta'] are supported. If you want to support xglm please propose a PR or open up an issue."
LysandreJik commented 2 years ago

cc @lewtun

lewtun commented 2 years ago

Hey @FrankHeijden, indeed this architecture is not yet supported in the ONNX exporter. If you'd like to have a go at it yourself, you can follow this guide and use the BartOnxxConfig as a template to work from (I think this model should be similar)

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.