Instructions to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Use Docker
docker model run hf.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
- Llama new
- LM Studio
- Jan
- Ollama
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Ollama:
ollama run hf.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
- Unsloth Desktop
- Pi
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Docker Model Runner:
docker model run hf.co/AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
- Lemonade
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Run and chat with the model
lemonade run user.MiniCPM-OCR-1.0-AX8860-llama.cpp-BF16
List all available models
lemonade list
- Hermes Agent
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp:BF16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
MiniCPM-OCR-1.0 on AX8860 (llama.cpp + ggml-axera)
ๅจ็ฑ่ฏ AX8860 ็ NPU ไธ็จ llama.cpp ่ฟ่ก MiniCPM-OCR-1.0๏ผๆๆกฃใ่กจๆ ผใๆชๅพ็ไธญ่ฑๆ OCR๏ผOpenAI ๅ ผๅฎนๆๅกใ MiniCPM-OCR-1.0 on the Axera AX8860 NPU with llama.cpp: Chinese/English OCR for documents, tables and screenshots, with an OpenAI-compatible server.
ๆง่ฝ / Performance
| ๅพๅ่ฏทๆฑๆป่ๆถ / image request, end to end | ไธญไฝๆฐ / median 1.62 s๏ผๅพๅ็ผ็ + prefill + ็ๆ / encode + prefill + generation๏ผ |
| ๅพๅ OCR decode / OCR decode | 143.4 tokens/s |
| ๆๆฌ decode / text decode | 154.9 tokens/s |
| 4k prompt prefill | 7784 tokens/s๏ผ3908 token 0.50 s๏ผ |
| ไธไธๆ / context | 4096 |
sh bench.sh ๅค็ฐ / reproduce๏ผ-c 4096๏ผ่ดชๅฟ่งฃ็ ๏ผ3 ๆฌกๅไธญไฝๆฐ / greedy, median of 3 runs๏ผ๏ผ
| ้กน็ฎ / Item | ็ปๆ / Result |
|---|---|
| 5 token prompt | 0.03 s๏ผdecode 154.9 tokens/s |
| 3908 token prompt | 0.50 s๏ผdecode 143.9 tokens/s๏ผ็ๆ 128 token / 128 generated tokens๏ผ |
| ๅพๅ็ผ็ / image encode | 1.61 s๏ผdoc_en.png๏ผ1782 image tokens๏ผ |
| ๅพๅ OCR decode | 143.4 tokens/s๏ผ10 ๅพๅ 2 ๆฌก / 10 images, 2 requests each๏ผ |
| NPU ๅ ๅญ / NPU memory (CMM) | ๅ ่ฝฝๅ / after load 2.08 GiB๏ผๅณฐๅผ / peak 3.01 GiB |
| ไธปๆบๅ ๅญ / host RSS | ๅ ่ฝฝๅ / after load 182 MiB๏ผๅณฐๅผ / peak 868 MiB |
ๅฟซ้ๅผๅง / Quick start
sh run.sh -i images/doc_en.png "Text Recognition:" 256 # ๅๅพ OCR / one image
sh run.sh -b images "Text Recognition:" 256 # ็ฎๅฝๅ
ๅ
จ้จ PNG / every PNG in a directory
sh run.sh -s 8080 # OpenAI ๅ
ผๅฎนๆๅก / server
sh run.sh "The capital of France is" 64 # ๆๆฌ่กฅๅ
จ / text completion
sh bench.sh # ๆง่ฝๅค็ฐ / benchmark
้่ฆ AX8860๏ผSDK V0.5.1 ๆๆดๆฐ๏ผHF ไธ่ฝฝ็ๆไปถๆฒกๆๆง่กๆ้๏ผ็จ sh ่ฐ็จๅณๅฏ / needs an AX8860 with SDK V0.5.1+; call the scripts with sh.
ๆไปถ / Files
| ๆไปถ / File | ่ฏดๆ / Description |
|---|---|
gguf/minicpm-ocr-1.0-bf16.gguf |
ๆๆฌๆ้ / text weights๏ผ1.52 GB๏ผmd5 590cdaebcd34ee334788319792e96f8e |
gguf/mmproj-minicpm-ocr-1.0-bf16.gguf |
่ง่ง็ผ็ ๅจ / vision encoder๏ผ0.9 GB๏ผmd5 371156c5cfa978183e505a95a0aa0bf6 |
bin/ |
llama.cpp ๆฟ็ซฏ็จๅบ๏ผ้ๆ้พๆฅ๏ผ/ board programs (static) |
kernels/ |
NPU kernel 3 ไธช๏ผๆๆฌ prefillใๆๆฌ decode๏ผๅซ่พๅบๅคด๏ผใ่ง่ง็ผ็ ๅจ + manifest.json / three kernels: text prefill, text decode (with the output head) and the vision encoder + manifest.json |
run.sh๏ผchat_template.jinja |
่ฟ่ก่ๆฌไธๆๅก็ซฏๅฏน่ฏๆจกๆฟ / run script and the server's chat template |
bench.sh๏ผscripts/ ๅ prompt |
ๆง่ฝๅค็ฐ / benchmark |
images/ |
10 ๅผ OCR ๆต่ฏๅพไธๅ่ๆๆฌ / 10 OCR test images with reference text |
่ฏดๆ / Notes
- ๆๆฌๆ้ๅจๅ ่ฝฝๆถ็ฑ GGUF ่ฝฌๆ MXFP8๏ผKV ไธบ BF16๏ผ่ง่งๆ้ไธบ BF16 / text weights are converted from the GGUF to MXFP8 at load, with a BF16 KV cache; vision weights are BF16.
- ไธไธๆ 4096๏ผๅ ๅ 10 ๅผ ๅพ็ prompt ๆ้ฟ 1830 token / context 4096; the longest prompt among the 10 bundled images is 1830 tokens.
- ๆๅก็ซฏ้ป่ฎคๅ
ณ้ญๆ่๏ผ
--reasoning off๏ผ๏ผrun.sh -bไผไธดๆถ่ตทไธไธชๆๅก๏ผ็ซฏๅฃ 18258๏ผ้ๅพ่ฏทๆฑ / the server does not think by default;run.sh -bstarts a temporary server (port 18258) and sends one request per image. - ๆต่ฏๅพ็ฑ่ๆฌ็จ Noto CJK ๅญไฝ็ๆ๏ผๅ่ๆๆฌๅจ
images/reference.json/ the test images are generated with the Noto CJK font; reference text is inimages/reference.json. - ่ฟ่กๆถ็ฌๅ NPU 4 ๆ ธ๏ผๆๅก็ซฏ
-np 1/ takes all 4 NPU cores; the server runs-np 1.
ๆญฃ็กฎๆง / Correctness
- 10 ๅผ ๆต่ฏๅพ็ๅๅพไธๆน้ OCR ๅจๆฟไธๅ่ฟๅๆญฃ็กฎๅฏ่ฏป็ไธญ่ฑๆๆๆฌ / single-image and batch OCR of the 10 test images return correct Chinese and English text on the board.
- ๆๆฌ PPL๏ผๆฟไธ 174.56๏ผCPU ๅ่ 172.74๏ผ+1.05%๏ผ/ text perplexity: 174.56 on the board against 172.74 on the CPU reference (+1.05%).
- prompt cache ๅๅๆต่ฏ 160 ไธช่ฏทๆฑ๏ผ็ผๅญ้่ฏฏ 0 / 160-request prompt-cache stress test with no cache error.
ๆบ็ / Sources
- llama.cpp๏ผZHEQIUSHUI/llama.cpp @
6613735ce
ๆดๆฐ / Changelog
- 2026-11-15๏ผ้ฆๆฌกๅๅธ / first release.
- Downloads last month
- 653
16-bit