minicpm5-deploy-vllm
它能做什么
这个技能指导你的 AI 使用 vLLM 运行 MiniCPM5,vLLM 是一个专为 NVIDIA GPU 上处理大量请求而构建的服务器。适合希望为该模型获得生产级 API 的团队。
适用场景
- ✓你想在 NVIDIA GPU 上为 MiniCPM5 获得高流量 API 的时候。
- ✓你的应用需要兼容 OpenAI 的 REST 端点的时候。
- ✓你准备把模型从测试转为生产使用的时候。
技能链接
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-vllm/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我在我的 NVIDIA GPU 上用 vLLM 启动 MiniCPM5 API 服务器,以便我的应用可以向它发送请求。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能安装 vLLM,使用你选择的模型和设置启动服务器,等待其就绪,并用一个测试请求进行检查。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Deploy MiniCPM5-1B and MiniCPM5-2B with vLLM
OpenAI-compatible server for the BF16 / FP16 MiniCPM5-1B or MiniCPM5-2B checkpoint.
Required input
| Var | Example | Default |
|---|---|---|
MODEL_PATH |
openbmb/MiniCPM5-2B |
required; openbmb/MiniCPM5-1B also works |
PORT |
8000 |
8000 |
GPU_ID |
0 |
0 |
CTX_LEN |
131072 (128 K) |
131072; lower if VRAM tight |
MEM_FRAC |
0.85 |
0.85; lower on shared GPUs |
Steps
1. Install (once)
pip install "vllm>=0.21" # latest (CUDA 13.x driver hosts)
# pip install "vllm==0.10.1.1" # fallback for CUDA 12.x driver hosts
2. Launch
CUDA_VISIBLE_DEVICES=${GPU_ID} vllm serve "${MODEL_PATH}" \
--served-model-name MiniCPM5-2B \
--dtype bfloat16 \
--max-model-len ${CTX_LEN} \
--gpu-memory-utilization ${MEM_FRAC} \
--port ${PORT}
Wait for Application startup complete in the log.
3. Validate
curl http://localhost:${PORT}/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": 64,
"chat_template_kwargs": {"enable_thinking": true}
}'
Expected: choices[0].message.content contains a coherent answer.
Sampling defaults
{"temperature": 1.0, "top_p": 0.95, "chat_template_kwargs": {"enable_thinking": true}} // MiniCPM5-2B Think
{"temperature": 0.9, "top_p": 0.95, "chat_template_kwargs": {"enable_thinking": true}} // MiniCPM5-1B Think
{"temperature": 0.7, "top_p": 0.95, "chat_template_kwargs": {"enable_thinking": false}} // MiniCPM5-1B No-think
Common pitfalls
(free / total) < MEM_FRAChard error: lower--gpu-memory-utilization(e.g. 0.5 on a shared GPU).- OOM at startup with 128 K: drop
--max-model-lento 32768 or 8192.
Tool calling (plugin)
The vLLM-side MiniCPM5 XML parser (PR #43175) merged to main on 2026-05-27 but is not in any pip release yet (v0.22.0 was cut before the merge). Use the bridge plugin shipped at tool_parsers/minicpm5xml_tool_parser.py in this repo:
vllm serve "${MODEL_PATH}" \
--served-model-name MiniCPM5-2B \
--dtype bfloat16 --max-model-len ${CTX_LEN} --port ${PORT} \
--enable-auto-tool-choice \
--tool-parser-plugin /path/to/MiniCPM/tool_parsers/minicpm5xml_tool_parser.py \
--tool-call-parser minicpm5
Drop --tool-parser-plugin once vLLM ships a release containing the parser natively.
When NOT to use
- One-shot Python script →
minicpm5-deploy-transformers - Apple Silicon / no NVIDIA GPU →
minicpm5-deploy-llama-cpp/minicpm5-deploy-mlx - High-concurrency batch eval w/ prefix cache or tool calling →
minicpm5-deploy-sglang
Reference
常见问题
支持哪些模型大小?
这个技能涵盖 MiniCPM5-1B 和 MiniCPM5-2B,均支持 BF16 或 FP16 格式。
我怎么知道服务器已就绪?
等待日志中出现 “Application startup complete” 消息。
我可以降低内存占用吗?
可以。如果显卡较小或被共享,这个技能允许你降低上下文长度和 GPU 内存比例。
详情
作者的原始描述
Serve MiniCPM5-1B or MiniCPM5-2B via vLLM as an OpenAI-compatible HTTP server. Use when the user wants high-throughput production serving on NVIDIA GPU, asks for "vLLM", "OpenAI server", "REST API for MiniCPM5", or "production deployment".
repo: OpenBMB/MiniCPM
热度
- GitHub 星标
- 12k
- 排名
- #11538
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
minicpm5-deploy-litert
12k帮你的智能体使用谷歌的 LiteRT-LM 运行时,在电脑或 Android 手机上运行 MiniCPM5 模型,只需一个模型文件。
minicpm5-deploy-llama-cpp
12k向你的智能体展示如何使用 llama.cpp,借助现成的 GGUF 文件,在 CPU 或家用显卡上运行 MiniCPM5 模型。
minicpm5-deploy-lmstudio
12k帮你的智能体在 LM Studio 中运行 MiniCPM5 模型,这是一款带聊天窗口的桌面应用,并启动其本地 OpenAI 风格服务器。
minicpm5-deploy-mlx
12k帮你的智能体使用苹果的 MLX 框架,在 Apple 芯片 Mac 上原生运行 MiniCPM5 模型,实现快速的本地聊天和文本生成。