minicpm5-deploy-vllm
できること
このスキルは、NVIDIA GPUで多数のリクエストを処理するために作られたサーバーであるvLLMを使い、MiniCPM5を動かす方法をAIに案内します。モデルのための本番環境向け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に貼り付けるだけ。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が小さいか共有されている場合、コンテキスト長と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
12kGoogleのLiteRT-LMランタイムを使い、1つのモデルファイルでMiniCPM5モデルをパソコンやAndroidスマートフォン上で動かすようエージェントを支援します。
minicpm5-deploy-llama-cpp
12kダウンロード可能なGGUFファイルを使い、llama.cppでCPUや家庭用グラフィックスカード上のMiniCPM5モデルを動かす方法をエージェントに示します。
minicpm5-deploy-lmstudio
12kチャット画面を持つデスクトップアプリであるLM StudioでMiniCPM5モデルを動かし、そのローカルのOpenAI形式サーバーを起動するようエージェントを支援します。
minicpm5-deploy-mlx
12k高速なローカルチャットとテキスト生成のために、AppleのMLXフレームワークでApple Silicon搭載Mac上にMiniCPM5モデルをネイティブに動かすようエージェントを支援します。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。