据引用帖子称,LlamaIndex 团队开源了可在本地 CPU 运行的文档解析器 LiteParse,支持 PDF、Office 文档及图像,文本解析速度约为每页 2-5 毫秒。该工具内置 8.1M 参数的微型 OCR 模型,在 ParseBench-2 上表现优于 Marker 和 Indra。作者 Jerry Liu 认为 LiteParse 结合 ocria-nano-1 可实现无限制的 PDF 解析。
提供了本地解析的性能数据与安装方式,可供构建 RAG 管道的开发者评估其替代付费 API 的可行性。
liteparse + ocria-nano-1 == 无限制的 PDF 解析
LlamaIndex 团队刚开源了一个 PDF 解析器,速度快得离谱 😳 LiteParse 可在你自己的机器上本地解析 PDF 和办公文档。无需 LLM、无需云端、无需 API key。 文本解析每页约 2-5 毫秒,你的 RAG 管道再也不用等文档了。 它支持的功能列表有点夸张: PDF Word、Excel、PowerPoint 图片 内置 Tesseract OCR 自带的微型 CPU OCR 模型(8.1M 参数) 通过 HTTP 调用 PaddleOCR 或 EasyOCR 输出 Markdown、JSON 和纯文本 每段文字都有边界框 面向 AI Agent 的页面截图 Python、Node.js、Rust 和浏览器(WASM) 为什么值得收藏? 大多数 RAG 方案会把每个 PDF 发送到付费解析 API,或使用会搞乱表格和版面的慢速解析器。 LiteParse 完全在 CPU 上运行。它甚至可以在解析前先判断文档复杂度,让难的文件交给更重的工具,简单的文件直接飞快通过。 配合可选的 OCR 模型,它在 ParseBench-2 上超越 Marker 和 Indra,同时在 CPU 上每秒处理约 28 页。 已获得 13.2K 星。 安装非常简单: pip install liteparse 然后: lit parse document.pdf --format markdown -o output.md 如果你在做 RAG、知识库或文档 AI,收藏这个。 GitHub: https://t.co/uWEpN2Kbst #LiteParse #LlamaIndex #RAG #PDF #OCR #LLM #OpenSource
原文
The LlamaIndex team just open-sourced a PDF parser, and it's stupidly fast 😳 LiteParse parses PDFs and office docs locally on your own machine. No LLM, no cloud, no API key. Text parsing takes about 2-5 milliseconds per page, so your RAG pipeline stops waiting on documents. The list of what it supports is kind of ridiculous: PDF Word, Excel, PowerPoint Images Built-in Tesseract OCR Its own tiny CPU OCR model (8.1M params) PaddleOCR or EasyOCR via HTTP Markdown, JSON and plain text output Bounding boxes for every piece of text Page screenshots for AI agents Python, Node.js, Rust and the browser (WASM) Why is this worth bookmarking? Most RAG setups send every PDF to a paid parsing API, or use a slow parser that mangles tables and layouts. LiteParse runs entirely on CPU. It can even check how complex a document is before parsing it, so the hard files can go to heavier tools and the easy ones fly through. With its optional OCR model, it beats Marker and Indra on ParseBench-2 while handling about 28 pages per second on CPU. Already at 13.2K stars. Install is dead simple: pip install liteparse Then: lit parse document.pdf --format markdown -o output.md If you build RAG, knowledge bases or document AI, bookmark this one. GitHub: https://t.co/uWEpN2Kbst #LiteParse #LlamaIndex #RAG #PDF #OCR #LLM #OpenSource
来源:Jerry Liu · x.com