LlamaIndex 已发布 OCRia-nano-1,这是其 OCRia 家族中最小的模型。OCRia-nano-1 OCR 模型拥有 8.1M 参数,并在 Hugging Face 上开放了权重。它可以在 CPU 上读取文本、重建表格并恢复页面布局。无需 GPU。它在 LiteParse 中运行,这是该公司开源的本地解析器。其目标是以低成本完成大量文档积压的第一遍处理。您可以通过我们的 GPULeaderboard.com 浏览器扩展在此查看部署选项和规格。
TL;DR
- 规模:8.1M 参数分布在 7 个小模型中(3.9M OCR 堆栈,4.27M LayoutNet)。没有上下文长度;它逐页处理。
- 运行平台:Linux、macOS 或 Windows 上的任意 CPU,以及通过 WebAssembly 在浏览器中运行。下载大小约 60 到 75 MB。无需 GPU。
- 性能:在其 4 系统表格中获得 ParseBench-2 最高分(59.2),单核心每页 426 ms。
- 最佳项:格式,ParseBench-2 得分 82.2。
OCRia-nano-1 是什么?
OCRia-nano-1 是 LlamaIndex 的 CPU 文档解析流水线,从其 4B OCRia-1 VLM 蒸馏而来。其参数量约为教师模型的 1/500。它不是单一网络,而是 7 个专业模型在 LiteParse 中串联而成。OCRia-1 生成了训练标签:文本转录、表格标注和布局标签。
OCRia-nano-1 流水线如何工作?
根据模型卡片,每页经过 6 个阶段:
- 文本层检查:PDFium 从数字 PDF 中读取原生文本。没有可用文本的页面进入 OCR。
- 行检测器(0.08M):在渲染后的页面上查找文本行(默认 250 DPI)。
- 脚本路由器(0.04M):选择页面的主要脚本。高置信度的行可以覆盖该判断。它还会标记倒置的页面。
- 4 个识别器:拉丁文(0.80M)、世界脚本(0.98M)、从右到左(0.71M)和 CJK(1.27M)。
- 合并:OCR 行与任何原生 PDF 文本合并。
- LayoutNet(4.27M):基于文本单元之上的 6 层 transformer,配有 CNN 图像分支。它预测跨越 13 个布局类别的表格、行、列、单元格和块之间的关系。
输出格式为 Markdown、带边界框的 JSON 或纯文本。表格以 Markdown 格式输出,当单元格存在合并时则以 HTML 格式输出。
OCRia-nano-1 在基准测试中的表现如何?
以下所有数据均由 LlamaIndex 自行报告。各系统在同一台 16-vCPU 机器上运行,测试 300 个随机 ParseBench 页面。ParseBench-2 是 LlamaIndex 自有的基准测试。
在 ParseBench-2 上,Nano 综合得分 59.2。Indra 1.1.2 得分 55.1,Marker 2.2.0(fast)得分 52.5,LiteParse 配合 Tesseract 得分 48.7。Nano 最大的领先优势在表格方面:59.5 对 Indra 的 47.6。它在布局(72.4)和格式(82.2)方面同样领先。
在其他 4 项质量基准测试中,Nano 在 OmniParseBench 上得分 74.8,ParseBench-1 得分 52.7,olmOCR-bench 得分 60.9。其 BHL 字符错误率为 0.048,数值越低越好。
领先幅度并不均匀。Nano 在 olmOCR-bench 上领先 Indra 和 Marker 0.1 分。在表单方面,Nano 得分 69.8,落后于 Indra 的 70.2。LiteParse 配合 PP-OCRv6 small 得分 59.9,高于 Nano,但运行速度仅为 5.7 页/秒。PP-OCRv6 tiny 在 14.7 页/秒的速度下得分 58.9。
OCRia-nano-1 在 CPU 上的速度如何?
在单核上,Nano 平均每页 426 ms,90% 的页面在 862 ms 内完成。计时包含完整的 LiteParse 流水线。使用 16 个单核工作线程时,处理速度为 27.8 页/秒,约为 LiteParse 默认 Tesseract 配置(14.2 页/秒)的 2 倍。
Indra 速度略快,为 29.6 页/秒。在不使用 LayoutNet 的情况下运行 Nano 的 OCR 堆栈,速度可达 37.2 页/秒,但质量降至 51.2。在 WebAssembly 环境中,单线程笔记本处理一页扫描件约需 1 到 4 秒。LlamaIndex 未注明所使用的 CPU 型号。
如何运行 OCRia-nano-1?
pip install liteparse
lit models pull ocria-nano
lit parse doc.pdf --format markdown
LiteParse 也支持通过 npm 和 cargo 安装。Python 和 Node.js 暴露了 ocria-nano OCR 后端。浏览器版本以 @llamaindex/liteparse-wasm 的形式发布,其中模型子集可缩小至约 1.5 MB。输入支持数字 PDF、扫描件、图像和 Office 文件。Nano 无法在 LiteParse 之外运行。
对比:OCRia-nano-1 与其他 CPU 解析器
*由 LlamaIndex 在 OCRia-nano-1 模型卡片上测量。其他行的厂商规格来自各项目自身的页面。
OCRia-nano-1 使用什么许可证?
权重基于 Open RAIL-M 采用自定义许可证。研究和个人使用免费。年营收低于 $2M 且总融资低于 $2M 的机构可免费商用。任何与 LlamaParse 或 LlamaCloud 竞争的产品,无论规模大小,都需要商业许可证。LiteParse 本身采用 Apache 2.0 许可证。
关键要点
- 8.1M 参数,仅限 CPU,单核心每页 426 ms。
- ParseBench-2 得分 59.2,领先于 Indra(55.1)和 Marker fast(52.5)。
- 表格处理是最大亮点:59.5,而下一位 CPU 解析器为 47.6。
- 图表得分 3.1;复杂页面请交由 OCRia-1 处理。
- 仅在营收和融资均低于 $2M 时才可免费商用。
查看模型权重、LiteParse 仓库和技术博客。你可以通过我们的 GPULeaderboard.com chrome 扩展在此查看部署选项和规格。
另外,欢迎关注我们 Twitter 账号,别忘了加入我们的 150k+ML SubReddit 并订阅我们的 Newsletter。等等!你在 telegram 上吗?现在也可以加入我们了。
需要与我们合作推广您的 GitHub 仓库、Hugging Face 页面、产品发布或网络研讨会等吗?联系我们
Asif Razzaq 是 Marktechpost AI Media Inc. 的首席执行官。作为一名富有远见的企业家和工程师,Asif 致力于发挥人工智能的潜力,为社会创造价值。他最近的事业是推出人工智能媒体平台 Marktechpost,该平台以深入报道机器学习和深度学习新闻而独树一帜,其内容既在技术上严谨,又能被广泛受众轻松理解。该平台月浏览量超过 200 万,彰显了其在受众中的广泛影响力。
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
LlamaIndex has released OCRia-nano-1, the smallest model in its OCRia family. The OCRia-nano-1 OCR model has 8.1M parameters and open weights on Hugging Face. It reads text, rebuilds tables and recovers page layout on a CPU. No GPU is needed. It runs inside LiteParse, the company’s open-source local parser. The target is the cheap first pass over large document backlogs. You can check the deployment options and specs here through our GPULeaderboard.com chrome extension.
TL;DR
- Size: 8.1M parameters across 7 small models (3.9M OCR stack, 4.27M LayoutNet). No context length; it works page by page.
- Runs on: Any CPU on Linux, macOS or Windows, plus browsers via WebAssembly. About 60 to 75 MB download. No GPU.
- Performance: Top ParseBench-2 score (59.2) in its 4-system table, at 426 ms per page on 1 core.
- Best: Formatting, 82.2 on ParseBench-2.
What is OCRia-nano-1?
OCRia-nano-1 is a CPU document parsing pipeline from LlamaIndex, distilled from its 4B OCRia-1 VLM. It has about 1/500th of the teacher’s parameters. It is not a single network. It is 7 specialist models chained inside LiteParse. OCRia-1 generated the training labels: text transcriptions, table annotations and layout labels.
How does the OCRia-nano-1 pipeline work?
Each page passes through 6 stages, per the model card:
- Text layer check: PDFium reads native text from digital PDFs. Pages without usable text go to OCR.
- Line detector (0.08M): Finds text lines on the rendered page (250 DPI by default).
- Script router (0.04M): Picks the page’s majority script. Confident lines can override it. It also flags upside-down pages.
- 4 recognizers: Latin (0.80M), world-script (0.98M), right-to-left (0.71M) and CJK (1.27M).
- Merge: OCR lines are combined with any native PDF text.
- LayoutNet (4.27M): A 6-layer transformer over text units with a CNN image branch. It predicts table, row, column, cell and block relations across 13 layout classes.
Output is Markdown, JSON with bounding boxes, or plain text. Tables come out as Markdown, or HTML when cells span.
How does OCRia-nano-1 score on benchmarks?
All numbers below are self-reported by LlamaIndex. Systems ran on the same 16-vCPU machine over 300 random ParseBench pages. ParseBench-2 is LlamaIndex’s own benchmark.
On ParseBench-2, Nano scores 59.2 overall. Indra 1.1.2 scores 55.1, Marker 2.2.0 (fast) 52.5 and LiteParse with Tesseract 48.7. Nano’s largest lead is tables: 59.5 versus 47.6 for Indra. It also leads on layout (72.4) and formatting (82.2).
On the other 4 quality benchmarks, Nano posts OmniParseBench 74.8, ParseBench-1 52.7 and olmOCR-bench 60.9. Its BHL character error rate is 0.048, where lower is better.
The margins are not uniform. Nano leads olmOCR-bench by 0.1 point over Indra and Marker. It trails Indra on forms (69.8 vs 70.2). LiteParse with PP-OCRv6 small scores 59.9, above Nano, but runs at 5.7 pages per second. PP-OCRv6 tiny reaches 58.9 at 14.7 pages per second.
How fast is OCRia-nano-1 on a CPU?
On 1 core, Nano averages 426 ms per page, and 90% of pages finish within 862 ms. Timings include the full LiteParse pipeline. With 16 single-core workers, it processes 27.8 pages per second. That is about 2x LiteParse’s default Tesseract setup at 14.2.
Indra is slightly faster at 29.6 pages per second. Running Nano’s OCR stack without LayoutNet gives 37.2 pages per second, but quality drops to 51.2. In WebAssembly, a scanned page takes about 1 to 4 seconds on a single-threaded laptop. LlamaIndex does not name the CPU model used.
How do you run OCRia-nano-1?
pip install liteparse
lit models pull ocria-nano
lit parse doc.pdf --format markdown
LiteParse also installs through npm and cargo. Python and Node.js expose an ocria-nano OCR backend. A browser build ships as @llamaindex/liteparse-wasm, where model subsets can drop to about 1.5 MB. Inputs include digital PDFs, scans, images and Office files. Nano cannot run outside LiteParse.
Comparison: OCRia-nano-1 vs other CPU parsers
*Measured by LlamaIndex on the OCRia-nano-1 model card. Vendor specs in the other rows come from each project’s own page.
What license does OCRia-nano-1 use?
The weights use a custom license based on Open RAIL-M. Research and personal use are free. Commercial use is free for organizations under $2M annual revenue and $2M total funding. Any product competing with LlamaParse or LlamaCloud needs a commercial license, regardless of size. LiteParse itself is Apache 2.0.
Key Takeaways
- 8.1M parameters, CPU only, 426 ms per page on 1 core.
- 59.2 on ParseBench-2, ahead of Indra (55.1) and Marker fast (52.5).
- Tables are the big win: 59.5 vs 47.6 for the next CPU parser.
- Charts score 3.1; send hard pages to OCRia-1.
- Commercial use is free only under $2M revenue and funding.
Check out the model weights, LiteParse repo and technical blog. You can check the deployment options and specs here through our GPULeaderboard.com chrome extension.
Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us
Asif Razzaq is the CEO of Marktechpost AI Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of Artificial Intelligence for social good. His most recent endeavor is the launch of an Artificial Intelligence Media Platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is both technically sound and easily understandable by a wide audience. The platform boasts of over 2 million monthly views, illustrating its popularity among audiences.
Auto-fetched and translated by AI Atlas. All rights belong to the original author.