anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

OpenBMB’s open multimodal models: MiniCPM-V 4.7 reads images, documents and video, and MiniCPM-o 4.5 also hears and speaks. The setup notes cover Transformers, Ollama, llama.cpp, vLLM, SGLang, a hosted API and phone apps.
MiniCPM-V is an open-source project on GitHub in the Developer category, listed by Mindket. It is free. This is version 2, last updated on . Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.
pip install "transformers[torch]>=5.18.0" torchvision torchcodec
MiniCPM-V and MiniCPM-o are open multimodal models from OpenBMB, developed by THUNLP and ModelBest. The README’s line is “See, hear, and interact on your local devices”. MiniCPM-V 4.7 reads images, several images at once, documents and video, in two sizes: 35B-A3B, the series’ first mixture-of-experts model, and a dense 1B. MiniCPM-o 4.5 is a 9B model that takes video and audio in while it writes text and speaks. This repository holds the README, the docs and folders such as eval_mm, finetune and web_demos. The weights are on Hugging Face and ModelScope, and the phone apps are in a second repository.
Developers and researchers who want a model that reads images, documents and video on their own hardware, and people who build phone or edge apps. It needs real hardware, and the size you pick decides how much. Skip it if you want a polished chat product: the phone apps are demos, and the live demos run on someone else’s servers.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Apps and services | Developers adding image reading to a product | Serve a model behind an OpenAI-style API and send it pictures | A developer starts transformers serve and sends the page’s request: an image URL and the question “What causes this phenomenon?” |
| Mobile and edge | iOS, Android and HarmonyOS developers | Install the pre-built apps, or build them from the apps repository | An iPhone owner opens Settings, then Model Management, taps Download All for the 1B model and then Use This Model. |
| Local AI | People with a laptop or desktop | Run the official GGUF files with llama.cpp | Someone builds llama.cpp, downloads the 1B files and runs llama-mtmd-cli with --image xx.jpg and the prompt “What is in the image?” |
| Live assistants | Teams that build voice and video assistants | Run the MiniCPM-o 4.5 demo, which takes video and audio in and speaks back | A developer follows the page’s demo route on an Apple M4 Max with 24 GB of RAM, its stated need for full-duplex streaming. |
MiniCPM-V is a family of models, not a coding-agent plug-in. The README documents no agent integration. The docs give these routes to run it.
| Route | Good for | Watch for |
|---|---|---|
| Transformers | The first route in the 4.7 guide, with a light OpenAI-compatible server | Needs transformers 5.18.0 or newer |
| llama.cpp | The official GGUF files, on a CPU, Metal or CUDA build | Build from a checkout at or after llama.cpp pull request 29416 |
| Ollama | A pull from its registry, or a local GGUF | On 3 November 2026 its bundled engine could not yet load 4.7 GGUF files |
| vLLM | GPU serving with an OpenAI-style API | 35B-A3B needs several GPUs or 4-bit weights |
| SGLang | GPU serving | On 3 November 2026 it needed a fork, tc-mb/sglang |
| Hosted API | Nothing to install | Your input goes to the maker’s server, with an API key |
| Phone apps | iOS, Android and HarmonyOS, with the model on the device | 35B-A3B streams its experts from SSD, so it needs fast storage |
Get it saves a zip of Mindket’s setup notes in your downloads folder, with a page for each route from OpenBMB’s README, docs and cookbook. The main route is Transformers, which the 4.7 page lists first.
| Need | Detail |
|---|---|
| Transformers | 5.18.0 or newer for MiniCPM-V 4.7. The MiniCPM-o 4.5 page pins 4.51.0 exactly, so the two cannot share one environment |
| Packages | torchvision, and torchcodec for video. If torchcodec fails to load on your CUDA version, the page swaps in av |
| GPU memory | The 4.7 page gives no figure. The vLLM guide says about 70 GB in bf16 for 35B-A3B, and one consumer GPU for 1B |
| A phone | Only for the apps. The apps README recommends 4 GB of RAM or more for 1B and 12 GB or more for 35B-A3B |
pip install "transformers[torch]>=5.18.0" torchvision torchcodec
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "openbmb/MiniCPM-V-4.7-35B-A3B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, torch_dtype="auto", device_map="auto"
)The page uses the 35B-A3B name. For the 1B size, swap in openbmb/MiniCPM-V-4.7-1B.
For a quick test, Transformers includes a light OpenAI-compatible server. The page says it suits quick testing and moderate load. Start it, then send a request.
pip install "transformers[serving]>=5.18.0" transformers serve openbmb/MiniCPM-V-4.7-35B-A3B --port 8000 --host 0.0.0.0
curl -s http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "openbmb/MiniCPM-V-4.7-35B-A3B",
"messages": [{
"role": "user",
"content": [
{"type": "image_url", "image_url": {"url": "https://huggingface.co/datasets/openbmb/DemoCase/resolve/main/refract.png"}},
{"type": "text", "text": "What causes this phenomenon?"}
]
}]
}'The page’s command listens on every network interface because of --host 0.0.0.0. Use 127.0.0.1 if only you need it. For instruct mode the pages recommend temperature 0.7, top_p 0.95, top_k 100, min_p 0.0, presence_penalty 0 and repetition_penalty 1.03.
You have no big GPU and want to know what a photo shows. You build llama.cpp, download the 1B F16 file and its mmproj file from Hugging Face, and run the cookbook’s command from build/bin/.
./llama-mtmd-cli \
-m /path/to/MiniCPM-V-4.7-1B/MiniCPM-V-4_7-1B-F16.gguf \
--mmproj /path/to/MiniCPM-V-4.7-1B/mmproj-model-f16.gguf \
-c 8192 --temp 0.7 --top-p 0.8 --top-k 100 --repeat-penalty 1.05 \
--reasoning off \
--image xx.jpg -p "What is in the image?"The xx.jpg is the guide’s placeholder for your picture. The guide shows no output, so what you get depends on the photo. The GGUF files at the root of each repository switch thinking off in their template, so replies come back plain.
If you are new. A multimodal model takes more than text. You give MiniCPM-V a picture or a video with a question, and it answers in text. MiniCPM-o also takes audio and can answer in speech. The 1B model is the small one. Try a live demo from the README first, to see what it does before you install anything. Then start with the 1B model and one route from the table.
For experts. The 4.7 page says a mixture-of-experts model’s weights often do not fit in device memory, and that loading experts on demand can stall decoding. Its answer is Lookahead Expert Scheduling, which predicts the experts the next layer needs and loads them early, with layer-wise quantization and DSpark speculative sampling. The page reports 13+ tokens a second with 3 GB of memory on an iPhone 17 Pro Max. The apps README adds that the 35B-A3B variant streams its experts from SSD and was validated on a 12 GB iPhone 17 Pro Max.
Two image settings matter in Transformers. The setting downsample_mode is 16x by default, and 4x keeps four times as many visual tokens for finer detail. It must go to both apply_chat_template and generate. The setting max_slice_nums defaults to 9, and the page recommends 36 for an image and 1 for video.
Thinking differs by route. The vLLM guide says its chat template turns thinking on by default, so pass enable_thinking false for plain replies. The hosted API has it off by default. The llama.cpp guide’s own commands use top-p 0.8 and repeat-penalty 1.05, while its sampling note recommends 0.95 and 1.03. DSpark draft heads speed up decoding, but llama-mtmd-cli does not support draft models, so use llama-cli or llama-server and pair each draft with the target of the same size.
Most of it runs on your machine, and a few paths reach out.
This kit holds setup notes only. Mindket wrote them. The models, code, apps and docs come from OpenBMB's repository: https://github.com/OpenBMB/MiniCPM-V
These notes are not made or endorsed by OpenBMB. The README calls the project "MiniCPM-V & MiniCPM-o · See, hear, and interact on your local devices." and says it is developed by THUNLP (https://nlp.csai.tsinghua.edu.cn/) and ModelBest (https://modelbest.cn/).
License: Apache-2.0. The README says "Code and model weights are released under Apache-2.0." The LICENSE file (https://github.com/OpenBMB/MiniCPM-V/blob/main/LICENSE) is the standard Apache License 2.0 text, and its appendix reads "Copyright OpenBMB". The project page in the docs repeats it under Model License: https://github.com/OpenBMB/MiniCPM-V/blob/main/docs/project_en.md
The same page has a Statement. It says the models generate content from the multimodal text they learned from, that what they write does not represent the developers' views, and that the developers take no liability for problems that come from using the models.
eval_mm, finetune and web_demos, which these notes do not cover. The model weights are on Hugging Face and ModelScope, and the on-device apps are in a second repository, https://github.com/OpenBMB/MiniCPM-V-AppsNothing installs from this kit. Each route below downloads its own files: a Python package and weights, an Ollama model, a llama.cpp build and GGUF files, a serving framework, or a phone app. Pick one route.
| Route | What it is | Notes |
|---|---|---|
| setup/transformers.md | Hugging Face Transformers, with an optional OpenAI-compatible server | The first route in the model guide |
| setup/ollama.md | Ollama, from the registry or from a local GGUF | Read its note on engine support first |
| setup/llama-cpp.md | llama.cpp with the official GGUF files | CPU, Metal or CUDA builds |
| setup/vllm.md | vLLM serving | For GPUs |
| setup/sglang.md | SGLang serving | Needs a fork, tc-mb/sglang, as the guide said on 3 November 2026 |
| setup/hosted-api.md | The maker's hosted API | Not local: your input goes to their server |
| setup/phones-and-edge.md | iOS, Android, HarmonyOS apps and chip platforms | Runs MiniCPM-V 4.7 and some earlier models |
| setup/minicpm-o-4-5.md | The 9B omnimodal model | Its own install line and demos |
The docs name LLaMA-Factory and SWIFT for fine-tuning, and give quantization guides for GGUF, BNB, AWQ, GPTQ and FP8 or INT4. They live in the MiniCPM-V Cookbook, not in these notes. Start at https://github.com/OpenSQZ/MiniCPM-V-CookBook and the deployment page https://github.com/OpenBMB/MiniCPM-V/blob/main/docs/deployment_en.md
The README and the docs give no uninstall steps and no update command. A new model generation is a new set of weights and a new guide, so follow the version named in each page. Each route keeps its own downloads, and you remove them with that tool's own means.
The README links live demos on Hugging Face Spaces and on minicpmo45.modelbest.cn, and a hosted API. They run on the maker's or a host's servers, not on your machine. The MiniCPM-o 4.5 page warns that the web demo hosted on overseas servers can be slow or miss part of the output, and recommends a local deployment.
README.md 5 KB setup/hosted-api.md 2 KB setup/llama-cpp.md 4 KB setup/minicpm-o-4-5.md 4 KB setup/ollama.md 3 KB setup/phones-and-edge.md 4 KB setup/sglang.md 3 KB setup/transformers.md 4 KB setup/vllm.md 3 KB
Updated by Mindket to the current version of this kit.
Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.