minicpm5-deploy-vllm-ascend
यह क्या करती है
यह स्किल आपके AI को vLLM-Ascend से Huawei Ascend चिप्स पर MiniCPM5-2B चलाने का मार्गदर्शन देती है। यह उन टीमों के लिए है जिनके पास Ascend हार्डवेयर है और उन्हें मॉडल के लिए server चाहिए।
कब इस्तेमाल करें
- ✓जब आपके पास Huawei Ascend NPU है और आप MiniCPM5-2B चलाना चाहते हैं।
- ✓जब आपको मॉडल के लिए CANN, torch_npu या Ascend device सेटिंग सेट करनी हो।
- ✓जब आप Ascend हार्डवेयर पर OpenAI-compatible MiniCPM5 server चाहते हैं।
Skill का लिंक
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-vllm-ascend/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“vLLM से हमारे Huawei Ascend server पर MiniCPM5-2B चलाने में मदद कीजिए, और जाँचिए कि API जवाब देता है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल मेल खाता vLLM और vLLM-Ascend वातावरण सेट करती है, Ascend devices चुनती है, server शुरू करती है, और एक chat अनुरोध से परीक्षण करती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
क्या यह NVIDIA GPU पर काम करती है?
नहीं। स्किल Huawei Ascend NPU सिस्टम के लिए है, और ASCEND_RT_VISIBLE_DEVICES से devices चुनती है।
यह कौन से संस्करणों पर निर्भर है?
स्किल बताती है कि परखी गई जोड़ी vllm 0.18.0 और vllm-ascend 0.18.0 है, और दोनों संस्करण मेल खाने चाहिए।
डिफ़ॉल्ट context length क्या है?
डिफ़ॉल्ट 32768 है, और मॉडल की मूल अधिकतम सीमा 131072 है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 12k
- रैंकिंग में स्थान
- #11537
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 21/9/2026
कमेंट
- …
इस repository की और skills
minicpm5-deploy-litert
12kआपके एजेंट को Google के LiteRT-LM रनटाइम से कंप्यूटर या Android फ़ोन पर MiniCPM5 मॉडल चलाने देती है, एक ही मॉडल फ़ाइल के साथ।
minicpm5-deploy-llama-cpp
12kआपके एजेंट को दिखाती है कि llama.cpp से CPU या घरेलू graphics card पर MiniCPM5 मॉडल कैसे चलाएँ, तैयार GGUF फ़ाइलों के साथ।
minicpm5-deploy-lmstudio
12kआपके एजेंट को LM Studio में MiniCPM5 मॉडल चलाने में मदद करती है, जो चैट विंडो वाला डेस्कटॉप ऐप है, और उसका लोकल OpenAI शैली का server शुरू करती है।
minicpm5-deploy-mlx
12kआपके एजेंट को Apple के MLX फ़्रेमवर्क से Apple Silicon Mac पर MiniCPM5 मॉडल सीधे चलाने देती है, तेज़ लोकल चैट और टेक्स्ट जनरेशन के लिए।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।