
Picture published by the creator on Hugging Face.
Unlimited-OCR-2: Turn long multi-page documents into text
Added · Updated
Made by BAIDU
View profile on Hugging Face (opens in a new tab)Convert page images of long documents into text, with all pages read together in one request.
For developers who extract text from long documents.
Model details
Original model baidu/Unlimited-OCR-2
Input Image or text Output Text
Ways to use it Browser demo · Run locally
What it does
It is an OCR model, meaning it reads text from images of pages. Its Sparse Reference Sliding Window Attention keeps a fixed-size set of working references, for example 512 tokens, so speed per step and memory stay nearly constant however long the document gets. Multi-page mode parses all pages together for cross-page context.
How to use it
Try the hosted demo on Hugging Face first. To run it yourself, load the weights with Transformers for quick tests: pass page images in order to the multi-page function, or one image to the single-page function. For serving many requests, the source recommends SGLang. It is also available on ModelScope and Baidu Cloud.
Common use cases
- Pass the scanned page images of a multi-page report in order and get one text output per page, in the same order.
- Give it one page image and get its text back; the page is split into tiles automatically (gundam mode).
- Convert a long PDF to page images with PyMuPDF, send them to an SGLang server, and get the parsed text back.
Can I use this?
Requirements Tested with Python 3.10, torch 2.13.0 and transformers 4.52.1. The SGLang route uses a Python 3.10 environment managed by uv, a customized SGLang package (wheel) and PyMuPDF. Downloading the weights needs no access request.
Caveat When serving with SGLang, the source warns that reserving a 0.75 memory share leaves too little headroom at 32 or more simultaneous requests.
Worth knowing Licensed under MIT. It reads page images, so PDFs are converted to images first; the SGLang setup installs PyMuPDF for that.
Why it's here
Not trending this week
Last seen on the Hugging Face trending list on 4 November 2026. It stays on BuildTube so you can still find it.
- 650 people have liked it on Hugging Face.
- It was downloaded 390,927 times in the last 30 days.
Numbers checked on 8 November 2026; not refreshed since.
Behind it
View model pageBuildTube has not run or verified this project. Everything above is written from what the creator published.
Made this?
Quick questions
- What is Unlimited-OCR-2?
- It is an OCR model, meaning it reads text from images of pages.
- What can I use Unlimited-OCR-2 for?
- Pass the scanned page images of a multi-page report in order and get one text output per page, in the same order; Give it one page image and get its text back; the page is split into tiles automatically (gundam mode); Convert a long PDF to page images with PyMuPDF, send them to an SGLang server, and get the parsed text back
- Can I run Unlimited-OCR-2 on my computer?
- It runs on your own hardware with a model runtime. The model card mentions Transformers, vLLM, SGLang; check its setup and hardware notes.
- What do I need to use Unlimited-OCR-2?
- Python 3.10 with Transformers, or a customized SGLang build for serving. Tested on an NVIDIA A800 80GB GPU; minimum hardware needs are not documented.
- What license does Unlimited-OCR-2 use?
- Licensed under MIT.
More from this week
- Idol Turn one picture of an object into a 3D Gaussian splat
Idol turns one photo, render or generated image of an object into a 3D Gaussian splat file.
- P-H3-Image-Comfy Make and edit 8-megapixel images in ComfyUI
Turn short text requests into 8-megapixel images and edit pictures on your own graphics card.
- agent-desktop Let AI agents read and click desktop apps
For developers building computer-use agents: agent-desktop lets an AI agent read and operate desktop apps on Mac, Windows or Linux from a command line.
Explore by topic
Post this
Download share imageFor makers
Made this? Show it’s on BuildTube — add the badge to your README or embed the card on your site.
README badge (Markdown)
[](https://buildtube.app/p/hf-baidu-unlimited-ocr-2/)Embed card (HTML)
<iframe src="https://buildtube.app/embed/hf-baidu-unlimited-ocr-2/" width="560" height="240" style="border:0;max-width:100%" loading="lazy" title="Unlimited-OCR-2 on BuildTube"></iframe>