# LM Studio

LM Studio 係一款流行嘅**本地大模型 GUI**，支援下載、量化同喺本機推理各種開源模型。Cherry Studio 可以做前端連接到 LM Studio 嘅本地服務，喺保留本地私隱嘅同時獲得更好嘅對話體驗。

## 前置準備

1. 由 [LM Studio 官網](https://lmstudio.ai/) 下載同安裝客戶端
2. 喺 LM Studio 入面下載至少一個模型（推薦先試 Llama 3.x 8B 或 Qwen 系列）
3. 打開 LM Studio 頂部 **Server** Tab，撳 **Start Server**（預設端口 `1234`）

## 喺 Cherry Studio 設置

* 打開 `設定 → 模型服務`，搵到 **LM Studio** Provider 入去詳情頁
* **API 地址** 預設 `http://localhost:1234`，如果改過 LM Studio 端口，請同步修改
* **API 密鑰** 可留空（本地推理唔需要鑑權），或者喺 LM Studio 入面開啟鑑權後填入
* 撳 **獲取模型列表**，Cherry Studio 會自動拉取 LM Studio 已載入嘅模型

{% hint style="info" %}
**模型列表係空嘅？** LM Studio 只會暴露**已 `Load` 到記憶體**嘅模型，冇 Load 嘅唔會出喺列表入面。返去 LM Studio 先 Load 模型，再嚟「獲取模型列表」。
{% endhint %}

## 推薦用法

| 場景                   | 建議                                                                                 |
| -------------------- | ---------------------------------------------------------------------------------- |
| 私隱敏感對話               | 揀細模型（8B 以下）喺本機跑，完全離線                                                               |
| Apple Silicon（M 系晶片） | LM Studio 用 MLX 後端，效率明顯高過 llama.cpp                                                |
| 嵌入模型                 | LM Studio 亦可載入嵌入模型，用於 [全局記憶](/docs/zhong-wen-fan-ti/advanced-basic/memory.md) 同知識庫 |

## 同 Ollama 嘅分別

|      | LM Studio     | [Ollama](/docs/zhong-wen-fan-ti/pre-basic/providers/ollama.md) |
| ---- | ------------- | -------------------------------------------------------------- |
| 形態   | 圖形介面 + Server | 命令列 / 後台服務                                                     |
| 模型管理 | GUI 瀏覽/下載     | `ollama pull`                                                  |
| API  | OpenAI 相容     | OpenAI 相容                                                      |
| 適合   | 偏好圖形互動嘅用戶     | 偏好命令列 / Docker 部署                                              |

兩者都可以接入 Cherry Studio，按個人偏好揀就得。

## 常見問題

* **Cherry Studio 連唔上**：確認 LM Studio 入面嘅 Server 係咪已經 Start（綠點狀態）
* **回應超慢**：模型太大／顯存不足，換細啲嘅模型或者更大量化（例如 Q4 → Q3）
* **亂碼／輸出截斷**：上下文長度超過模型限制，喺 LM Studio 入面調高 `n_ctx`

***

### 💡 獲取幫助同提交反饋

如果您喺配置或使用過程中遇到任何疑問、Bug 或有功能改進建議，請參考 [反饋同建議](/docs/zhong-wen-fan-ti/question-contact/suggestions.md) 入面提供嘅官方渠道。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cherry-ai.com/docs/zhong-wen-fan-ti/pre-basic/providers/lm-studio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
