Downloads · 30 days
15
1% of all-time downloads
pszemraj/nougat-small-onnx
nougat-small-onnx is a image-text-to-text model from pszemraj. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-4.0.
https://huggingface.co/facebook/nougat-small but exported to onnx. This is not quantized.
Downloads · 30 days
15
1% of all-time downloads
All-time downloads
1.1K
Public
Repo size
1.7 GB
Likes
2
Public
Click a slice to open those files.
.onnx1.7 GB · 100%
From the Hugging Face model README
https://huggingface.co/facebook/nougat-small but exported to onnx. This is not quantized.
from transformers import NougatProcessor
from optimum.onnxruntime import ORTModelForVision2Seq
model_name = 'pszemraj/nougat-small-onnx'
processor = NougatProcessor.from_pretrained(model_name)
model = ORTModelForVision2Seq.from_pretrained(
model_name,
provider="CPUExecutionProvider", # 'CUDAExecutionProvider' for gpu
use_merged=False,
use_io_binding=True
)
on colab CPU-only (at time of writing) you may get CuPy errors, to solve this uninstall it:
pip uninstall cupy-cuda11x -y
See here or this basic notebook I uploaded. It seems ONNX brings CPU inference times to 'feasible' - it took ~15 mins for Attention is All You Meme on Colab free CPU runtime.