Mindket

Unlimited-OCR-2

Newversion 1 · updated

Overview

Baidu's 3.3B document parsing model for long documents, using SR-SWA attention to keep decoding cost nearly flat, with Transformers and SGLang routes. Suits teams digitizing long reports and books.

Unlimited-OCR-2 is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python 3.10, which the card tested with
  • An NVIDIA GPU, since the card tested on an A800 with 80 GB
  • The pinned packages in the command below
Runs in
  • Python with the Transformers library, for quick tests
  • SGLang, which the card recommends for serving
  • vLLM, which the card's news says is supported
  • A hosted demo on Hugging Face Spaces, ModelScope or Baidu Cloud
Start with
pip install torch==2.13.0 torchvision pillow transformers==4.52.1 huggingface-hub==0.36.0 \
  tokenizers==0.21.4 addict==2.4.0 einops==0.8.2 easydict==1.13

About

What it is

Unlimited OCR 2 is a 3.3B parameter model from Baidu that reads document images and turns them into text. It is built for documents that run to hundreds of pages. A new attention scheme, SR-SWA, keeps the working references to a fixed size, for example 512 tokens. Decoding time and memory then stay almost flat however long the document is.

Who it suits

Teams that turn long scanned documents into text, developers who build document pipelines, and researchers who test long document parsing.

IndustryWho uses itHow they use itExample
Finance and legalDocument teamsTurn long scanned reports into textParse a long filing
PublishingArchivistsDigitize books and papersConvert a scanned book
SoftwareDevelopersAdd document parsing to an appCall the model from a Python script
ResearchOCR researchersTest on long document benchmarksTry the MarathonDocBench set

Skip it if you only read short snippets of text, since a lighter tool will do for that.

Where to use it

  • Python with the Transformers library, for quick tests
  • SGLang, which the card recommends for serving
  • vLLM, which the card's news says is supported
  • A hosted demo on Hugging Face Spaces, ModelScope or Baidu Cloud
Use caseWhoWhat they get back
Long document parsingDocument teamsText read from long documents
Quick testDevelopersOutput from a short Transformers script
ServingPlatform teamsA document parsing service built on SGLang

How to set it up

  • Python 3.10, which the card tested with
  • An NVIDIA GPU, since the card tested on an A800 with 80 GB
  • The pinned packages in the command below
  1. Install the pinned packages.
  2. Load the model once in your script.
  3. Feed it document pages and read the text back.
pip install torch==2.13.0 torchvision pillow transformers==4.52.1 huggingface-hub==0.36.0 \
  tokenizers==0.21.4 addict==2.4.0 einops==0.8.2 easydict==1.13
pip install -U huggingface_hub
hf download baidu/Unlimited-OCR-2

How to use it

Load the model and tokenizer once, then pass pages through it. The card text here stops after the loading lines.

import torch
from transformers import AutoModel, AutoTokenizer

model_name = "baidu/Unlimited-OCR-2"
ToolWhat it does
TransformersThe native route, for quick tests
SGLangThe route the card recommends for serving
SR-SWAThe attention scheme that keeps decoding cost flat
hf downloadCopies the repository files to your computer

Example

Feed the pages of a long scanned report through the model. You should get the text of the document back. The card text here does not show the exact output format, so check it on one page first.

For newcomers and experts

If you are new to this, try the hosted demo on Hugging Face Spaces first. Then run the Transformers route on a single page of your own.

If you know the field, SR-SWA compresses the text to visual attention into a fixed set of working references. That bounds the cost of each decoding step and removes the quadratic growth in attention as documents get longer. The card claims top results on MPDocBench and MarathonDocBench.

  1. Document pages go in
  2. The vision side encodes them
  3. SR-SWA keeps a fixed working set
  4. Text is decoded page after page

Good to know

  • The card tested Python 3.10 with the pinned versions above on one A800.
  • The release notes mention vLLM support, ModelScope and Baidu Cloud, and training with ms-swift.
  • The benchmark claims are the authors' own.
  • License: mit.
  • Cost to run: none named, only your own hardware.
  • Data it reaches: the document images you give it. The source names no account, but hosted demos are outside services.
  • Not for: the source names none.

README and files

README

Unlimited-OCR-2

Baidu's 3.3B document parsing model for long documents, using SR-SWA attention to keep decoding cost nearly flat, with Transformers and SGLang routes. Suits teams digitizing long reports and books.

Made by baidu on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

About

What it is: Unlimited OCR 2 is a 3.3B parameter model from Baidu that reads document images and turns them into text. It is built for documents that run to hundreds of pages. A new attention scheme, SR-SWA, keeps the working references to a fixed size, for example 512 tokens. Decoding time and memory then stay almost flat however long the document is.

Who it suits: Teams that turn long scanned documents into text, developers who build document pipelines, and researchers who test long document parsing.

Industry | Who uses it | How they use it | Example
Finance and legal | Document teams | Turn long scanned reports into text | Parse a long filing
Publishing | Archivists | Digitize books and papers | Convert a scanned book
Software | Developers | Add document parsing to an app | Call the model from a Python script
Research | OCR researchers | Test on long document benchmarks | Try the MarathonDocBench set

Skip it if you only read short snippets of text, since a lighter tool will do for that.

Where to use it:

  • Python with the Transformers library, for quick tests
  • SGLang, which the card recommends for serving
  • vLLM, which the card's news says is supported
  • A hosted demo on Hugging Face Spaces, ModelScope or Baidu Cloud
Use case | Who | What they get back
Long document parsing | Document teams | Text read from long documents
Quick test | Developers | Output from a short Transformers script
Serving | Platform teams | A document parsing service built on SGLang

How to set it up:

  • Python 3.10, which the card tested with
  • An NVIDIA GPU, since the card tested on an A800 with 80 GB
  • The pinned packages in the command below
  1. Install the pinned packages.
  2. Load the model once in your script.
  3. Feed it document pages and read the text back.
pip install torch==2.13.0 torchvision pillow transformers==4.52.1 huggingface-hub==0.36.0 \
  tokenizers==0.21.4 addict==2.4.0 einops==0.8.2 easydict==1.13
pip install -U huggingface_hub
hf download baidu/Unlimited-OCR-2

How to use it: Load the model and tokenizer once, then pass pages through it. The card text here stops after the loading lines.

import torch
from transformers import AutoModel, AutoTokenizer

model_name = "baidu/Unlimited-OCR-2"
Tool | What it does
Transformers | The native route, for quick tests
SGLang | The route the card recommends for serving
SR-SWA | The attention scheme that keeps decoding cost flat
hf download | Copies the repository files to your computer

Example: Feed the pages of a long scanned report through the model. You should get the text of the document back. The card text here does not show the exact output format, so check it on one page first.

For newcomers and experts: If you are new to this, try the hosted demo on Hugging Face Spaces first. Then run the Transformers route on a single page of your own.

If you know the field, SR-SWA compresses the text to visual attention into a fixed set of working references. That bounds the cost of each decoding step and removes the quadratic growth in attention as documents get longer. The card claims top results on MPDocBench and MarathonDocBench.

Document pages go in
The vision side encodes them
SR-SWA keeps a fixed working set
Text is decoded page after page

Good to know:

  • The card tested Python 3.10 with the pinned versions above on one A800.
  • The release notes mention vLLM support, ModelScope and Baidu Cloud, and training with ms-swift.
  • The benchmark claims are the authors' own.
  • License: mit.
  • Cost to run: none named, only your own hardware.
  • Data it reaches: the document images you give it. The source names no account, but hosted demos are outside services.
  • Not for: the source names none.

On Hugging Face, 13 November 2026

  • Task: image text to text
  • Library: transformers
  • Parameters: 3.3B
  • Weights: about 6.7 GB in BF16; about 1.7 GB at 4-bit (estimate)
  • Formats: Safetensors
  • Downloads in the last 30 days: 519,371
  • Likes: 684
  • License: mit
  • Quantized versions: 17
  • Fine-tunes: 5
  • Tags: transformers, safetensors, unlimited-ocr, feature-extraction, baidu, vision-language, image-text-to-text, multilingual

Links

Get the model

Download its files with Hugging Face's command line:

pip install -U huggingface_hub
hf download baidu/Unlimited-OCR-2

Then follow the usage in its model card. Nothing in this kit runs by itself.

Files
README.md  5 KB

1 file, 5 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
Unlimited-OCR-2 This page519,3716843.3Bmit
Unlimited-OCRShares baidu · vision-language · multilingual5,833,2925,0043.3Bmit
Unlimited-OCR-2-GGUFShares unlimited-ocr · vision-language · multilingual8,45282.9Bmit
paraphrase-multilingual-MiniLM-L12-v2Shares multilingual · feature-extraction · transformers26,540,1251,505118Mapache-2.0
harrier-oss-v1-0.6bShares multilingual · feature-extraction · transformers218,439338596Mmit
voyage-4-nanoShares multilingual · feature-extraction · transformers90,118152346Mapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

wonderskyUnlimited-OCR-2: Baidu open-sources an OCR model for unlimited-horizon parsing11 pointsTech TrendingBaidu、数百ページの長文も高速OCRできる「Unlimited OCR 2」公開 https://pc.watch.impress.co.jp/docs/news/2152310.html2 likes@strike007.bsky.social3. baidu/Unlimited-OCR-2 https://huggingface.co/baidu/Unlimited-OCR-2 (4/6)1 reply@strike007.bsky.socialAsynchronous sampling in LLM reinforcement learning creates a training-inference mismatch driven by inference engine numerics and stale weights, turning on-policy training data off-policy.1 likeデイリーHuggingFaceトレンド今日のHuggingFaceトレンド baidu/Unlimited-OCR-2デイリーHuggingFaceトレンド今日のHuggingFaceトレンド baidu/Unlimited-OCR-2 Unlimited OCR Works 2を提供するためのリポジトリです。 単一ページから複数ページにわたる文書まで、ページを跨いだ文脈を保持したまま解析できるUnlimited-Horizon Parsingを実現しています。 TransformersやSGLangを用いた推論をサポートし、高度なOCR処理を目的としています。猫国防Unlimited OCR Works 2: Pioneering the OCR-3.0 Era: From Long- to Unlimited-Horizon Parsing 百度的光学字符识别 Unlimited OCR 模型升级版 - 保持每一步解码的延迟和内存占用几乎保持恒定,不被文档长度影响 - 无限上下文识别 - 到达同类模型的顶尖水平 GitHub: github.com/baidu/Unlimi... Hugging Face: huggingface.co/baidu/Unlimi... ModelScope: modelscope.cn/models/Paddl...デイリーHuggingFaceトレンド今日のHuggingFaceトレンド baidu/Unlimited-OCR-2feedreader BotPC Watch: Baidu、数百ページの長文も高速OCRできる「Unlimited OCR 2」公開

Searched

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Developer

See all in Developer

Lexnet

alpindale · Kit

Tags every character of C source code for syntax highlighting with a tiny neural network of about 984 weights, run through a small C program. For developers an…

New

FLUX.2 Klein LoRA Studio

prithivMLmods · Kit

Try a set of LoRAs for the FLUX.2 Klein image model in a Gradio app that runs in your browser or on your own computer. Made for people who make or test AI imag…

New

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New