Skills

Minicpm5 Deploy Llama Cpp

Run MiniCPM5-1B or MiniCPM5-2B with llama.cpp using the released GGUF artifacts (F16 /...

Install

npx skills add OpenBMB/MiniCPM --skill minicpm5-deploy-llama-cpp -g -a claude-code -y
Repository
OpenBMB/MiniCPM11.8k
Category
Engineering
Updated
1mo ago
License
Apache-2.0
Context cost
Lightabout 894 tokens
Runs scripts
No, instructions only

What it does

Run MiniCPM5-1B or MiniCPM5-2B with llama.cpp using the released GGUF artifacts (F16 / Q8_0 / Q4_K_M). Use when the user wants CPU-only / consumer-GPU / cross-platform native deployment, asks for "llama.cpp", "llama-cli", "llama-server", "GGUF", or has no Python available.

Deploy MiniCPM5-1B and MiniCPM5-2B with llama.cpp

CPU / edge / consumer-GPU deployment via the released GGUF artifacts. The artifacts work directly with vanilla llama.cpp and every downstream runtime (Ollama / LM Studio / llama-cpp-python).

Required input

VarExampleDefault
GGUF_REPOopenbmb/MiniCPM5-2B-GGUFrequired; openbmb/MiniCPM5-1B-GGUF also works
QUANTQ4_K_M (1.56 GB, recommended) / Q8_0 (2.68 GB) / F16 (5.04 GB)Q4_K_M
NGL99 (all layers on GPU) / 0 (CPU only)99 if NVIDIA GPU, else 0
CTX8192 (default) up to 131072 (128 K)8192

Steps

1. Install llama.cpp

# macOS
brew install llama.cpp

# Linux / cross-platform: pre-built binary
curl -fsSL https://github.com/ggerganov/llama.cpp/releases/latest/download/llama-cli-linux.tar.gz | tar -xz
# OR build from source:
git clone --depth=1 https://github.com/ggerganov/llama.cpp.git && cd llama.cpp
mkdir build && cd build
cmake .. -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release    # CPU-only: omit GGML_CUDA=ON
cmake --build . --config Release -j $(nproc) --target llama-cli llama-server

2. Download the GGUF

mkdir -p ~/minicpm5 && cd ~/minicpm5
huggingface-cli download ${GGUF_REPO} MiniCPM5-2B-${QUANT}.gguf --local-dir .

3a. Interactive chat (CLI)

llama-cli -m MiniCPM5-2B-${QUANT}.gguf \
    -n 2048 --temp 1.0 --top-p 0.95 --min-p 0.0 -ngl ${NGL} -c ${CTX}

3b. OpenAI-compatible HTTP server

llama-server -m MiniCPM5-2B-${QUANT}.gguf \
    --port 8080 -ngl ${NGL} -c ${CTX} --jinja

4. Validate

curl http://localhost:8080/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "MiniCPM5-2B",
        "messages": [{"role":"user","content":"1+1=?"}],
        "temperature": 1.0, "top_p": 0.95, "min_p": 0.0, "max_tokens": 64
    }'

Expected: "2" in the reply.

Read the whole SKILL.md on GitHub

More in Engineering