cd /news/ai-tools/adding-ocria-1-to-looksneat · home › topics › ai-tools › article
[ARTICLE · art-177381] src=lukasrieder.com ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Adding OCRia-1 to looksneat

Developer-built command-line OCR tool looksneat added support for LlamaIndex's OCRia-1 document transcription model in release v0.1.0-alpha.1, reusing the Rust/MLX runtime from the earlier XIAOMI-OCR-0 port and adding a local Rust weight converter. Setup downloads about 10.37 GB of source files, verifies sizes and SHA-256 hashes, and converts language weights to affine 4-bit MLX in groups of 64 while keeping the vision encoder in BF16; the author reports only synthetic-tensor runtime tests, with the full OCRia checkpoint still requiring an authorized run and no document results or performance measurements yet. OCRia-1's license restricts competing OCR and document-extraction products regardless of revenue, with a research exception and revenue and funding thresholds, so setup requires the --accept-ocria-license flag, which the author notes grants no permission.

key takeaway

OCRia-1's original weights lack Qwen's normalization offset, so add it during conversion; the converter produces affine 4-bit MLX language weights in groups of 64 while the vision encoder stays in BF16, from a 10.37 GB source download.

read3 min views19 publishedNov 27, 2026

OCRia-1 shares a model architecture with Xiaomi. I reused the Rust/MLX runtime and added local weight conversion to looksneat.

  • Published
  • Reading time
  • 3 min read

I added OCRia-1 to looksneat, my command-line OCR tool for Apple Silicon. LlamaIndex built it on Qwen3.5-4B to transcribe documents, including tables, charts and formulas. I wanted it to work through the same command as the other models, with inference inside the Rust process.

The adapter is in v0.1.0-alpha.1. I have tested the runtime with synthetic tensors; the full OCRia checkpoint still needs an authorized run. I have no document results or performance measurements to share yet.

Reusing the Xiaomi implementation #

My XIAOMI-OCR-0 port already had the Qwen3.5 computation OCRia needed. I moved that code into a shared engine and made the model dimensions configurable. OCRia uses a larger vision encoder and a 32-layer language decoder. Both providers now use the same attention and recurrent code.

Weight preparation needed separate handling. The community Xiaomi checkpoint already includes Qwen’s normalization offset. OCRia’s original weights need that offset added during conversion. I kept conversion in setup so the recognizer can load prepared weights directly.

For batches and PDFs, I load the weights and tokenizer once and reuse them across pages. Each page gets fresh generation state. PDF pages arrive through looksneat’s existing lazy rasterizer, and recognition processes them in order. That keeps the model- cost out of the per-page work.

Local conversion #

I found a community MLX conversion, but its repository was gated. I could read the artifact metadata, while the configuration and tensors needed for verification required access. I chose to build a converter for the pinned upstream checkpoint.

Setup downloads about 10.37 GB of source files, checks their sizes and SHA-256 hashes, and converts the language weights to affine 4-bit MLX in groups of 64. The vision encoder stays in BF16. The converter runs in Rust through MLX, so installing this model adds no Python environment to maintain.

The initial download is substantial. Source weights and converted weights also coexist during setup. I delete the large source checkpoint after successful conversion and retain verified downloads after a failure so a retry can reuse them. Inference reads the prepared local files.

Page transcription #

LlamaIndex trained OCRia around a fixed transcription prompt. It asks for Markdown, HTML tables, LaTeX formulas and Mermaid diagrams. Charts are represented as tables of their data. I kept that prompt unchanged and disabled thinking as the publisher recommends.

The document, table, formula and chart selectors all send the same instruction. For an isolated table, the input is a crop:

looksneat --model ocria-1 --task table table-crop.png

A whole page goes through the same transcription call and comes back as one block. Looksneat preserves the generated markup and removes the outer Markdown fence. I left the publisher’s separate attention-based grounding pipeline out of this port, so OCRia blocks have no coordinates. The existing spatial engines can supply located regions.

License and availability #

OCRia’s license restricts competing OCR and document-extraction products regardless of revenue, with an exception for research. It also has revenue and funding thresholds. This affects software such as looksneat; integration, distribution and intended use need licensing review with LlamaIndex.

Setup requires --accept-ocria-license to acknowledge those terms and confirm authorization. The flag grants no permission. The release contains the runtime and documentation; model weights remain external.

The Apple Silicon archive and checksums are on the release page, along with signing and installation details. I recorded the conversion policy, supported options and remaining model tests in the integration report.

── more in #ai-tools 4 stories · sorted by recency
── more on @ocria-1 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/adding-ocria-1-to-lo…] indexed:0 read:3min 2026-11-27 · —