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 liteparsenn<span class=”c”># once: downloads models and ONNX Runtime</span>nlit models pull ocria-nanonn<span class=”c”># parse a document to Markdown</span>nlit parse doc.pdf –format markdown’,
py:’from liteparse import LiteParse, modelsnnmodels.pull(“ocria-nano”)nparser = LiteParse(ocr_backend=”ocria-nano”,n output_format=”markdown”)’,
inst:'<span class=”c”># Node.js</span>nnpm i -g @llamaindex/liteparsenn<span class=”c”># Rust CLI</span>ncargo install liteparsenn<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”>

<!– Fallback: upload ocria-nano-1-explainer-standalone.html to /wp-content/uploads/ via FTP and use:
–>

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

Metrics OCRia-nano-1 Indra 1.1.2 Marker 2.2.0 (fast) PP-OCRv6 tiny Tesseract
Developer LlamaIndex Datalab Datalab Baidu PaddlePaddle Tesseract OSS
Parameters 8.1M total ~1M main recognizer, ~7.3M default models Not disclosed 1.5M tiny tier (paper) Not disclosed
Runtime ONNX Runtime, CPU, WebAssembly ONNX Runtime, CPU only PyTorch, CPU/GPU/MPS PaddlePaddle or ONNX, CPU/GPU CPU, LSTM engine
Weights license Modified Open RAIL-M, free under $2M revenue and funding Modified OpenRAIL-M, free under $20M Modified Open RAIL-M, free under $5M Apache 2.0 Apache 2.0
Scripts / languages Latin, CJK, Arabic, Hebrew, ~17 more scripts 95 measured, 83 at char F1 ≥ 0.90 Claims all languages 49 (tiny recognizer) 100+
ParseBench-2 overall* 59.2 55.1 52.5 58.9 (in LiteParse) 48.7 (in LiteParse)
ParseBench-2 tables* 59.5 47.6 43.6 Not disclosed 36.2
ParseBench-2 forms* 69.8 70.2 69.2 Not disclosed 68.5
Pages/s, 16 vCPU* 27.8 29.6 24.7 14.7 14.2
Mean ms/page, 1 core* 426 440 578 773 751

*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.