alt.freeweights.vision / nougat-latex-base-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject:

nougat-latex-base-ONNX

Date: 2026-11-15Commit: 114e14fSigned: 2DC28CC7B26A283B ✓

Image to text model. Onnx weights, 4.25 GB in all. Published by onnx-community under Apache-2.0.

vision4.25GBnougat-latex-base-ONNXonnxpermissive
FactsParamsnot statedSize4.25 GBFormatsonnxTaskimage to textLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/nougat-latex-base-ONNX
# manifest sha256 29581845fcbb… · 4.25 GB · 25 files
$ fw verify ./nougat-latex-base-ONNX onnx-community/nougat-latex-base-ONNX
From sourceHosted (signed)onnx-community/nougat-latex-base-ONNXLast check: 2026-11-15 05:26 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of nougat-latex-base.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Scan with

Overview

Size
4.25 GB
Weights
44.7 MB (smallest of 16 ONNX variants)
Parameters
not stated
Formats
onnx
Task
image to text
License
Apache-2.0 (permissive)
Files
25, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: Norm/nougat-latex-base

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:26 UTCpassed

Model card

From the publisher at commit 114e14f. Shown as plain text with links; images open at the publisher.

nougat-latex-base (ONNX)#

This is an ONNX version of Norm/nougat-latex-base. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for image-to-text: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.ImageToTextPipeline


Nougat-LaTeX-based#

Nougat-LaTeX-based is fine-tuned from facebook/nougat-base with im2latex-100k to boost its proficiency in generating LaTeX code from images. Since the initial encoder input image size of nougat was unsuitable for equation image segments, leading to potential rescaling artifacts that degrades the generation quality of LaTeX code. To address this, Nougat-LaTeX-based adjusts the input resolution and uses an adaptive padding approach to ensure that equation image segments in the wild are resized to closely match the resolution of the training data.

Evaluation#

Evaluated on an image-equation pair dataset collected from Wikipedia, arXiv, and im2latex-100k, curated by lukas-blecher

modeltoken_acc ↑normed edit distance ↓
pix2tex0.53460.10312
pix2tex*0.600.10
nougat-latex-based0.6238500.06180

pix2tex is a ResNet + ViT + Text Decoder architecture introduced in LaTeX-OCR.

pix2tex*: reported from LaTeX-OCR; pix2tex: my evaluation with the released checkpoint ; nougat-latex-based: evaluated on results generated with beam-search strategy.

Requirements#

pip install transformers >= 4.34.0

Uses#

The inference API widget sometimes cuts the response short. Please check this issue for more details. You may want to run the model yourself in case the inference API bug cuts the results short.

  1. Download the repo
git clone git@github.com:NormXU/nougat-latex-ocr.git
cd ./nougat-latex-ocr
  1. Inference
import torch
from PIL import Image
from transformers import VisionEncoderDecoderModel
from transformers.models.nougat import NougatTokenizerFast
from nougat_latex import NougatLaTexProcessor

model_name = "Norm/nougat-latex-base"
device = "cuda" if torch.cuda.is_available() else "cpu"
# init model
model = VisionEncoderDecoderModel.from_pretrained(model_name).to(device)

# init processor
tokenizer = NougatTokenizerFast.from_pretrained(model_name)

latex_processor = NougatLaTexProcessor.from_pretrained(model_name)

# run test
image = Image.open("path/to/latex/image.png")
if not image.mode == "RGB":
    image = image.convert('RGB')

pixel_values = latex_processor(image, return_tensors="pt").pixel_values

decoder_input_ids = tokenizer(tokenizer.bos_token, add_special_tokens=False,
                              return_tensors="pt").input_ids
with torch.no_grad():
    outputs = model.generate(
        pixel_values.to(device),
        decoder_input_ids=decoder_input_ids.to(device),
        max_length=model.decoder.config.max_length,
        early_stopping=True,
        pad_token_id=tokenizer.pad_token_id,
        eos_token_id=tokenizer.eos_token_id,
        use_cache=True,
        num_beams=5,
        bad_words_ids=[[tokenizer.unk_token_id]],
        return_dict_in_generate=True,
    )
sequence = tokenizer.batch_decode(outputs.sequences)[0]
sequence = sequence.replace(tokenizer.eos_token, "").replace(tokenizer.pad_token, "").replace(tokenizer.bos_token, "")
print(sequence)

Files

25 files · 4.25 GBWeights 44.7 MB (smallest of 16 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 25 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md4.32 KB01dd152737143ca4def7d60c124969ccc64f4891ec9d9a352a665431c187b232
config.json4.97 KBebedd59b5a09ce86b7c002259115f49511419747b66c83f024da777c08393718
generation_config.json160 Be1fb3955c8cd5cdb8966d3fdf2880809edc8b4bbc895da04c7a19065a9ebc954
onnx/decoder_model.onnx1.10 GBcdcde32749f6980b16d71927d02d7242ef0495417a575c3fbeeeeaf8f7d5442e
onnx/decoder_model_bnb4.onnx346 MBf62f5994e2ca7c8cd3cb80d6de64231578aeb2500ac4bd5ce29b6d299bd136bf
onnx/decoder_model_fp16.onnx549 MB93e2491a9b87626b70f80fcd59843ba7337ce74fa6294a708cac6af8c692b43c
onnx/decoder_model_int8.onnx276 MB93b1617bd267ab213594e49bf61eb84c2578ae3f5bf68e21fbc38e69c5e153b4
onnx/decoder_model_q4.onnx360 MB087e0249dea1c5938a3d3d559cb48d795b634c42531714b6146aa0fdfb1293d3
onnx/decoder_model_q4f16.onnx235 MBe271ff4cba446e366fdd6895842d1efd3bd5a849ed0349e9763e3b9c45333c28
onnx/decoder_model_quantized.onnx276 MB93b1617bd267ab213594e49bf61eb84c2578ae3f5bf68e21fbc38e69c5e153b4
onnx/decoder_model_uint8.onnx276 MB5a00cc8c15dd4a897503d48d652eed2c4844e60a3b3779cab2d41581e2984fdb
onnx/encoder_model.onnx301 MBd4dfdc8cd48cf8337862dda20a1f229d5c93aacc1952d16c29cc2ffe90712522
onnx/encoder_model_bnb4.onnx46.5 MB172132128789ee845415e4e1146be5267ece59c9980eb645271ccb2fd197c291
onnx/encoder_model_fp16.onnx151 MB6864d21c2ef741f597eea501db6596e594c28526e11d7b9dee2c272ff1f82daa
onnx/encoder_model_int8.onnx78.9 MB3aa7c3430dcf5cc3138a2d5188c6a3670ee36fe7d828f27bdd82213b64043c6a
onnx/encoder_model_q4.onnx51.1 MBe95f3c07998144ba5d23952ead270cf91d0c5bfb730fd70b064166266be3eb2f
onnx/encoder_model_q4f16.onnx44.7 MB1984ac07471159a3c2f09d8fc3f10ed3571d8615fd7d43756ae533828d9354ee
onnx/encoder_model_quantized.onnx78.9 MBf3020f027fd2e2e27b751185ed1c4ff4352cd3e6a8326ebec7b4cb2e83296b8a
onnx/encoder_model_uint8.onnx78.9 MBf3020f027fd2e2e27b751185ed1c4ff4352cd3e6a8326ebec7b4cb2e83296b8a
preprocessor_config.json480 B7c00034d195c4b1f509dda3bde4854d5be675a593223fab00ad8fd4cc9dbf472
quantize_config.json312 B70f61db8708568fa3ee6e66ecbcfdb8a89b9069feadff679dea00b097e521c98
special_tokens_map.json552 B358c249e2fb29060c6b73157d428853b0c48710deffc8ee670ab1013880946c9
tokenizer.json3.58 MB701677254ccdbbd1ebd4b8aab98fcbce4c3ab07e7809a70172b2ee5194148a87
tokenizer_config.json4.51 KBc3725638faefedbd3606816f024baea40d15e126e763b7eb68a0cb8a33f7081d
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
114e14f31d pinned now2026-11-15 05:26 UTC25 files · 4.25 GB

Use it

$ fw get onnx-community/nougat-latex-base-ONNX
# manifest sha256 29581845fcbb… · 4.25 GB · 25 files
$ fw verify ./nougat-latex-base-ONNX onnx-community/nougat-latex-base-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/nougat-latex-base-ONNX.json --dir ./nougat-latex-base-ONNX $ python3 fw.py verify ./nougat-latex-base-ONNX ./onnx-community__nougat-latex-base-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/nougat-latex-base-ONNX --revision 114e14f31dc155a098ba4cfd32124e031251f759 --local-dir ./nougat-latex-base-ONNX

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
01dd152737143ca4def7d60c124969ccc64f4891ec9d9a352a665431c187b232
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject: nougat-latex-base-ONNXDate: 2026-11-15Commit: 114e14fSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/nougat-latex-base-ONNX
Pinned commit
114e14f31dc155a098ba4cfd32124e031251f759
Manifest
nougat-latex-base-ONNX.json · .minisig
Manifest sha256
29581845fcbb8bc08971b3b7e5fcc7d08f7df407f5bd8baa6846f18b944cde88
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:26 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/nougat-latex-base-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/nougat-latex-base-ONNX.json.minisig $ minisign -Vm nougat-latex-base-ONNX.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

Norm/nougat-latex-base · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/nougat-latex-base-ONNX
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. nougat-latex-base-ONNX.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX