Adding ONNX file of this model

#15
by ivan0703 - opened

Beep boop I am the ONNX export bot 🤖🏎️. On behalf of ivan0703, I would like to add to this repository the model converted to ONNX.

What is ONNX? It stands for "Open Neural Network Exchange", and is the most commonly used open standard for machine learning interoperability. You can find out more at onnx.ai!

The exported ONNX model can be then be consumed by various backends as TensorRT or TVM, or simply be used in a few lines with 🤗 Optimum through ONNX Runtime, check out how here!

Hi @ivan0703 , thank you! The ONNX export for decoder models has been revamped with a version that allows to make use of past key values. I'll upgrade the space and retrigger an export.

fxmarty changed pull request status to merged

Hello @ivan0703 and @fxmarty , I am trying to load this model with "onnxruntime" library. But as I see, there are multiple files with .onnx extension like "encoder.onnx" and "decoder.onnx". I suppose as the T5 being encoder-decoder model, shouldn't it be in the single onnx file?

Will you please guide me through this? How can I load this T5 model with onnxruntime?
Would you please provide me the code to run an inference?
It will be a great help!

Thank you.

Hi @AayushShah , sure, I gave some pointers here: https://huggingface.co/t5-small/discussions/17#64ff0350ed03a2a237d64605

I would also recommend to use netron to easily visualize your ONNX models, and understand inputs/outputs.

Sign up or log in to comment