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

minicpm5-deploy-lmstudio

Skill này làm gì

Skill này hướng dẫn AI chạy MiniCPM5 trong LM Studio, một ứng dụng desktop có màn hình chat. Skill dành cho người muốn một ứng dụng chat mà không cần viết code.

Khi nào nên dùng

  • ✓Khi bạn muốn một ứng dụng chat desktop cho MiniCPM5 mà không phải viết code.
  • ✓Khi bạn dùng máy Mac Apple Silicon và muốn runtime MLX nhanh hơn trong LM Studio.
  • ✓Khi bạn muốn máy chủ cục bộ của LM Studio trả lời yêu cầu từ một ứng dụng khác.

Liên kết skill

https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-lmstudio/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-lmstudio/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 thiết lập MiniCPM5 trong LM Studio để tôi có thể chat với nó trên máy Mac.”

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

Cách hoạt động

Skill cài LM Studio, nạp một file model ở định dạng GGUF hoặc MLX, khởi động máy chủ cục bộ và kiểm tra model có trả lời không.

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 LM Studio

Desktop GUI + OpenAI-compatible local server. On Apple Silicon ships two runtimes:

Runtime Format When to use
GGUF (llama.cpp engine) F16 / Q8_0 / Q4_K_M cross-platform, same artifact as Ollama; Q4_K_M build
MLX (Apple Silicon only) bf16 / 4-bit ~60 % faster, automatic think/answer split via reasoning_content; Q4 build

Required input

Var Example Default
Runtime gguf or mlx mlx on Apple Silicon, gguf elsewhere
QUANT Q4_K_M (GGUF) or 4bit (MLX) Q4_K_M / 4bit
MODEL_NAME minicpm5-2b minicpm5-2b

Steps

1. Install LM Studio + complete onboarding

brew install --cask lm-studio
open -a "LM Studio"     # accept EULA + pick model source

⚠️ The first launch MUST be GUI — lms (CLI) refuses with Cannot find LM Studio installation until LM Studio has run interactively at least once.

2A. GGUF runtime path

mkdir -p ~/.lmstudio/models/openbmb/MiniCPM5-2B-GGUF
huggingface-cli download openbmb/MiniCPM5-2B-GGUF MiniCPM5-2B-${QUANT}.gguf \
    --local-dir ~/.lmstudio/models/openbmb/MiniCPM5-2B-GGUF/

LMS="/Applications/LM Studio.app/Contents/Resources/app/.webpack/lms"
"$LMS" server start                              # binds 127.0.0.1:1234
"$LMS" load minicpm5-2b --gpu max --context-length 8192 -y
"$LMS" ps                                        # verify the model is loaded

2B. MLX runtime path (Apple Silicon, recommended on Mac)

The MLX runtime needs an MLX-format checkpoint. The published MiniCPM5-2B MLX repo is openbmb/MiniCPM5-2B-MLX (4-bit affine); there is no separate -bf16 / -4bit variant. Either drop that one in as-is, or convert locally from openbmb/MiniCPM5-2B (see minicpm5-deploy-mlx). Then:

# Option A — use the official pre-quantized repo
huggingface-cli download openbmb/MiniCPM5-2B-MLX \
    --local-dir ~/.lmstudio/models/openbmb/MiniCPM5-2B-MLX

# Option B — drop a locally converted directory in
mkdir -p ~/.lmstudio/models/openbmb/MiniCPM5-2B-MLX-${QUANT}
cp -r ./minicpm5-mlx-${QUANT}/* ~/.lmstudio/models/openbmb/MiniCPM5-2B-MLX-${QUANT}/

"$LMS" server start
"$LMS" load minicpm5-2b-mlx${QUANT:+-${QUANT}} --gpu max -y

3. Validate

curl http://127.0.0.1:1234/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
    }'

Expected: "2" in the reply.

For the MLX runtime, a think prompt produces output split into message.reasoning_content (the <think> block) and message.content (the final answer) automatically — that's an MLX-runtime feature, not a model setting.

Think vs nothink (MiniCPM5-1B)

LM Studio 0.4.13's chat-completion endpoint does not propagate chat_template_kwargs.enable_thinking to the GGUF runtime. Instead:

  • Default = think mode for both runtimes.
  • For nothink with the GGUF runtime, prepend the closing think block manually:
    "messages": [
      {"role":"user","content":"1+1=?"},
      {"role":"assistant","content":"<think>\n\n</think>\n\n"}
    ]
    
    and the model continues from there.
  • MLX runtime: think/answer are auto-split, you don't need to do anything.

Common pitfalls

  • MLX runtime not available: only on Apple Silicon. On Intel Mac / Windows / Linux LM Studio, only the GGUF runtime works.

When NOT to use

  • Just want CLI / scripted runs → minicpm5-deploy-ollama is leaner
  • Production server → minicpm5-deploy-vllm
  • No GUI desired → minicpm5-deploy-llama-cpp (llama-server)

Reference

docs/deployment/lmstudio.md

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

Khác biệt giữa GGUF và MLX ở đây là gì?

GGUF chạy được trên nhiều hệ thống, còn MLX chỉ dành cho máy Mac Apple Silicon và được mô tả là nhanh hơn.

Vì sao phải mở LM Studio trước?

Skill cảnh báo lần khởi động đầu tiên phải làm trong cửa sổ ứng dụng, vì công cụ dòng lệnh cần ứng dụng đã chạy ít nhất một lần.

Skill có khởi động máy chủ cục bộ không?

Có. Skill khởi động một máy chủ tương thích OpenAI trên chính máy tính của bạn.

Chi tiết

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

Run MiniCPM5-1B or MiniCPM5-2B in LM Studio (desktop GUI) using either the GGUF runtime (cross-platform) or the MLX runtime (Apple Silicon, faster). Includes OpenAI-compatible local server. Use when the user mentions "LM Studio", desktop GUI inference, "lms" CLI, or wants a no-code chat UI for MiniCPM5.

repo: OpenBMB/MiniCPM

Độ phổ biến

Sao GitHub
12k
Vị trí xếp hạng
#11532
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ự