Instructions to use AXERA-TECH/MiniCPM5-2B-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/MiniCPM5-2B-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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0 # Run inference directly in the terminal: llama cli -hf AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
Use Docker
docker model run hf.co/AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp with Ollama:
ollama run hf.co/AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
- Unsloth Desktop
- Pi
How to use AXERA-TECH/MiniCPM5-2B-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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp with Docker Model Runner:
docker model run hf.co/AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
- Lemonade
How to use AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
Run and chat with the model
lemonade run user.MiniCPM5-2B-AX8860-llama.cpp-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use AXERA-TECH/MiniCPM5-2B-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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AXERA-TECH/MiniCPM5-2B-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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0
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/MiniCPM5-2B-AX8860-llama.cpp:Q8_0" \ --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"
Download README.md from AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp: direct link, hf CLI and curl.
- Browser
- Download file 3.81 kB
-
https://huggingface.co/AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp/resolve/main/README.md
- Command line
-
hf download hf://AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp/README.md
-
curl -L -o README.md https://huggingface.co/AXERA-TECH/MiniCPM5-2B-AX8860-llama.cpp/resolve/main/README.md
base_model: openbmb/MiniCPM5-2B
library_name: llama.cpp
MiniCPM5-2B on AX8860 (llama.cpp + ggml-axera)
在爱芯 AX8860 的 NPU 上用 llama.cpp 运行 MiniCPM5-2B 文本模型:思考开关、工具调用,OpenAI 兼容服务。 MiniCPM5-2B on the Axera AX8860 NPU with llama.cpp: text model with a thinking switch, tool calling and an OpenAI-compatible server.
性能 / Performance
| decode | 59.5 tokens/s |
| 4k prompt prefill | 6219 tokens/s(3907 token 0.63 s) |
| 上下文 / context | 最长 / up to 131072 |
sh bench.sh 复现 / reproduce(生成 50 token / 50 generated tokens):
| prompt | -c |
prompt 耗时 / time | decode tokens/s |
|---|---|---|---|
| 5 token | 8192 | 0.04 s | 59.5 |
| 46 token | 8192 | 0.05 s | 59.2 |
| 3907 token | 8192 | 0.63 s | 51.9 |
| 5 token | 131072 | 0.04 s | 59.2 |
| 3907 token | 131072 | 0.63 s | 52.1 |
快速开始 / Quick start
sh run.sh "The capital of France is" 64 # 文本补全 / completion
sh run.sh -c # 命令行对话 / chat
sh run.sh -s 8080 # OpenAI 兼容服务 / server
sh bench.sh # 性能复现 / benchmark
sh bench.sh ppl # 困惑度 / perplexity
需要 AX8860,SDK V0.5.1 或更新;HF 下载的文件没有执行权限,用 sh 调用即可 / needs an AX8860 with SDK V0.5.1+; call the scripts with sh.
服务请求 / Server request:
curl http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "用一句话介绍长江"}],
"chat_template_kwargs": {"enable_thinking": false}
}'
文件 / Files
| 文件 / File | 说明 / Description |
|---|---|
MiniCPM5-2B-Q8_0.gguf |
模型权重(官方 Q8_0)/ weights (official Q8_0),2.68 GB,md5 57e37e3fd7758a9e4f7c687cf5c0e257 |
bin/ |
llama.cpp 板端程序(静态链接)/ board programs (static) |
kernels/ |
NPU kernel 2 个:prefill、decode(含输出头)+ manifest.json / two kernels: prefill and decode (with the output head) + manifest.json |
run.sh,chat_template.jinja |
运行脚本与服务端对话模板 / run script and the server's chat template |
bench.sh 及 prompt |
性能与困惑度复现 / benchmark and perplexity |
说明 / Notes
- 权重在加载时由 GGUF 转成 MXFP8,KV 为 BF16;Q8_0 与 F16 GGUF 都可加载 / weights are converted from the GGUF to MXFP8 at load, with a BF16 KV cache; both Q8_0 and F16 GGUFs load.
- 一套 kernel 覆盖到 131072 上下文,KV 按
-c分配;用环境变量CTX调整 / one kernel set covers up to 131072 tokens and allocates the KV by-c; setCTXto change it. - 思考开关用
chat_template_kwargs.enable_thinking;工具调用使用包内chat_template.jinja/ toggle thinking withchat_template_kwargs.enable_thinking; tool calling uses the bundledchat_template.jinja. - 没有 MTP 头,不支持 MTP 投机解码 / no MTP head, so no MTP speculative decoding.
run.sh -c需要真实终端 / chat mode needs an interactive terminal.- 运行时独占 NPU 4 核;服务端
-np 1/ takes all 4 NPU cores; the server runs-np 1.
正确性 / Correctness
- 文本补全、服务端对话与思考开关在板上工作正常 / completion, server chat and the thinking switch work on the board.
- PPL(
sh bench.sh ppl,-c 512)/ perplexity:
| 语言 / language | -ub 1 |
-ub 4 |
|---|---|---|
| 中文 / zh | 16.70 | 16.72 |
| 英文 / en | 13.33 | 13.44 |
源码 / Sources
- llama.cpp:ZHEQIUSHUI/llama.cpp @
6613735ce
更新 / Changelog
- 2026-11-15:首次发布 / first release.