> ## Content Index
> Fetch the complete content index at: https://www.hubwiz.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# Cursor AI免费使用方法
- URL: https://www.hubwiz.com/blog/run-cursor-ai-for-free/
- Published: 2025-02-14T06:00:58.000Z
- Updated: 2025-02-14T06:00:58.000Z
- Description: 本文介绍如何利用本地开源LLM大模型免费使用Cursor AI编程工具。
- Author: admin
- Tags: TOOL, CURSOR, LLM STUDIO, QWEN2.5, OLLAMA, NGROK, #Import 2026-10-14 14:41

你是否一直想利用 Cursor AI 的强大功能而又不必花费太多？你来对地方了！本指南将引导你通过使用开源大型语言模型 (LLM) 在本地设置 Cursor AI。让我们开始吧！

## 1、安装Cursor AI

访问 [Cursor AI](https://www.cursor.com/?ref=hubwiz.com) 并按照安装说明进行操作。安装完成后，登录到你的帐户。

## 2、设置LLM Studio

从 [LMStudio](https://lmstudio.ai/?ref=hubwiz.com) 下载并安装LLM Studio。使用图形界面下载最适合你计算机配置的模型。在这个指南中，我们将使用 **Qwen2.5 7B Instruct 1M**。你也可以使用以下命令通过Ollama：

```
ollama run qwen2.5-coder

```

[在这里](https://ollama.com/library/qwen2.5-coder?ref=hubwiz.com)查看模型详情。

![](https://www.hubwiz.com/blog/content/images/2025/02/image-346.png)

## 3、加载模型

一旦模型下载完成，将其加载到LLM Studio中。现在你可以开始使用了！

## 4、配置LLM Studio

- **启用CORS**：确保已启用CORS。
- **设置端口**：默认端口为1234，但可以根据需要更改。
- **检查端点**：验证指定端口的端点是否已启用。

![](https://www.hubwiz.com/blog/content/images/2025/02/image-347.png)

## 5、安装和配置Ngrok

从 [这里](https://ngrok.com/downloads/?ref=hubwiz.com)下载Ngrok。注册并获取你的认证令牌，并按照安装指南设置使用令牌的auth配置。启动Ngrok服务器：

```
ngrok http <port_of_llm>

```

![](https://www.hubwiz.com/blog/content/images/2025/02/image-348.png)

![](https://www.hubwiz.com/blog/content/images/2025/02/image-349.png)

## 6、配置Cursor AI

- **添加模型**：转到Cursor AI设置，点击“模型”，并添加你下载的模型名称。
- **覆盖OpenAI API**：在OpenAI API密钥部分，使用你的Ngrok转发的HTTP URL覆盖API使用情况。在覆盖的URL中添加`/v1`以击中本地LLM端点。
- **保存并验证**：点击“保存”并验证以确保你的本地LLM正在工作。

## 7、注意事项

确保在覆盖的URL中添加`/v1`以正确击中本地LLM端点。如果你收到弹出窗口以启用覆盖，请继续启用它。

![](https://www.hubwiz.com/blog/content/images/2025/02/image-350.png)

这样，你就免费使用自己的本地LLM运行Cursor AI了。享受无负担的AI力量吧！祝编程愉快！

![](https://www.hubwiz.com/blog/content/images/2025/02/image-351.png)

---

原文链接：[Run Cursor AI for Free with Open-Source LLM](https://medium.com/@hyperfox%5F/run-cursor-ai-for-free-with-open-source-llm-55396c1411b1?ref=hubwiz.com)

汇智网翻译整理，转载请标明出处