> ## Documentation Index
> Fetch the complete documentation index at: https://ikun.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LM Studio

> 学习如何将 LM Studio 与 Agno 结合使用。

使用 LM Studio 在本地运行大型语言模型

[LM Studio](https://lmstudio.ai) 是一个在本地运行模型的绝佳工具。

LM Studio 支持多种开源模型。在此处查看模型库：[LM Studio 模型库](https://lmstudio.ai/models)。

我们建议您进行实验，找到最适合您用例的模型。以下是一些通用建议：

* `llama3.3` 模型适用于大多数基本用例。
* `qwen` 模型在工具使用方面表现尤为出色。
* `deepseek-r1` 模型具有强大的推理能力。
* `phi4` 模型功能强大，同时体积非常小。

## 设置模型

安装 [LM Studio](https://lmstudio.ai)，下载您想使用的模型，然后运行它。

## 示例

在本地拥有模型后，使用 `LMStudio` 模型类来访问它

<CodeGroup>
  ```python agent.py theme={null}
  from agno.agent import Agent, RunResponse
  from agno.models.lmstudio import LMStudio

  agent = Agent(
      model=LMStudio(id="qwen2.5-7b-instruct-1m"),
      markdown=True
  )

  # 在终端打印响应
  agent.print_response("写一个两句话的恐怖故事。")
  ```
</CodeGroup>

<Note>在此处查看更多示例：[示例集](../examples/models/lmstudio)。</Note>

## 参数

<Snippet file="model-lmstudio-params.mdx" />

`LM Studio` 也支持 [OpenAI](/reference/models/openai) 的参数。
