Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)12k · #11538

minicpm5-deploy-vllm

Skill này làm gì

Skill này hướng dẫn AI chạy MiniCPM5 bằng vLLM, một máy chủ được xây dựng để xử lý nhiều yêu cầu trên GPU NVIDIA. Skill dành cho các đội muốn có một API kiểu production cho model.

Khi nào nên dùng

  • ✓Khi bạn muốn một API khối lượng lớn cho MiniCPM5 trên GPU NVIDIA.
  • ✓Khi bạn cần một endpoint REST kiểu OpenAI cho ứng dụng của riêng mình.
  • ✓Khi bạn đang chuyển model từ thử nghiệm sang sử dụng production.

Liên kết skill

https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-vllm/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-vllm/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giúp tôi khởi động máy chủ API MiniCPM5 bằng vLLM trên GPU NVIDIA để ứng dụng của tôi có thể gửi yêu cầu tới nó.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill cài vLLM, khởi động máy chủ với model và cài đặt bạn chọn, chờ máy chủ sẵn sàng và kiểm tra bằng một yêu cầu thử.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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_FRAC hard error: lower --gpu-memory-utilization (e.g. 0.5 on a shared GPU).
  • OOM at startup with 128 K: drop --max-model-len to 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

docs/deployment/vllm.md

Câu hỏi thường gặp

Hỗ trợ những kích thước model nào?

Skill bao gồm MiniCPM5-1B và MiniCPM5-2B, cả hai ở định dạng BF16 hoặc FP16.

Làm sao biết máy chủ đã sẵn sàng?

Chờ thông báo “Application startup complete” trong log.

Tôi có thể giảm mức dùng bộ nhớ không?

Có. Skill cho phép bạn giảm độ dài ngữ cảnh và tỷ lệ bộ nhớ GPU nếu card nhỏ hoặc dùng chung.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
12k
Vị trí xếp hạng
#11538
Giấy phép
Apache-2.0
Cập nhật
21/9/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự