minicpm5-deploy-sglang
하는 일
이 스킬은 NVIDIA 그래픽 카드용 서버인 SGLang으로 MiniCPM5를 실행하도록 AI를 안내합니다. 많은 요청을 동시에 처리하거나 모델이 도구를 호출하기를 원하는 팀을 위한 스킬입니다.
사용하는 경우
- ✓NVIDIA GPU에서 많은 사용자를 동시에 처리하는 서버가 필요할 때.
- ✓OpenAI 방식 API를 통해 MiniCPM5가 도구 호출을 사용하기를 원할 때.
- ✓테스트나 평가를 위해 대량의 프롬프트를 일괄 실행하는 경우.
스킬 링크
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-sglang/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“앱이 호출할 수 있도록 NVIDIA GPU에서 SGLang으로 MiniCPM5 서버를 시작해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 SGLang을 설치하고, 환경 변수를 몇 개 설정한 뒤, 선택한 포트에서 서버를 시작하고, 테스트 요청으로 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Deploy MiniCPM5-1B and MiniCPM5-2B with SGLang
OpenAI-compatible server with RadixAttention prefix cache. Best fit for tool calling, batched eval pipelines, and high-concurrency serving.
Required input
| Var | Example | Default |
|---|---|---|
MODEL_PATH |
openbmb/MiniCPM5-2B or openbmb/MiniCPM5-1B |
required; |
PORT |
30000 |
30000 |
GPU_ID |
0 |
0 |
CTX_LEN |
131072 (128 K) |
131072 |
MEM_FRAC |
0.85 |
0.85 |
TOOL_PARSER |
minicpm5 |
minicpm5; use auto if you want template detection |
Steps
1. Install (once)
pip install "sglang[srt]>=0.5.16" # latest, requires CUDA 13.x driver
# pip install "sglang==0.5.6.post3" # fallback for CUDA 12.x driver hosts
For tool calling, install from main — the minicpm5 parser (PR #25600, merged 2026-05-22) is not in any pip release yet (v0.5.12.post1 was branched earlier). Plain chat works on the pip release; only --tool-call-parser minicpm5 needs main:
pip install "git+https://github.com/sgl-project/sglang.git@main#subdirectory=python"
2. Recommended runtime env vars
export VLLM_WORKER_MULTIPROC_METHOD=spawn
export SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1
export SGLANG_DISABLE_CUDNN_CHECK=1
3. Launch
CUDA_VISIBLE_DEVICES=${GPU_ID} python -m sglang.launch_server \
--model-path "${MODEL_PATH}" \
--served-model-name MiniCPM5-2B \
--dtype bfloat16 \
--context-length ${CTX_LEN} \
--mem-fraction-static ${MEM_FRAC} \
--tool-call-parser ${TOOL_PARSER} \
--host 0.0.0.0 \
--port ${PORT}
Wait for The server is fired up and ready to roll! .
Speculative decoding (DSpark): we also release MiniCPM5-2B-DSpark, a DSpark draft model trained for MiniCPM5-2B. Enable it in SGLang to accelerate decoding while keeping the target model's outputs unchanged:
CUDA_VISIBLE_DEVICES=${GPU_ID} python -m sglang.launch_server \
--model-path "${MODEL_PATH}" \
--served-model-name MiniCPM5-2B \
--dtype bfloat16 \
--context-length ${CTX_LEN} \
--mem-fraction-static ${MEM_FRAC} \
--tool-call-parser ${TOOL_PARSER} \
--host 0.0.0.0 \
--port ${PORT} \
--speculative-algorithm DSPARK \
--speculative-draft-model-path openbmb/MiniCPM5-2B-DSpark \
--speculative-dspark-block-size 7
4. 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 "2".
Tool calling
SGLang includes a native MiniCPM5 XML tool-call parser. Keep TOOL_PARSER=minicpm5 (or auto) when launching, then send an OpenAI-style tools request:
curl http://localhost:${PORT}/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "MiniCPM5-2B",
"messages": [{"role": "user", "content": "What is the weather in Beijing?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}
}],
"tool_choice": "auto",
"temperature": 1.0, "top_p": 0.95,
"max_tokens": 256
}'
Offline / batched (Engine API)
import sglang as sgl
llm = sgl.Engine(model_path="${MODEL_PATH}", tp_size=1, mem_fraction_static=0.8, context_length=131072)
outputs = llm.generate(
["用一句话解释什么是 GQA。"],
sampling_params={"temperature": 1.0, "top_p": 0.95, "max_new_tokens": 1024,
"skip_special_tokens": False},
)
print(outputs)
Common pitfalls
GLIBCXX_3.4.31 not found(only if you hit it — not universal): conda Python ships an olderlibstdc++than the SGLang wheel was built against. Force-load the system one:LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6 python -m sglang.launch_server ...
When NOT to use
- Production servi
자주 묻는 질문
모든 릴리스에 도구 호출이 있나요?
아직 아닙니다. MiniCPM5 도구 파서는 pip 릴리스가 아니라 SGLang의 main 브랜치가 필요하다고 이 스킬은 말합니다.
어떤 GPU 설정이 필요한가요?
이 스킬은 NVIDIA GPU용이며, CUDA 13 드라이버를 기준으로 하고 CUDA 12 드라이버를 위한 대체 설정도 함께 안내합니다.
RadixAttention은 무엇인가요?
SGLang이 사용하는 접두사 캐시이며, 이 스킬은 제공 기능의 일부로 언급합니다.
상세 정보
작성자의 원본 설명
Serve MiniCPM5-1B or MiniCPM5-2B via SGLang as an OpenAI-compatible HTTP server with RadixAttention prefix cache and built-in MiniCPM5 tool-call parsing. Use when the user asks for "SGLang", "RadixAttention", "prefix cache", batch evaluation, tool calling, or wants a high-concurrency NVIDIA-GPU server alternative to vLLM.
repo: OpenBMB/MiniCPM
인기도
- GitHub 스타
- 12k
- 순위
- #11535
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 9. 21.
댓글
- …
이 저장소의 다른 스킬
minicpm5-deploy-litert
12k에이전트가 Google의 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에이전트가 Apple의 MLX 프레임워크로 Apple Silicon Mac에서 MiniCPM5 모델을 직접 실행해, 빠른 로컬 채팅과 텍스트 생성을 하도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.