12-04 更新 实时
首页/ 模型选型/ 正文

LlamaIndex 发布 8.1M 参数 CPU OCR 模型

模型选型 来源:MarkTechPost 2026-11-29 13:22 1 阅读 机器翻译
LlamaIndex 发布 8.1M 参数 CPU OCR 模型

LlamaIndex 发布了 OCRia-nano-1,这是其 OCRia 家族中体量最小的模型。OCRia-nano-1 这个 OCR 模型拥有 810 万参数,并在 Hugging Face 上开放权重。它能在 CPU 上读取文本、重建表格并还原页面版式,无需 GPU。它运行在该公司开源的本地解析器 LiteParse 之内。其目标是对大量积压文档做低成本的第一遍处理。你可以通过我们的 GPULeaderboard.com Chrome 扩展在这里查看部署选项和规格。

OCRia-nano-1 是 LlamaIndex 推出的一条 CPU 文档解析流水线,从 40 亿参数的 OCRia-1 VLM 蒸馏而来。它的参数量约为教师模型的 1/500。它并非单一网络,而是串联在 LiteParse 内的 7 个专家模型。OCRia-1 生成了训练标签:文本转录、表格标注和版式标签。

根据模型卡,每一页都要经过 6 个阶段:

输出为 Markdown、带边界框的 JSON 或纯文本。表格以 Markdown 形式输出,单元格跨行跨列时则以 HTML 形式输出。

以下所有数字均由 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,搭配 Tesseract 的 LiteParse 为 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,该数值越低越好。

差距并不均匀。在 olmOCR-bench 上,Nano 领先 Indra 和 Marker 0.1 分。在表单类任务上,它落后于 Indra(69.8 对 70.2)。搭载 PP-OCRv6 small 的 LiteParse 得分为 59.9,高于 Nano,但运行速度为每秒 5.7 页。PP-OCRv6 tiny 的得分为 58.9,速度为每秒 14.7 页。

在单核上,Nano 平均每页耗时 426 ms,90% 的页面在 862 ms 内完成。计时包含完整的 LiteParse 流水线。使用 16 个单核 worker 时,它的处理速度为每秒 27.8 页。这大约是 LiteParse 默认 Tesseract 配置(14.2)的 2 倍。

Indra 略快一些,为每秒 29.6 页。在不使用 LayoutNet 的情况下运行 Nano 的 OCR 栈,速度可达每秒 37.2 页,但质量降至 51.2。在 WebAssembly 中,单线程笔记本电脑上处理一张扫描页约需 1 到 4 秒。LlamaIndex 没有说明所用 CPU 的型号。

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 之外运行。

*由 LlamaIndex 在 OCRia-nano-1 模型卡上测量。其他行中的厂商规格来自各项目自己的页面。

权重采用基于 Open RAIL-M 的自定义许可证。研究和个人的使用免费。年收入低于 200 万美元且总融资低于 200 万美元的组织可免费商用。任何与 LlamaParse 或 LlamaCloud 竞争的产品,无论规模大小,都需要商业许可证。LiteParse 本身采用 Apache 2.0。

欢迎查看模型权重、LiteParse 仓库和技术博客。你可以通过我们的 GPULeaderboard.com Chrome 扩展在此查看部署选项和规格。

需要与我们合作推广你的 GitHub 仓库、Hugging Face 页面、产品发布或网络研讨会等?请联系我们

LlamaIndex 发布 OCRia-nano-1:面向 CPU 的 8.1M 参数 OCR 模型 一文最初出现在 MarkTechPost 上。

译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。

查看英文原文(LlamaIndex Releases OCRia-nano-1: 8.1M-Parameter OCR Model for CPUs)

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:

  1. Text layer check: PDFium reads native text from digital PDFs. Pages without usable text go to OCR.
  2. Line detector (0.08M): Finds text lines on the rendered page (250 DPI by default).
  3. Script router (0.04M): Picks the page’s majority script. Confident lines can override it. It also flags upside-down pages.
  4. 4 recognizers: Latin (0.80M), world-script (0.98M), right-to-left (0.71M) and CJK (1.27M).
  5. Merge: OCR lines are combined with any native PDF text.
  6. 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.

Play pipeline</button><button class="btn ghost" id="ocn-next">Next step</button><span class="legend">Click any stage to inspect it.</span></div> <div class="flow" id="ocn-flow"></div> <div class="rail"><i id="ocn-rail"></i></div> <div class="page"> <div class="doc" id="ocn-doc"><div class="scan"></div></div> <div class="det" id="ocn-det" style="flex:1"></div> </div> <div style="margin-top:14px"><span class="legend">Where the 8.1M parameters sit (hover a block)</span> <div class="comp" id="ocn-comp"></div> <div class="legend" id="ocn-compl" style="margin-top:4px">&nbsp;</div> </div> </div> <div class="pane" id="ocn-bench"> <div class="ctrl" id="ocn-dims"></div> <div class="ctrl"><label class="legend" style="cursor:pointer"><input type="checkbox" id="ocn-teach"> Show 4B teacher OCRia-1 (GPU)</label></div> <div class="bars" id="ocn-bars"></div> <p class="note">ParseBench-2 scores (0 to 100), self-reported by LlamaIndex on a 16-vCPU machine, 300 random ParseBench pages. ParseBench-2 is LlamaIndex's own benchmark.</p> </div> <div class="pane" id="ocn-speed"> <div class="ctrl"><button class="chip on" data-m="pps">Pages per second (16 vCPU)</button><button class="chip" data-m="ms">Mean ms per page (1 core)</button></div> <div class="bars" id="ocn-sbars"></div> <p class="note" id="ocn-snote">Higher is better. Numbers in brackets are ParseBench-2 overall. Self-reported by LlamaIndex.</p> </div> <div class="pane" id="ocn-run"> <div class="ctrl"><button class="chip on" data-c="cli">CLI</button><button class="chip" data-c="py">Python</button><button class="chip" data-c="inst">Other installs</button></div> <div class="codewrap"><pre id="ocn-code"></pre><button class="btn ghost copy" id="ocn-copy">Copy</button></div> <p class="note">Download is about 60 to 75 MB including ONNX Runtime. Runs on Linux, macOS and Windows. Nano runs only inside LiteParse.</p> </div> <div class="pane" id="ocn-fit"> <div class="fit"> <div class="card nano"><h4>Use OCRia-nano-1 (CPU)</h4><ul><li>Digitally generated reports</li><li>Straightforward contracts</li><li>Invoices with simple tables</li><li>Routine scans and image pages</li><li>High-volume ingestion, agents reading uploads</li></ul></div> <div class="card big"><h4>Send to OCRia-1 (4B VLM)</h4><ul><li>Complex tables</li><li>Handwriting</li><li>Heavily degraded scans</li><li>Scanned math notation</li><li>Chart-to-table extraction</li></ul></div> </div> <div class="rev"> <button class="rv"><b>Charts?</b><span class="a">No chart model. Charts stay as images, so the chart score is 3.1.</span></button> <button class="rv"><b>License?</b><span class="a">Custom Open RAIL-M based. Commercial use free under $2M revenue and $2M funding.</span></button> <button class="rv"><b>Teacher gap?</b><span class="a">59.2 vs 87.0 on ParseBench-2 for the GPU teacher OCRia-1.</span></button> </div> </div> <div class="ft"><span>Sources: <a href="https://huggingface.co/llamaindex/OCRia-nano-1" target="_blank" rel="noopener">model card</a> · <a href="https://llamaindex.ai/blog/introducing-ocria-nano-1" target="_blank" rel="noopener">LlamaIndex blog</a> · <a href="https://github.com/run-llama/liteparse" target="_blank" rel="noopener">LiteParse</a></span><span class="mtp">Built by Marktechpost</span></div> </div> <script> (function(){ var R=document.getElementById('ocn-root');if(!R)return; function $(s){return R.querySelector(s)}function $$(s){return R.querySelectorAll(s)} function post(){try{var h=R.offsetHeight+40;if(window.parent&&window.parent!==window)window.parent.postMessage({mtpEmbed:'ocria-nano',h:h},'*')}catch(e){}} /* tabs */ $$('.tab').forEach(function(t){t.addEventListener('click',function(){$$('.tab').forEach(function(x){x.classList.remove('on')});$$('.pane').forEach(function(x){x.classList.remove('on')});t.classList.add('on');$('#ocn-'+t.dataset.p).classList.add('on');if(t.dataset.p==='bench')drawB();if(t.dataset.p==='speed')drawS();setTimeout(post,60)})}); /* pipeline */ var S=[ ['Text layer','PDFium','Text layer check','PDFium reads native text from digital PDFs. Pages with no usable text layer are sent to OCR.'], ['Detector','0.08M','Line detector','Finds text lines on the rendered page. Pages render at 250 DPI by default.'], ['Router','0.04M','Script router','Picks the page majority script. Confident lines can override it. It also detects upside-down pages.'], ['Recognizers','3.76M','4 recognizers','Latin 0.80M, world-script 0.98M, right-to-left 0.71M and CJK 1.27M. One is chosen per line.'], ['Merge','no params','Merge','OCR lines are combined with any native PDF text from stage 1.'], ['LayoutNet','4.27M','LayoutNet','A 6-layer transformer over text units with a CNN image branch. It predicts tables, rows, columns, cells and blocks across 13 layout classes. Output: Markdown, JSON or text.']]; var flow=$('#ocn-flow'),doc=$('#ocn-doc'),cur=0,timer=null; S.forEach(function(s,i){var b=document.createElement('button');b.className='st';b.innerHTML='<span class="n">0'+(i+1)+'</span><span class="t">'+s[0]+'</span><span class="p">'+s[1]+'</span>';b.addEventListener('click',function(){stop();go(i)});flow.appendChild(b)}); var L=[[14,60,'l'],[26,90,'l'],[38,75,'c'],[50,95,'l'],[62,70,'r'],[74,88,'l'],[86,64,'c']]; L.forEach(function(l){var d=document.createElement('div');d.className='ln '+l[2];d.style.top=l[0]+'px';d.style.width=l[1]+'px';doc.appendChild(d)}); [[96,10,48,40],[96,58,50,40]].forEach(function(c){var d=document.createElement('div');d.className='cell';d.style.top=c[0]+'px';d.style.left=c[1]+'px';d.style.width=c[2]+'px';d.style.height=c[3]+'px';doc.appendChild(d)}); function go(i){cur=i;var bs=flow.children;for(var k=0;k<bs.length;k++){bs[k].classList.toggle('on',k===i);bs[k].classList.toggle('done',k<i)} $('#ocn-rail').style.width=((i+1)/S.length*100)+'%';doc.className='doc s'+(i+1); $('#ocn-det').innerHTML='<h4>Stage '+(i+1)+': '+S[i][2]+'</h4><p>'+S[i][3]+'</p>';post()} function stop(){if(timer){clearInterval(timer);timer=null;$('#ocn-play').textContent='▶ Play pipeline'}} $('#ocn-play').addEventListener('click',function(){if(timer){stop();return}$('#ocn-play').textContent='❚❚ Pause';go(0);timer=setInterval(function(){if(cur>=S.length-1){stop();return}go(cur+1)},1700)}); $('#ocn-next').addEventListener('click',function(){stop();go((cur+1)%S.length)}); go(0); var C=[['Line detector',0.08,'#141414'],['Script router',0.04,'#55524B'],['Latin rec',0.80,'#F6B87A'],['World-script rec',0.98,'#8CCBEE'],['RTL rec',0.71,'#E9A0D3'],['CJK rec',1.27,'#C9D3FB'],['LayoutNet',4.27,'#7B61FF']]; var comp=$('#ocn-comp'),tot=C.reduce(function(a,c){return a+c[1]},0); C.forEach(function(c){var d=document.createElement('div');d.style.width=(c[1]/tot*100)+'%';d.style.background=c[2];d.addEventListener('mouseenter',function(){$('#ocn-compl').textContent=c[0]+': '+c[1].toFixed(2)+'M parameters'});comp.appendChild(d)}); /* benchmarks */ var D=['Overall','Text','Formatting','Tables','Charts','Layout','Forms']; var B={'LiteParse + OCRia-nano-1':[59.2,68.5,82.2,59.5,3.1,72.4,69.8],'Indra 1.1.2':[55.1,68.4,76.1,47.6,3.1,65.2,70.2],'Marker 2.2.0 (fast)':[52.5,62.5,75.5,43.6,3.1,61.0,69.2],'LiteParse (Tesseract)':[48.7,58.8,78.0,36.2,1.2,49.4,68.5]}; var T=[87.0,87.0,92.7,89.9,77.4,89.2,85.6],dim=0; var dims=$('#ocn-dims');D.forEach(function(d,i){var c=document.createElement('button');c.className='chip'+(i===0?' on':'');c.textContent=d;c.addEventListener('click',function(){dim=i;dims.querySelectorAll('.chip').forEach(function(x){x.classList.remove('on')});c.classList.add('on');drawB()});dims.appendChild(c)}); $('#ocn-teach').addEventListener('change',drawB); function bar(host,rows,max,fmt){host.innerHTML='';rows.forEach(function(r){var e=document.createElement('div');e.className='bar'+(r[2]||'');e.innerHTML='<span class="lb">'+r[0]+'</span><span class="tr"><span class="fl" style="display:block"></span></span><span class="v">'+fmt(r[1])+'</span>';host.appendChild(e);var f=e.querySelector('.fl');requestAnimationFrame(function(){requestAnimationFrame(function(){f.style.width=(r[1]/max*100)+'%'})})});setTimeout(post,60)} function drawB(){var rows=Object.keys(B).map(function(k){return [k,B[k][dim],k.indexOf('nano')>-1?' me':'']});if($('#ocn-teach').checked)rows.push(['OCRia-1 teacher (GPU)',T[dim],' tea']);bar($('#ocn-bars'),rows,100,function(v){return v.toFixed(1)})} /* speed */ var SP=[['OCRia-nano-1 OCR only',37.2,325,51.2],['Indra 1.1.2',29.6,440,55.1],['LiteParse + OCRia-nano-1',27.8,426,59.2],['Marker 2.2.0 (fast)',24.7,578,52.5],['LiteParse + PP-OCRv6 tiny',14.7,773,58.9],['LiteParse (Tesseract)',14.2,751,48.7],['LiteParse + PP-OCRv6 small',5.7,1963,59.9]],mode='pps'; $$('#ocn-speed .chip').forEach(function(c){c.addEventListener('click',function(){mode=c.dataset.m;$$('#ocn-speed .chip').forEach(function(x){x.classList.remove('on')});c.classList.add('on');drawS()})}); function drawS(){var i=mode==='pps'?1:2;var rows=SP.slice().sort(function(a,b){return mode==='pps'?b[1]-a[1]:a[2]-b[2]}).map(function(r){return [r[0]+' ['+r[3]+']',r[i],r[0]==='LiteParse + OCRia-nano-1'?' me':'']}); bar($('#ocn-sbars'),rows,mode==='pps'?40:2000,function(v){return mode==='pps'?v.toFixed(1):v+''}); $('#ocn-snote').textContent=(mode==='pps'?'Higher is better.':'Lower is better.')+' Numbers in brackets are ParseBench-2 overall. Self-reported by LlamaIndex.'} /* code */ var CODE={cli:'<span class="c"># install LiteParse</span>\npip install liteparse\n\n<span class="c"># once: downloads models and ONNX Runtime</span>\nlit models pull ocria-nano\n\n<span class="c"># parse a document to Markdown</span>\nlit parse doc.pdf --format markdown', py:'from liteparse import LiteParse, models\n\nmodels.pull("ocria-nano")\nparser = LiteParse(ocr_backend="ocria-nano",\n output_format="markdown")', inst:'<span class="c"># Node.js</span>\nnpm i -g @llamaindex/liteparse\n\n<span class="c"># Rust CLI</span>\ncargo install liteparse\n\n<span class="c"># Browser (WebAssembly)</span>\nnpm i @llamaindex/liteparse-wasm'}; var cc='cli';function drawC(){$('#ocn-code').innerHTML=CODE[cc];post()} $$('#ocn-run .chip').forEach(function(c){c.addEventListener('click',function(){cc=c.dataset.c;$$('#ocn-run .chip').forEach(function(x){x.classList.remove('on')});c.classList.add('on');drawC()})}); $('#ocn-copy').addEventListener('click',function(){var t=$('#ocn-code').textContent;try{navigator.clipboard.writeText(t);$('#ocn-copy').textContent='Copied'}catch(e){$('#ocn-copy').textContent='Select & copy'}setTimeout(function(){$('#ocn-copy').textContent='Copy'},1400)}); drawC(); $$('.rv').forEach(function(r){r.addEventListener('click',function(){r.classList.toggle('open');setTimeout(post,380)})}); window.addEventListener('load',post);window.addEventListener('resize',post); if(window.ResizeObserver){new ResizeObserver(post).observe(R)}post(); })(); </script> " style="width:100%!important;height:600px;border:0!important;display:block;background:transparent!important;" loading="lazy" scrolling="no">

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

MetricsOCRia-nano-1Indra 1.1.2Marker 2.2.0 (fast)PP-OCRv6 tinyTesseract
DeveloperLlamaIndexDatalabDatalabBaidu PaddlePaddleTesseract OSS
Parameters8.1M total~1M main recognizer, ~7.3M default modelsNot disclosed1.5M tiny tier (paper)Not disclosed
RuntimeONNX Runtime, CPU, WebAssemblyONNX Runtime, CPU onlyPyTorch, CPU/GPU/MPSPaddlePaddle or ONNX, CPU/GPUCPU, LSTM engine
Weights licenseModified Open RAIL-M, free under $2M revenue and fundingModified OpenRAIL-M, free under $20MModified Open RAIL-M, free under $5MApache 2.0Apache 2.0
Scripts / languagesLatin, CJK, Arabic, Hebrew, ~17 more scripts95 measured, 83 at char F1 ≥ 0.90Claims all languages49 (tiny recognizer)100+
ParseBench-2 overall*59.255.152.558.9 (in LiteParse)48.7 (in LiteParse)
ParseBench-2 tables*59.547.643.6Not disclosed36.2
ParseBench-2 forms*69.870.269.2Not disclosed68.5
Pages/s, 16 vCPU*27.829.624.714.714.2
Mean ms/page, 1 core*426440578773751

*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

The post LlamaIndex Releases OCRia-nano-1: 8.1M-Parameter OCR Model for CPUs appeared first on MarkTechPost.

正文保留英文原文,标题与摘要由机器翻译。

本文由采集器自动同步

原文发布于 MarkTechPost(LlamaIndex Releases OCRia-nano-1: 8.1M-Parameter OCR Model for CPUs),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。

阅读原文 ↗