
TL;DR
Baidu releases Unlimited OCR, an open-source vision-language model that parses 100+ page documents in a single pass without memory blowup. Here's what developers need to know.
Baidu has open-sourced Unlimited OCR, a vision-language model designed to transcribe long documents in a single pass. The project hit the Hacker News front page with 310 points and sparked a surprisingly heated debate about whether OCR is actually a solved problem.
Spoiler: it is not.
Last updated: June 23, 2026
For the broader runtime decision that compares this with Mistral's launch, read Mistral OCR 4 and Unlimited OCR make document parsing an agent runtime choice. This post stays focused on Baidu's open long-document approach.
The core innovation is architectural. When you feed a 100-page PDF to a typical vision-language model, the KV cache (the model's short-term memory of what it has already transcribed) grows linearly. This means memory consumption explodes and generation slows to a crawl. Developers have historically worked around this by chunking documents page-by-page, processing them separately, and stitching the text back together - a janky approach that loses cross-page context.
Unlimited OCR introduces Reference Sliding Window Attention (R-SWA) to split the model's attention into two paths:
The result: O(1) memory consumption for output generation, regardless of document length.
That claim matters most for document-agent workloads. A support agent, legal review tool, research assistant, or internal knowledge base does not only need text. It needs long documents parsed without quietly losing cross-page context. That is the same ingestion problem behind RAG with Claude: retrieval quality is capped by source preparation.
The model supports two processing modes:
The system implements n-gram repetition blocking (window sizes of 128 for single images, 1024 for multi-page documents) to prevent the model from getting stuck in repetitive output loops.
Requirements:
You can run inference via HuggingFace Transformers directly or deploy an OpenAI-compatible API server via SGLang. The model is available on both HuggingFace (baidu/Unlimited-OCR) and ModelScope.
That makes Unlimited OCR more of a developer runtime surface than a packaged document platform. If you need workflow UI, validation queues, deployment controls, or business extraction templates, a higher-level parser like Unstract still sits above the OCR layer.
Newsletter
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools, delivered free every week.
From the archive
Jun 23, 2026 • 6 min read
Jun 22, 2026 • 6 min read
Jun 22, 2026 • 5 min read
Jun 22, 2026 • 8 min read
The Hacker News discussion immediately split into two camps.
The "OCR is solved" camp pointed to existing vision models:
"OCR has been solved long time ago with vision models. Solutions are consistent, reliable, and stable."
They were quickly corrected by practitioners who work with OCR daily:
"I've been working on Parseur for the last 10 years, and OCR has not been solved yet, let me tell you. OCR still sucks in 2026."
The most nuanced take came from commenters who distinguished between different OCR tasks:
"If you try to OCR hand-filled forms with a fixed structure, traditional OCR models are great. But if you are trying to ingest diverse documents with headings, multi-column layouts, headers and footers, ad space in the middle of your text, etc, vision-llms are a giant step forward."
The "OCR is too expensive" camp raised valid concerns about cost and speed:
"Traditional OCR is faster, cheaper, and much more reliable than LLMs"
But others countered with specific examples where LLM-based OCR works:
"I found that feeding it to Claude Sonnet 4.x via API gave me results that were perfect. No corrections required. So perfect, that Claude was reading along with the story, and actually pointed out a continuity error in the story."
The hallucination concern was raised multiple times. LLM-based OCR can "improve" text by filling in what it thinks should be there rather than what the document actually says:
"A simple example is words that are supposed to be in other languages being automatically translated to English, which ruins the effect"
One commenter reported Unlimited OCR working well for Japanese grammar PDFs: "It has converted about 200 pages in an hour" on a 4090.
The music notation thread was unexpected. A jazz musician derailed the conversation into a discussion of optical music recognition (OMR), which remains far behind text OCR. LLMs understand music theory well enough when described in text, but reading sheet music is still "basically a greenfield for AI wherever you look."
Based on the discussion, here is a rough hierarchy:
For simple, structured forms with clean scans:
For complex documents with mixed layouts:
For multi-page documents where context matters:
For production pipelines:
For general vision extraction, the Claude Vision API production guide covers the other side of the choice: use a broader multimodal model when the task is visual reasoning, not only page transcription.
The paper (arXiv:2606.23050) acknowledges that using an LLM decoder for OCR is a double-edged sword. The language prior helps correct errors and handle degraded inputs, but the accumulated memory load makes long documents impractical. R-SWA is an elegant architectural fix that keeps the benefits while eliminating the scaling problem.
For developers building document processing pipelines, this is another tool in the toolkit. The fact that it is open-source (Apache 2.0) and runnable locally is significant - you can actually iterate on edge cases rather than filing support tickets.
The HN discussion also surfaced a useful tool comparison: Marker, Mistral OCR, Docling, Azure Document Intelligence, Textract, and now Unlimited OCR. If you are in the market for document parsing, run your actual documents through a few of these before committing.
This is especially true for archives and search products. The SNEWPAPERS agentic search writeup is a good reminder that OCR is only one stage. Layout segmentation, indexing, metadata, retrieval, and source-visible UI all decide whether the final agent can be trusted.
Unlimited OCR is Baidu's open-source vision-language model for long-document OCR. It is designed to parse multi-page documents without the generation memory growing linearly with document length.
The key idea is Reference Sliding Window Attention. The model keeps access to the document image while limiting how much generated text history it carries forward, which targets long-document memory blowup.
Treat it as a promising open model to benchmark, not a full production document platform. You still need serving, validation, confidence checks, human review for low-confidence fields, and operational monitoring.
Use Unlimited OCR when open deployment and long-document experimentation matter. Use a packaged OCR or document API when you need pricing, SLAs, batch processing, model cards, and production support.
OCR quality sets the floor for retrieval. If page structure, table boundaries, language, or references are lost during parsing, the retriever and final agent cannot reliably recover them later.
Read next
DeepReinforce AI released Ornith-1.0, a family of open-source coding models claiming self-improvement. The HN thread reveals a mix of skepticism and genuine interest - here is what the model actually does and whether the hype holds up.
7 min readMistral OCR 4 and Baidu's Unlimited OCR both hit Hacker News today. The useful takeaway for developers is that OCR is no longer just text extraction. It is becoming a runtime decision for document agents.
8 min readThe Godot Foundation has established a policy banning autonomous AI agent code and substantial AI-generated contributions, citing reviewer burnout and concerns about maintainer mentorship.
6 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
DeepSeek's reasoning-first model built for agents. First model to integrate thinking directly into tool use. Ships along...
View ToolOpen-source autonomous coding agent inside VS Code. Creates files, runs commands, and can use a browser for UI testing a...
View ToolGoogle's open-source coding CLI. Free tier with Gemini 2.5 Pro. Supports tool use, file editing, shell commands. 1M toke...
View ToolOpen-source terminal agent runtime with approval modes, rollback snapshots, MCP servers, LSP diagnostics, and a headless...
View ToolTrack open-source maintenance signals, release tasks, and repo follow-ups in one dashboard.
View AppShare agent traces with a link. Keep history long enough to find the bug.
View AppTurn API documentation and OpenAPI specs into typed SDK plans and demo checklists.
View AppInstall the dd CLI and scaffold your first AI-powered app in under a minute.
Getting StartedConfigure Claude Code for maximum productivity -- CLAUDE.md, sub-agents, MCP servers, and autonomous workflows.
AI AgentsWhat MCP servers are, how they work, and how to build your own in 5 minutes.
AI Agents
In this video, I introduce Unstract, an AI-powered no-code platform for automating the processing of large unstructured documents like PDFs, images, and scanned files. I discuss the challenges...

In this video, I am excited to introduce FireGeo, an AI-powered brand visibility platform designed to kickstart your SaaS application. FireGeo leverages advanced tools such as Firecrawl for...

Github ⭐ https://github.com/mendableai/fire-enrich Introducing Fire Enrich: Open Source Email Enrichment Tool Explained In this video, I'm thrilled to announce Fire Enrich, an open-source...

An 82M parameter text-to-speech model that runs on CPU and produces high-quality speech across multiple languages - no c...

DeepReinforce AI released Ornith-1.0, a family of open-source coding models claiming self-improvement. The HN thread rev...

Semgrep's security research team benchmarked LLMs on IDOR vulnerability detection. The open-weight GLM 5.2 beat Claude C...

Vercel acquires the open-source authentication framework that became the go-to Next.js auth solution. HN weighs in on op...

A CS student built 30papers.com to make Ilya's legendary ML reading list more accessible. HN has thoughts on the source,...

IEEE Spectrum reports on pharmaceutical AI running on handheld devices. HN debates emergency kits, domain-specific model...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.