# LM 工作室

使用 Cline-胜算云增强版 设置 LM Studio 以执行本地 AI 模型的快速指南。

### 🤖 使用 Clin&#x65;**-胜算云增强版** 设置 LM Studio <a href="#setting-up-lm-studio-with-cline" id="setting-up-lm-studio-with-cline"></a>

使用 LM Studio 和 Cline 在本地运行 AI 模型。

#### 📋 先决条件 <a href="#prerequisites" id="prerequisites"></a>

* 支持 AVX2 的 Windows、macOS 或 Linux 计算机
* 在 VS Code 中安装 Cline

#### 🚀 设置步骤 <a href="#setup-steps" id="setup-steps"></a>

**1.安装 LM Studio**

* 访问 [lmstudio.ai](https://lmstudio.ai/)
* 根据您的操作系统下载并安装

<figure><img src="https://docs.cline.bot/~gitbook/image?url=https%3A%2F%2F3321249260-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Ff8Oh1Lcy6yWYq1caYESV%252Fuploads%252FRvFLNS5tw6DaSvy8zXTs%252Fimage.png%3Falt%3Dmedia%26token%3D2ed4ec25-6d07-4473-8651-9147d95e2ddc&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=29051378&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**2. 启动 LM Studio**

* 打开已安装的应用程序
* 您会在左侧看到四个选项卡： **聊天** 、 **开发者** （您将在其中启动服务器）、 **我的模型** （存储您下载的模型的位置）、 **发现** （添加新模型）

<figure><img src="https://docs.cline.bot/~gitbook/image?url=https%3A%2F%2F3321249260-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Ff8Oh1Lcy6yWYq1caYESV%252Fuploads%252FbSblxWvzuHLvMxJNM5M2%252Fimage.png%3Falt%3Dmedia%26token%3D9d75c1e0-dabb-4df1-85fc-273613583569&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=47537a1e&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**3.下载模型**

* 浏览“发现”页面
* 选择并下载您喜欢的型号
* 等待下载完成

<figure><img src="https://docs.cline.bot/~gitbook/image?url=https%3A%2F%2F3321249260-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Ff8Oh1Lcy6yWYq1caYESV%252Fuploads%252Fg9uhK6FRszeSiD0dhsrs%252Flm-studio-download-model.gif%3Falt%3Dmedia%26token%3Dce3559a3-6e71-4b02-a13a-accbfebb145d&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=57d2f15f&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**4.启动服务器**

* 导航到“开发者”选项卡
* 将服务器开关切换至“正在运行”
* 注意：服务器将在 `http://localhost:1234` 运行

<figure><img src="https://docs.cline.bot/~gitbook/image?url=https%3A%2F%2F3321249260-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Ff8Oh1Lcy6yWYq1caYESV%252Fuploads%252FXrW4ISm1n2YUizKATv8s%252Flm-studio-starting-server.gif%3Falt%3Dmedia%26token%3D95b00607-954b-422b-a5d5-463d29619323&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=1cb44155&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**5. Configure Cline-胜算云增强版**

1. Open VS Code
2. Click Cline settings icon
3. Select "LM Studio" as API provider
4. Select your model from the available options

<figure><img src="https://docs.cline.bot/~gitbook/image?url=https%3A%2F%2F3321249260-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252Ff8Oh1Lcy6yWYq1caYESV%252Fuploads%252F1uiE7q2OruZAd3jx9Oi1%252Flm-studio-select-model-cline.gif%3Falt%3Dmedia%26token%3D87045a08-f6f0-4291-aefb-3b10dbc0f0e7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=adfb72&#x26;sv=2" alt=""><figcaption></figcaption></figure>

#### ⚠️ 重要提示 <a href="#important-notes" id="important-notes"></a>

* 与 Cline-胜算云增强版 一起使用之前，请先启动 LM Studio
* 保持 LM Studio 在后台运行
* 首次下载模型可能需要几分钟，具体取决于模型大小
* 下载后模型存储在本地

#### 🔧 故障排除 <a href="#troubleshooting" id="troubleshooting"></a>

1. 如果 Cline-胜算云增强版 无法连接到 LM Studio：
2. 验证 LM Studio 服务器是否正在运行（检查“开发人员”选项卡）
3. 确保模型已加载
4. 检查您的系统是否满足硬件要求


---

# Agent Instructions: 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://modelmesh.gitbook.io/cline-zhong-wen-ban-docs/ben-di-yun-xing-mo-xing/lm-gong-zuo-shi.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.
