How to Turn Any PDF Into Clean Text for Free With OCRia-nano-1

You have a scanned PDF. Maybe it is an old contract, an invoice, a bank statement, or a chapter of a book someone scanned ten years ago. You need the text inside it, clean and searchable, so you can quote it, search it, or feed it to an AI. Until recently your free options were slow, rough, or both.

Now there is a new free option, and it is surprisingly small. OCRia-nano-1 is an 8.1-million-parameter document reader from LlamaIndex, released on 23 November 2026. It runs on a plain laptop CPU, no GPU, no cloud, no per-page bill, and it turns a scanned PDF into clean Markdown in about half a second a page. Three commands and you are done.

Here is the honest part, and it belongs at the top. It only runs inside LlamaIndex's LiteParse tool. There is no standalone app and no double-click program. It is a first-pass reader for everyday documents, not a specialist for complex charts and formulas. And the weights are NOT Apache 2.0. Commercial use is free only for small organisations, under 2 million dollars of annual revenue and under 2 million dollars of total funding, with one more exclusion explained below. If those catches still leave you with a tool you can use, and for most readers they will, this tutorial gives you the exact three commands.

What is OCR, and why does this tiny model beat the old free default?

OCR, optical character recognition, is the job of looking at a picture of text and writing out the words. A scanner makes a photo of a page. OCR turns that photo back into text you can copy, search, and edit. Good OCR also rebuilds the structure: which line is a heading, where a table starts and ends, which text belongs in which column.

For years the free default for this job was Tesseract, an open-source OCR engine that is solid, old, and free. It still works, and LiteParse still ships it as an option. But on LlamaIndex's own benchmark, ParseBench-2, LiteParse with Tesseract scores 48.7, while LiteParse with OCRia-nano-1 scores 59.2. The gap is biggest where it matters most for real documents: tables score 59.5 with nano-1 against 36.2 with Tesseract, and layout scores 72.4 against 49.4. Speed improves too: 426 milliseconds per page on a single CPU core, against 751 for Tesseract, and 27.8 pages per second on 16 virtual CPUs.

Those numbers come from LlamaIndex itself, from its own benchmark and its own technical report. Nobody independent has published a check yet, so treat them as the maker's claim to test, not as a verdict. But the direction is easy to believe, because Tesseract is a 2010s design and nano-1 is a distilled version of a modern 4-billion-parameter vision model, OCRia-1. Distilled means the big model taught the small one: the small pipeline keeps a useful share of the big model's skill at one five-hundredth of its size.

One honest footnote from the same benchmark table: charts are still a weak spot for every CPU parser here. Nano-1 scores 3.1 on charts, the same as its rivals. If your documents are mostly charts and formulas, this is not your tool, and the section below on what it is bad at says what to use instead. Another footnote: a rival tiny OCR, PP-OCRv6 small, scores slightly higher overall at 59.9, but runs nearly five times slower at 5.7 pages per second. Nano-1 wins on speed, not on every single score.

How seven tiny models do one job

OCRia-nano-1 is not one model. It is a pipeline of seven small ONNX models that add up to 8.1 million parameters, and each one does a single job.

First, a line detector finds where the lines of text are on the page. It has 0.08 million parameters. Then a script router looks at each line and picks the right recogniser for it, and it also spots lines that are upside down. It has 0.04 million parameters. Then one of four recognisers reads the line: Latin for English and other Latin-script languages at 0.80 million parameters, CJK for Chinese, Japanese and Korean at 1.27 million, right-to-left for Arabic and Hebrew at 0.71 million, and a world-script model covering about 17 more writing systems at 0.98 million. Finally LayoutNet, the biggest piece at 4.27 million parameters, finds tables with their rows, columns and spanning header cells, and classifies layout blocks such as headings, lists, captions, and page headers and footers.

The OCR stack on its own is 3.9 million parameters. LayoutNet brings the total to 8.1 million. The whole download, models plus the ONNX Runtime that runs them, is 60 to 75 MB, and every file is checked against a pinned sha256 hash when you pull it. For comparison, the teacher model it was distilled from, OCRia-1, is a 4-billion-parameter vision model that needs a GPU and about 10 GB of weights.

LiteParse does the rest of the work around the models. It renders each page at 250 DPI, runs the detector, router and recognisers, merges the OCR text with the PDF text layer where one exists, runs LayoutNet, and writes Markdown or JSON with bounding boxes. Page headers and footers are removed from the Markdown by default, which is usually what you want. Language detection is automatic: the router picks a recogniser per line, so a document that mixes English and Arabic, or English and Japanese, is handled line by line without you setting anything.

The whole tutorial in three commands

Here is the shape of the job before the detail. Install LiteParse, pull the models once, parse your PDF. That is it.

Step 1: Install LiteParse

LiteParse is the open-source local document parser that runs the models, and it is released under the Apache 2.0 licence with no restriction. Install it with pip:

pip install liteparse

That is the only install command this tutorial needs. If you do not use Python, LiteParse is also available through npm as a global package, @llamaindex/liteparse, or through cargo. The Python route is the simplest on most laptops, and it is the one the rest of this post assumes. If you are new to running AI tools on your own machine, our Ollama tutorial covers the same idea, installing a local tool and running it yourself, and the concepts carry over.

Step 2: Pull the models once

Now download the seven models. This is the only download in the tutorial, and you do it once:

lit models pull ocria-nano

The download is 60 to 75 MB, models plus ONNX Runtime, and every file is checked against its pinned sha256 hash. After the pull, OCRia-nano-1 becomes LiteParse's OCR backend by default, so you do not need to configure anything. If you ever want to compare against the old default for one run, the card shows the flag for it: lit parse scan.pdf --ocr-backend tesseract forces Tesseract for that run only.

Step 3: Parse your first PDF to Markdown

Pick a real document, not a test file. A scanned invoice is a good first try, because it has a table, a heading, and a total, which is exactly the structure this tool is built to preserve. Run:

lit parse scan.pdf --format markdown

Replace scan.pdf with your own file name. LiteParse renders each page, reads the text, rebuilds the tables and the layout, and writes Markdown. A scanned invoice comes out as a clean Markdown document: the shop name as a heading, the line items as a Markdown table with columns and rows intact, and the total at the bottom. The page header and footer are stripped by default. If you need them kept, the --keep-headers-footers flag keeps them.

Try a hard page next. Scan a page upside down and parse it: the router detects upside-down lines before OCR, so it should still read correctly. Try a page that mixes two languages. Try a two-column page, the kind that defeats naive copy and paste from a PDF reader, and check whether the reading order comes out right. LayoutNet's layout score of 72.4 on ParseBench-2, against 49.4 for Tesseract, is the maker's claim for why this should work, and your own documents are the test that matters.

Step 4: Go further with JSON output and the Python API

Markdown is the output you want most of the time, because it is readable and pastes cleanly into notes, docs, and AI chats. But sometimes you need the coordinates: where exactly on the page each word sits. Ask LiteParse for JSON output instead of Markdown, and you get text items with bounding boxes and OCR confidence scores, plus layout blocks with their boxes when you pass --extract-blocks. That is the output to use if you are building a search index over your documents, or checking exactly which words the OCR was unsure about.

If you want to use the models inside your own program instead of the command line, there is a Python API as well as a Node.js one. In Python, models.pull("ocria-nano") downloads the models, and then LiteParse(ocr_backend="ocria-nano", output_format="markdown").parse("scan.pdf") parses a file and gives you the text. There is also a browser WebAssembly build, for running the same models in a web page or at the edge, where a scanned page takes about 1 to 4 seconds on a laptop because it runs on one thread. For a folder of documents, run the parse command once per file: at about half a second a page on one CPU core, a 20-page document takes roughly 10 seconds.

What it is good at, and where it falls short

Its strength is everyday documents, and that is where you should use it. Contracts, invoices, bank statements, letters, reports, routine scans, and first-pass ingestion of a document pile you want searchable. It reads digital PDFs, scans, images and Office files. It handles many languages in one document, detects upside-down pages, and rebuilds tables and layout well enough that the Markdown output is genuinely usable rather than a jumble of lines. That is the job most people actually have.

Its weak spots are honest ones. Complex charts score 3.1 on ParseBench-2, which is effectively unusable, and formulas are in the same territory: this pipeline was not built for them. Handwriting-heavy pages are not its job either. Very dense or unusual layouts will still produce errors, and no CPU parser at this size is going to match a large vision model on the hardest pages.

When nano-1 is not enough, the upgrade path is its own teacher. OCRia-1 is the 4-billion-parameter vision model, released on 22 October 2026, that needs a GPU and about 10 GB of weights. In LlamaIndex's paid LlamaParse cloud it scores 87.0 on ParseBench-2, against 59.2 for nano-1 on a CPU, with charts at 77.4 against 3.1. That is the gap between a free CPU tool and a paid GPU service, stated plainly. Use nano-1 for the everyday pile, and reach for the bigger model only for the pages that genuinely need it. If you want the same "free on your own machine" idea for a full AI assistant rather than a document reader, our Bonsai 2.5 tutorial shows how to run a 27-billion-parameter AI on a laptop for free.

The free-tier trap: read the licence before you build a business on it

This is the part most launch coverage skips, and it matters more than the benchmark. LiteParse itself is Apache 2.0, which means no restriction on the tool. The OCRia-nano-1 weights are different. They are released under a modified Open RAIL-M licence, based on the AI Pubs Open RAIL-M licence, and it has limits.

Free for research, teaching, evaluation and benchmarking by anyone, including publishing the results. Free for personal use. Free for commercial use only by organisations under 2 million dollars in annual revenue and under 2 million dollars in total funding. Both limits apply: above either threshold, you need a commercial licence from LlamaIndex. And there is one more exclusion with no size exception at all: any use in a document parsing, OCR or extraction product or service that competes with LlamaParse or LlamaCloud needs a commercial licence, whatever your size. One thing the licence does give you clearly: you own your outputs.

So do not call the weights "free open source" without the caveat. For personal use, for a student, for a small team under the thresholds, it is free in the way that matters. For a company above the thresholds, or for anyone building a competing parser, it is not free, and the licence to buy comes from LlamaIndex. Check the licence file on the model card if your use case needs certainty, before you build anything on it.

FAQ

Is OCRia-nano-1 really free?
For personal use, research, teaching and evaluation, yes. For commercial use, free only if your organisation is under 2 million dollars in annual revenue and under 2 million dollars in total funding. Above either threshold, or if you are building a document parsing, OCR or extraction product that competes with LlamaParse or LlamaCloud, you need a commercial licence from LlamaIndex. LiteParse itself is Apache 2.0 with no restriction. You own your outputs either way.

Do I need a GPU to run it?
No. That is the point. It runs on a plain laptop CPU at 426 milliseconds per page on a single core, or 27.8 pages per second on 16 virtual CPUs, according to LlamaIndex's own figures. The teacher model, OCRia-1, is the one that needs a GPU.

Can it read handwriting or complex charts?
Not well. Charts score 3.1 on ParseBench-2, which is effectively unusable, and handwriting-heavy pages are outside what this pipeline was built for. Use it for printed everyday documents: contracts, invoices, statements, reports. For complex charts and formulas, OCRia-1 or the paid LlamaParse cloud is the upgrade.

How is OCRia-nano-1 different from OCRia-1?
OCRia-1 is the 4-billion-parameter vision model released on 22 October 2026, and it needs a GPU and about 10 GB of weights. Nano-1 is the distilled version: seven small models totalling 8.1 million parameters that run on a CPU. The big model scores 87.0 on ParseBench-2 in LlamaParse; nano-1 scores 59.2. Do not confuse the two when you read launch coverage.

What if my PDF is upside down or in another language?
The script router detects upside-down lines before OCR, so an upside-down page should still read correctly. Language detection is automatic, and the router sends each line to one of four recognisers: Latin, CJK, right-to-left, or a world-script model for about 17 more writing systems. A document mixing languages is handled line by line.

Can I use it inside my own app instead of the command line?
Yes. There is a Python API and a Node.js API, plus a browser WebAssembly build. In Python, models.pull("ocria-nano") downloads the models and LiteParse(ocr_backend="ocria-nano", output_format="markdown").parse("scan.pdf") parses a file. The WebAssembly build runs at about 1 to 4 seconds per scanned page on a laptop, on one thread.

Sources

LlamaIndex OCRia-nano-1 model card, Hugging Face
LlamaIndex OCRia-nano-1, CPU document parsing, ExplainX
MarkTechPost, LlamaIndex OCRia-nano-1 CPU document parser
FreeLLMArena, LlamaIndex launches OCRia-nano-1
OCRia-1 vs nano-1 comparison, BitTide AI Compass

Keep reading on RiseMe

Run AI on Your Own PC: The Complete Beginner's Ollama Tutorial
How to Run a 27B AI on Your Laptop for Free With Bonsai 2.5
How to Generate AI Videos for Free With MAGI-2
Qwen3.8-27B vs Gemma 4: Which Free AI Actually Runs on Your PC?

Post a Comment