'Bart model inference results after converting from hugginface to onnx

I followed the instructions to convert BART-LARGE-CNN model to ONNX here (https://github.com/huggingface/transformers/blob/master/docs/source/serialization.rst) using transformers.onnx script. The model was exported fine and I can run inference.

However, the results of the inference, from the 'last_hideen_state' are in logits (I think)? How can I parse this output for summarization purposes?

Here are screenshots of what I've done.

enter image description here

This is the resulting output from those two states:

enter image description here



Solution 1:[1]

I have implemented fast-Bart. Which essentially converts Bart model from Pytorch to Onnx- with generate capabilities.

fast-Bart

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 siddharth.sharma