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"
File size: 3,275 Bytes
fd5eade | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | #!/bin/sh
# Reproduce the release performance table on an AX8860 board.
# sh bench.sh short / 50-token / 4k-token prompts, prefill and decode
# sh bench.sh ppl perplexity, -c 512, -ub 1 and -ub 4, Chinese and English
set -u
H=$(cd "$(dirname "$0")" && pwd)
export LD_LIBRARY_PATH=/opt/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
G=${GGUF:-$H/MiniCPM5-2B-Q8_0.gguf}
K=${GGML_AXERA_KERNEL_DIR:-$H/kernels}
BIN=$H/bin/llama-completion
BINPPL=$H/bin/llama-perplexity
D=$H/bench-logs
mkdir -p "$D"
CTX=${CTX:-8192}
MAXCTX=${MAXCTX:-131072}
extract() {
kind=$1
line=$2
case "$kind" in
ms) printf '%s\n' "$line" | sed -n 's/.*= *\([0-9][0-9.]*\) ms.*/\1/p' ;;
tps) printf '%s\n' "$line" | sed -n 's/.*, *\([0-9][0-9.]*\) tokens per second.*/\1/p' ;;
n) printf '%s\n' "$line" | sed -n 's/.*ms \/ *\([0-9][0-9]*\) tokens.*/\1/p' ;;
esac
}
run_case() {
tag=$1
ctx=$2
prompt=$3
log=$D/$tag.log
start=$(date +%s)
GGML_AXERA_KERNEL_DIR=$K "$BIN" -m "$G" -ngl 99 -c "$ctx" -b 4096 -ub 4096 -f "$prompt" \
-n 50 --temp 0 -no-cnv --no-display-prompt > "$log" 2>&1
rc=$?
elapsed=$(( $(date +%s) - start ))
pms=$(extract ms "$(grep -a 'prompt eval time' "$log" | tail -1)")
ptps=$(extract tps "$(grep -a 'prompt eval time' "$log" | tail -1)")
ptok=$(extract n "$(grep -a 'prompt eval time' "$log" | tail -1)")
dtps=$(extract tps "$(grep -a ' eval time' "$log" | tail -1)")
[ -n "$pms" ] || pms=NA
[ -n "$ptps" ] || ptps=NA
[ -n "$ptok" ] || ptok=NA
[ -n "$dtps" ] || dtps=NA
printf 'RESULT tag=%-16s c=%-6s prompt=%-12s prompt_tokens=%-5s prompt_ms=%-9s prompt_tok_s=%-9s decode_tok_s=%-9s elapsed_s=%-4s rc=%s\n' \
"$tag" "$ctx" "$(basename "$prompt")" "$ptok" "$pms" "$ptps" "$dtps" "$elapsed" "$rc"
}
run_ppl() {
for lang in zh en; do
for ub in 1 4; do
log=$D/ppl.$lang.ub$ub.log
GGML_AXERA_KERNEL_DIR=$K "$BINPPL" -m "$G" -ngl 99 -c 512 --chunks 2 -b 512 -ub "$ub" \
-f "$H/ppl_$lang.txt" > "$log" 2>&1
rc=$?
ppl=$(grep -a 'Final estimate: PPL' "$log" | tail -1 | sed -n 's/.*PPL = *\([0-9][0-9.]*\).*/\1/p')
[ -n "$ppl" ] || ppl=NA
printf 'PPL_RESULT lang=%s ub=%s ppl=%s rc=%s\n' "$lang" "$ub" "$ppl" "$rc"
done
done
}
case "${1:-}" in
ppl) run_ppl; exit $? ;;
esac
echo "BENCH_META package=$H"
echo "BENCH_META completion_md5=$(md5sum "$BIN" | awk '{print $1}')"
echo "BENCH_META kernels_md5=$(md5sum "$K/kernels.md5" 2>/dev/null | awk '{print $1}')"
echo "BENCH_META bin_commit=$(cat "$H/BIN_COMMIT" 2>/dev/null | tr -d '\n')"
echo "BENCH_META llama_version=$("$BIN" --version 2>&1 | tr '\n' ' ' | sed 's/ */ /g')"
echo "BENCH_WARMUP one unmeasured 4k run, 8 tokens"
GGML_AXERA_KERNEL_DIR=$K "$BIN" -m "$G" -ngl 99 -c 8192 -b 4096 -ub 4096 -f "$H/p4k.txt" \
-n 8 --temp 0 -no-cnv --no-display-prompt > "$D/warmup.log" 2>&1
echo "BENCH_WARMUP rc=$?"
run_case short50_c8192 "$CTX" "$H/p_short.txt"
run_case chat50_c8192 "$CTX" "$H/p_chat50.txt"
run_case p4k50_c8192 "$CTX" "$H/p4k.txt"
run_case short50_cmax "$MAXCTX" "$H/p_short.txt"
run_case p4k50_cmax "$MAXCTX" "$H/p4k.txt"
echo BENCH_DONE
|