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 -b starts 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 in images/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

ๆ›ดๆ–ฐ / Changelog

  • 2026-11-15๏ผš้ฆ–ๆฌกๅ‘ๅธƒ / first release.
Downloads last month
653
GGUF
Model size
0.8B params
Architecture
qwen35
Hardware compatibility
Log In to add your hardware

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp

Quantized
(10)
this model

Collection including AXERA-TECH/MiniCPM-OCR-1.0-AX8860-llama.cpp