minicpm5-deploy-ollama
Skill này làm gì
Skill này hướng dẫn AI chạy MiniCPM5 bằng Ollama trên máy Mac hoặc Linux. Skill dành cho người muốn thiết lập nhanh một model AI chạy cục bộ.
Khi nào nên dùng
- ✓Khi bạn muốn chạy MiniCPM5 trên laptop chỉ bằng một lệnh ollama.
- ✓Khi bạn muốn tạo một cấu hình Ollama riêng bằng Modelfile.
- ✓Khi bạn muốn thử model qua API của Ollama.
Liên kết skill
https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-ollama/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thiết lập MiniCPM5 trên laptop bằng Ollama để tôi có thể chạy nó chỉ với một lệnh.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill cài Ollama, tải một file GGUF, viết một Modelfile ngắn có mẫu chat, tạo model và kiểm tra qua API.
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 Ollama
One-binary, no-Python laptop deployment. Consumes the released GGUF.
Required input
| Var | Example | Default |
|---|---|---|
GGUF_REPO |
openbmb/MiniCPM5-2B-GGUF |
required; openbmb/MiniCPM5-1B-GGUF also works |
QUANT |
Q4_K_M (1.56 GB, recommended) / Q8_0 (2.68 GB) / F16 (5.04 GB) |
Q4_K_M |
MODEL_NAME |
minicpm5-2b |
minicpm5-2b |
Steps
1. Install Ollama (once)
brew install ollama # macOS
# or:
curl -fsSL https://ollama.com/install.sh | sh # Linux
OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 ollama serve &
2. Download the GGUF + write Modelfile
mkdir -p ~/${MODEL_NAME} && cd ~/${MODEL_NAME}
huggingface-cli download ${GGUF_REPO} MiniCPM5-2B-${QUANT}.gguf --local-dir .
cat > Modelfile <<EOF
FROM ./MiniCPM5-2B-${QUANT}.gguf
# MiniCPM5 basic chat template
TEMPLATE """{{- if .Messages -}}
{{- range .Messages -}}
<|im_start|>{{ .Role }}
{{ .Content }}<|im_end|>
{{ end -}}
<|im_start|>assistant
{{ end -}}"""
PARAMETER stop "<|im_end|>"
PARAMETER stop "</s>"
# Defaults tuned for think mode
PARAMETER temperature 1.0
PARAMETER top_p 0.95
PARAMETER num_ctx 8192
EOF
3. Create + run
ollama create ${MODEL_NAME} -f Modelfile
ollama run ${MODEL_NAME}
4. Validate via OpenAI-compatible API
curl http://localhost:11434/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.
MiniCPM5-1B Think vs No-think
A MiniCPM5-1B Modelfile configured with temperature=0.7, top_p=0.95 defaults to no-think. To switch a single conversation to think mode, override the sampling params at request time:
ollama run minicpm5-1b --temperature 0.9 --top-p 0.95
Or bake it into a separate model tag by raising the temperature line (top_p stays 0.95):
PARAMETER temperature 0.9
PARAMETER top_p 0.95
Then ollama create minicpm5-1b-think -f Modelfile.think.
Ollama 0.24 does not directly evaluate the GGUF-embedded Jinja chat template. It maps recognized Jinja templates to built-in Go templates, so MiniCPM5 uses the explicit Go TEMPLATE block above. To enter the MiniCPM5-2B think path, use raw mode and prepend <think>\n manually:
curl http://localhost:11434/api/generate -d '{
"model": "minicpm5-2b",
"raw": true,
"prompt": "<|im_start|>user\n鸡兔同笼…<|im_end|>\n<|im_start|>assistant\n<think>\n",
"options": {"temperature": 1.0, "top_p": 0.95}
}'
Common pitfalls
Error: invalid file magic: corrupted download. Re-runhuggingface-cli download.
When NOT to use
- Highest throughput on Mac →
minicpm5-deploy-mlx(Q4 build) - GUI experience →
minicpm5-deploy-lmstudio - NVIDIA GPU production →
minicpm5-deploy-vllm
Reference
Câu hỏi thường gặp
Tôi nên tải file kích thước nào?
Skill khuyên dùng Q4_K_M, được liệt kê khoảng 1,56 GB.
Có hỗ trợ Windows không?
Các bước cài đặt chỉ dành cho macOS và Linux. Skill không có hướng dẫn cài trên Windows.
Modelfile là gì?
Đó là một file văn bản nhỏ, cho Ollama biết dùng file model nào và định dạng các cuộc chat ra sao.
Chi tiết
Mô tả gốc của tác giả
Run MiniCPM5-1B or MiniCPM5-2B via Ollama on macOS / Linux laptop using the released GGUF. Use when the user wants "ollama run", "ollama pull", a Modelfile-driven setup, or one-line laptop deployment.
repo: OpenBMB/MiniCPM
Độ phổ biến
- Sao GitHub
- 12k
- Vị trí xếp hạng
- #11534
- Giấy phép
- Apache-2.0
- Cập nhật
- 21/9/2026
Bình luận
- …
Thêm skill từ kho mã này
minicpm5-deploy-litert
12kGiúp agent chạy các model MiniCPM5 trên máy tính hoặc điện thoại Android bằng runtime LiteRT-LM của Google, chỉ với một file model.
minicpm5-deploy-llama-cpp
12kChỉ cho agent cách chạy model MiniCPM5 bằng llama.cpp trên CPU hoặc card đồ họa gia đình, dùng file GGUF có sẵn.
minicpm5-deploy-lmstudio
12kGiúp agent chạy các model MiniCPM5 trong LM Studio, ứng dụng desktop có cửa sổ chat, và khởi động máy chủ cục bộ kiểu OpenAI của nó.
minicpm5-deploy-mlx
12kGiúp agent chạy các model MiniCPM5 trực tiếp trên máy Mac Apple Silicon bằng framework MLX của Apple, để chat và sinh văn bản cục bộ nhanh.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.