Install Python and llama.cpp
Install Python 3.10 or newer from python.org (tick “Add python.exe to PATH”), then open PowerShell and install llama.cpp with winget. Close and reopen PowerShell afterwards.
Download Python Official llama.cpp releasesRun OpenBMB’s MiniCPM-OCR SDK with a local llama.cpp server to turn a whole PDF into Markdown in reading order, with tables and formulas, on Windows, Mac or Linux.
Estimates for a short PDF with CPU layout detection. OpenBMB reports about 21 seconds for one table image on a 48-thread CPU; a laptop will be slower. Not measured by YouRunAI.
| Machine | MiniCPM-OCR 1.0 · Q4_K_M GGUF | MiniCPM-OCR 1.0 · Q8_0 GGUF |
|---|---|---|
| NVIDIA · 6 GB VRAM + 16 GB RAM | Recognition on the GPU; layout on CPU | Recognition on the GPU; layout on CPU |
| AMD Radeon · 8 GB VRAM | Recognition through the Vulkan or HIP llama.cpp build, else CPU | Same runtime requirement |
| Intel Arc · 8 GB VRAM | Recognition through the Vulkan llama.cpp build, else CPU | Same runtime requirement |
| Apple Silicon · 8 GB unified memory | Comfortable; recognition uses Metal | Comfortable |
| CPU only · 16 GB RAM | Works; slowest option, minutes for a few pages | Works; slightly slower than Q4_K_M |
Start a local recognition server, install OpenBMB’s SDK and turn a multi-page PDF into one Markdown file with tables and formulas in reading order. Then check it against the PDF.
Select the weights you want. The instructions, downloads and settings change with your choice.
The publisher has not provided a complete memory target for this task. Check its hardware guidance before starting.
Start at 8,192 tokens of context, the value OpenBMB uses with its SDK. Each page region is a separate short request, so a longer context only adds memory use without helping.
Choose where you want to run it. The instructions below update to match your selection.
Install Python 3.10 or newer from python.org (tick “Add python.exe to PATH”), then open PowerShell and install llama.cpp with winget. Close and reopen PowerShell afterwards.
Download Python Official llama.cpp releasesIn PowerShell, start llama.cpp’s server with OpenBMB’s SDK settings: model name minicpm-ocr, an 8,192-token context, one request at a time and reasoning off. The first run downloads the 0.81 GB + 0.90 GB projector from OpenBMB’s GGUF repository, including the vision projector. Leave this window open; the server listens only on this computer at http://127.0.0.1:8080.
OpenBMB GGUF files and SDK settingsOpen a second PowerShell window. Create a Python environment and install OpenBMB’s SDK. It provides the minicpmvocr command, which finds the layout of each page and sends every text block, table and formula to the server.
minicpm-ocr on PyPI MiniCPM-OCR GitHubPut a short PDF (two or three pages to start) in the folder you are in and name it document.pdf. Paste the command below into the second PowerShell window and press Enter to run it: the SDK detects each page’s layout and the server extracts the text, tables and formulas. It uses the CPU for layout detection, as in OpenBMB’s llama.cpp example, so no CUDA setup is needed; the first run also downloads the PP-DocLayoutV3 layout model into a models folder. Expect tens of seconds per page on a laptop CPU.
Publisher parse example (llama.cpp backend)Open output/document.md next to the PDF. Text should be in reading order, tables appear as HTML tables and formulas as LaTeX. Check a paragraph, a number and one table cell on each page. Per-page Markdown and structured JSON are in the run folder inside output. Stop the server with Ctrl+C when you are done.
output/document.md contains every page in reading order with tables and formulas, and spot checks of text, numbers and table cells match the PDF.
OpenBMB’s fastest whole-PDF route is its vLLM recipe or official Docker image on Linux with an NVIDIA GPU; this guide uses the publisher’s llama.cpp backend because it runs on every desktop. Checked November 9, 2026; not run by YouRunAI.
Keep the llama-server window open, wait for it to say it is listening, and check http://127.0.0.1:8080 in a browser. The --model name must be minicpm-ocr in both commands.
Use Python 3.10–3.12 in a fresh environment and upgrade pip first. On Linux with an NVIDIA GPU you can follow OpenBMB’s CUDA install instead.
Use the Q8_0 package, scan at a higher resolution, and check the per-page JSON to see which regions failed.
Original instructions, model files, and compatibility notes behind this setup.
Source-backed package and platform-route plan for private local chat with Qwen3.5 · 9B. Preserves the official Ollama 9B package, a smaller 4B family fallback, and a clearly labeled community uncensored GGUF option.
Run Qwen3.8 27B with Ollama, connect it to Cline in VS Code, and make one reviewable code change in a tiny local project.
Generate images from text prompts in ComfyUI with the fast distilled or more adjustable base 4B model. Save your results and reuse the visual workflow.