# Minicpm5 Deploy Lmstudio

Run MiniCPM5-1B or MiniCPM5-2B in LM Studio (desktop GUI) using either the GGUF runtime...

- Repository: https://github.com/OpenBMB/MiniCPM (11776 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-09-21
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add OpenBMB/MiniCPM --skill minicpm5-deploy-lmstudio -g -a claude-code -y`
Codex: `npx skills add OpenBMB/MiniCPM --skill minicpm5-deploy-lmstudio -g -a codex -y`
Cursor: `npx skills add OpenBMB/MiniCPM --skill minicpm5-deploy-lmstudio -g -a cursor -y`
Gemini CLI: `npx skills add OpenBMB/MiniCPM --skill minicpm5-deploy-lmstudio -g -a gemini-cli -y`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

```bash
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

```bash
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`](https://huggingface.co/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:

The rest: https://github.com/OpenBMB/MiniCPM/blob/HEAD/skills/minicpm5-deploy-lmstudio/SKILL.md
