minicpm5-deploy-vllm-ascend
Was er macht
Dieser Skill führt deine KI durch den Betrieb von MiniCPM5-2B auf Huawei-Ascend-Chips mit vLLM-Ascend. Er ist für Teams mit Ascend-Hardware gedacht, die einen Server für das Modell wollen.
Wann du ihn nutzt
- ✓Wenn du eine Huawei-Ascend-NPU hast und MiniCPM5-2B laufen lassen willst.
- ✓Wenn du CANN, torch_npu oder die Geräteeinstellungen von Ascend für das Modell einrichten musst.
- ✓Wenn du einen OpenAI-kompatiblen MiniCPM5-Server auf Ascend-Hardware willst.
Link zum Skill
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-vllm-ascend/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Hilf mir, MiniCPM5-2B mit vLLM auf unserem Huawei-Ascend-Server laufen zu lassen, und prüfe, ob die API antwortet.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill richtet eine passende vLLM- und vLLM-Ascend-Umgebung ein, wählt die Ascend-Geräte aus, startet den Server und testet ihn mit einer Chat-Anfrage.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Deploy MiniCPM5-2B with vLLM-Ascend
Use this skill for the BF16 / FP16 openbmb/MiniCPM5-2B checkpoint on Huawei Ascend NPU. vllm-ascend is installed alongside a matching vLLM release and supplies the Ascend backend.
Required input
| Variable | Example | Default |
|---|---|---|
MODEL_PATH |
openbmb/MiniCPM5-2B |
required |
PORT |
8000 |
8000 |
ASCEND_RT_VISIBLE_DEVICES |
0 |
0 |
CTX_LEN |
32768 |
32768; the native maximum is 131072 |
MEM_FRAC |
0.85 |
0.85 |
TP_SIZE |
1 |
number of visible devices |
Accept either the Hugging Face id or a local directory containing the MiniCPM5-2B model files.
Prerequisites
Use a compatible Linux Ascend environment with CANN, PyTorch, and TorchNPU installed. Keep the vLLM and vLLM-Ascend versions matched. The basic serving recipe below follows the tested vllm==0.18.0 / vllm-ascend==0.18.0 pair.
Device visibility is controlled by ASCEND_RT_VISIBLE_DEVICES; CUDA_VISIBLE_DEVICES does not select Ascend devices.
Install
The prebuilt image is the simplest option for a compatible Ascend host. This is a minimal single-device example; adjust device nodes and driver mounts for the host hardware and image documentation.
docker run -it --net=host --shm-size=1g \
--device /dev/davinci0 --device /dev/davinci_manager \
--device /dev/devmm_svm --device /dev/hisi_hdc \
-v /usr/local/Ascend/driver:/usr/local/Ascend/driver \
-v /usr/local/dcmi:/usr/local/dcmi \
-v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
quay.io/ascend/vllm-ascend:v0.18.0
For an existing CANN environment:
pip install vllm==0.18.0 vllm-ascend==0.18.0 \
--extra-index-url https://download.pytorch.org/whl/cpu
For built-in MiniCPM5 tool-call parsing, use the matching vllm==0.23.0 / vllm-ascend==0.23.0 stack described in Tool calling. The parser responses in the cookbook were produced with the upstream parser file on an older vLLM and a compatibility shim because the 0.23.0 stack was not available on the test hardware.
Prepare the environment
Run the CANN and NNAL setup scripts before starting vLLM. Change the paths if those components are installed elsewhere.
source /usr/local/Ascend/ascend-toolkit/set_env.sh
source /usr/local/Ascend/nnal/atb/set_env.sh
export ASCEND_RT_VISIBLE_DEVICES=${ASCEND_RT_VISIBLE_DEVICES:-0}
export LD_LIBRARY_PATH=$(python3 -c "import torch,os;print(os.path.dirname(torch.__file__))")/lib:\
$(python3 -c "import torch_npu,os;print(os.path.dirname(torch_npu.__file__))")/lib:$LD_LIBRARY_PATH
Check the driver and Python packages before loading the model:
npu-smi info
python3 -c "import torch, torch_npu; print(torch_npu.npu.is_available(), torch_npu.npu.device_count())"
If npu-smi reports a missing driver library, add the corresponding driver lib64 directories to LD_LIBRARY_PATH according to the host installation.
Launch the server
vllm serve "${MODEL_PATH}" \
--served-model-name MiniCPM5-2B \
--dtype bfloat16 \
--max-model-len ${CTX_LEN:-32768} \
--gpu-memory-utilization ${MEM_FRAC:-0.85} \
--tensor-parallel-size ${TP_SIZE:-1} \
--trust-remote-code \
--port ${PORT:-8000}
Set TP_SIZE to the number of devices in ASCEND_RT_VISIBLE_DEVICES when using tensor parallelism.
Validate chat completions
MiniCPM5-2B is think-only. Use temperature=1.0, top_p=0.95, and enable_thinking=true:
curl http://localhost:${PORT:-8000}/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,
"max_tokens": 256,
"chat_template_kwargs": {"enable_thinking": true}
}'
Expect HTTP 200 and an answer containing 2 in choices[0].message.content. Leave enough max_tokens for the model's reasoning text.
Tool calling
MiniCPM5-2B emits XML-style tool calls. This section requires matching vLLM and vLLM-Ascend 0.23.0; that release includes the minicpm5 parser in the OpenAI server layer, so no parser plugin file is needed:
pip install vllm==0.23.0
pip install vllm-ascend==0.23.0 \
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
vllm serve "${MODEL_PATH}" \
--served-model-name MiniCPM5-2B \
--dtype bfloat16 \
--max-model-len ${CTX_LEN:-3276
Häufige Fragen
Funktioniert er mit NVIDIA-GPUs?
Nein. Der Skill ist für Huawei-Ascend-NPU-Systeme gedacht und wählt Geräte über ASCEND_RT_VISIBLE_DEVICES aus.
Auf welche Versionen stützt er sich?
Der Skill nennt das getestete Paar vllm 0.18.0 und vllm-ascend 0.18.0. Beide Versionen müssen zusammenpassen.
Wie lang ist der Standardkontext?
Der Standard liegt bei 32768, die nativen Maximalwerte des Modells bei 131072.
Details
Originalbeschreibung des Autors
Deploy MiniCPM5-2B with vLLM on Huawei Ascend NPU using vLLM-Ascend. Use when the user mentions vLLM-Ascend, Ascend NPU, Huawei Ascend, CANN, torch_npu, davinci devices, or wants an OpenAI-compatible MiniCPM5 server on Ascend hardware.
repo: OpenBMB/MiniCPM
Beliebtheit
- GitHub-Sterne
- 12k
- Platz im Ranking
- #11537
- Lizenz
- Apache-2.0
- Aktualisiert
- 21.9.2026
Kommentare
- …
Weitere Skills aus diesem Repository
minicpm5-deploy-litert
12kLässt deinen Agenten MiniCPM5-Modelle auf einem Computer oder Android-Telefon mit der LiteRT-LM-Laufzeit von Google betreiben, mit einer einzigen Modelldatei.
minicpm5-deploy-llama-cpp
12kZeigt deinem Agenten, wie er MiniCPM5-Modelle mit llama.cpp auf einer CPU oder einer Heim-Grafikkarte betreibt, mit fertigen GGUF-Dateien.
minicpm5-deploy-lmstudio
12kHilft deinem Agenten, MiniCPM5-Modelle in LM Studio zu betreiben, einer Desktop-App mit Chat-Fenster, und deren lokalen Server im OpenAI-Stil zu starten.
minicpm5-deploy-mlx
12kLässt deinen Agenten MiniCPM5-Modelle nativ auf Apple-Silicon-Macs mit dem MLX-Framework von Apple betreiben, für schnellen lokalen Chat und Textgenerierung.
Ähnliche Skills
openclaw-update
394kHilft deinem Agenten, ein bestehendes OpenClaw-Gateway zu aktualisieren, mit der Methode, die zu deiner Installation passt, während deine Sitzung weiterläuft.
diagnose-gateway
394kHilft deinem Agenten herauszufinden, warum dein OpenClaw-Gateway fehlschlägt, indem er Einstellungen, Kanäle und Ports prüft, ohne etwas zu ändern.
crabbox-apps
394kHilft deinem Agenten, eine App auf einer temporären Cloud-Maschine zu öffnen und auszuführen und ihre Ansicht in deinem Chat-Seitenpanel zu zeigen.