ONNX Model Zoo

aoiandroid/got-ocr2-onnx

By aoiandroid · ↓ 0 · ♥ 0 · Updated 2026-02-16

What's in this repo

This page lists the files in aoiandroid/got-ocr2-onnx, including got_ocr2_decoder.onnx, got_ocr2_vision_encoder.onnx.

  • 2 ONNX models (.onnx files)
  • 8 files, including 3 .json, 2 .onnx, 1 .md, 1 .data
  • Last updated 2026-02-16

ONNX files

File Size Download
got_ocr2_decoder.onnx — Download
got_ocr2_vision_encoder.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

GOT-OCR2 ONNX Export (stepfun-ai/GOT-OCR2_0)

This directory contains ONNX exports produced from stepfun-ai/GOT-OCR2_0 using BaofengZan/GOT-OCRv2-onnx (llm-export).

Contents

  • got_ocr2_vision_encoder.onnx (+ .onnx.data): Vision encoder. Input: images; output: visual features. Ready for use with TranslateBlue's GOT-OCR2 ONNX integration.
  • got_ocr2_decoder.onnx (optional): Single decoder ONNX; when present, full OCR runs: image → vision encoder → encoder_hidden_states → decoder (BOS then autoregressive) → logits → text. Produce it with scripts/export_got_ocr2_decoder_onnx.py.
  • tokenizer.json, tokenizer_config.json: Tokenizer for decode. Generated from the Hugging Face model vocab.
  • Split decoder (for reference; app does not load these as a single decoder):
    • embedding.onnx, block_0.onnx .. block_23.onnx, lm.onnx, norm.onnx, mm_projector_vary.onnx (each with .onnx.data where applicable).

App compatibility

TranslateBlue's GOTOCR2OCRService expects two ONNX files:

  1. got_ocr2_vision_encoder.onnx – present; you can run the vision encoder in the app.
  2. got_ocr2_decoder.onnx – a single decoder ONNX that takes decoder_input_ids and encoder_hidden_states and outputs logits. When this file is present (e.g. from scripts/export_got_ocr2_decoder_onnx.py), full OCR runs: vision encoder → encoder_hidden_states → decoder (with BOS then autoregressive tokens) → logits → decoded text.

See Docs/GOT_OCR2_ONNX_Export.md for I/O names and export options.

Model info

onnx region:us
↓ 0 ♥ 0

Created: 2026-02-16

Updated: 2026-02-16

View on Hugging Face

Files (8)

.gitattributes
README.md
got_ocr2_decoder.onnx ONNX
got_ocr2_vision_encoder.onnx ONNX
got_ocr2_vision_encoder.onnx.data
special_tokens_map.json
tokenizer.json
tokenizer_config.json

Related models