Compare commits

...
Author SHA1 Message Date
Elephant Lumps 3b05978f7c docs.json 2025-05-05 16:29:37 -05:00
Elephant Lumps b17a2b7ed9 changeset 2025-05-05 11:44:55 -05:00
Elephant Lumps 60207e4b1d migrate run models locally section 2025-05-05 11:44:30 -05:00
5 changed files with 273 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": minor
---
Migrate running models locally section to new docs
+8
View File
@@ -66,6 +66,14 @@
"getting-started/what-is-cline"
]
},
{
"group": "Running Models Locally",
"pages": [
"running-models-locally/read-me-first",
"running-models-locally/lm-studio",
"running-models-locally/ollama"
]
},
{
"group": "Exploring Cline's Tools",
"pages": [
+78
View File
@@ -0,0 +1,78 @@
---
title: "LM Studio"
description: "A quick guide to setting up LM Studio for local AI model execution with Cline."
---
## 🤖 Setting Up LM Studio with Cline
Run AI models locally using LM Studio with Cline.
### 📋 Prerequisites
- Windows, macOS, or Linux computer with AVX2 support
- Cline installed in VS Code
### 🚀 Setup Steps
#### 1. Install LM Studio
- Visit [lmstudio.ai](https://lmstudio.ai)
- Download and install for your operating system
<Frame>
<img src="/assets/robot_panel_dark.png" alt="LM Studio download page" />
</Frame>
#### 2. Launch LM Studio
- Open the installed application
- You'll see four tabs on the left: **Chat**, **Developer** (where you will start the server), **My Models** (where your downloaded models are stored), **Discover** (add new models)
<Frame>
<img src="/assets/robot_panel_dark.png" alt="LM Studio interface overview" />
</Frame>
#### 3. Download a Model
- Browse the "Discover" page
- Select and download your preferred model
- Wait for download to complete
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Downloading a model in LM Studio" />
</Frame>
#### 4. Start the Server
- Navigate to the "Developer" tab
- Toggle the server switch to "Running"
- Note: The server will run at `http://localhost:1234`
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Starting the LM Studio server" />
</Frame>
#### 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
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Configuring Cline with LM Studio" />
</Frame>
### ⚠️ Important Notes
- Start LM Studio before using with Cline
- Keep LM Studio running in background
- First model download may take several minutes depending on size
- Models are stored locally after download
### 🔧 Troubleshooting
1. If Cline can't connect to LM Studio:
2. Verify LM Studio server is running (check Developer tab)
3. Ensure a model is loaded
4. Check your system meets hardware requirements
+76
View File
@@ -0,0 +1,76 @@
---
title: "Ollama"
description: "A quick guide to setting up Ollama for local AI model execution with Cline."
---
### 📋 Prerequisites
- Windows, macOS, or Linux computer
- Cline installed in VS Code
### 🚀 Setup Steps
#### 1. Install Ollama
- Visit [ollama.com](https://ollama.com)
- Download and install for your operating system
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Ollama download page" />
</Frame>
#### 2. Choose and Download a Model
- Browse models at [ollama.com/search](https://ollama.com/search)
- Select model and copy command:
```bash
ollama run [model-name]
```
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Selecting a model in Ollama" />
</Frame>
- Open your Terminal and run the command:
- Example:
```bash
ollama run llama2
```
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Running Ollama in terminal" />
</Frame>
**✨ Your model is now ready to use within Cline!**
#### 3. Configure Cline
1. Open VS Code
2. Click Cline settings icon
3. Select "Ollama" as API provider
4. Enter configuration:
- Base URL: `http://localhost:11434/` (default value, can be left as is)
- Select the model from your available options
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Configuring Cline with Ollama" />
</Frame>
### ⚠️ Important Notes
- Start Ollama before using with Cline
- Keep Ollama running in background
- First model download may take several minutes
### 🔧 Troubleshooting
If Cline can't connect to Ollama:
1. Verify Ollama is running
2. Check base URL is correct
3. Ensure model is downloaded
Need more info? Read the [Ollama Docs](https://github.com/ollama/ollama/blob/main/docs/api.md).
@@ -0,0 +1,106 @@
---
title: "Read Me First"
---
## Running Local Models with Cline: What You Need to Know 🤖
Cline is a powerful AI coding assistant that uses tool-calling to help you write, analyze, and modify code. While running models locally can save on API costs, there's an important trade-off: local models are significantly less reliable at using these essential tools.
## Why Local Models Are Different 🔬
When you run a "local version" of a model, you're actually running a drastically simplified copy of the original. This process, called distillation, is like trying to compress a professional chef's knowledge into a basic cookbook you keep the simple recipes but lose the complex techniques and intuition.
Local models are created by training a smaller model to imitate a larger one, but they typically only retain 1-26% of the original model's capacity. This massive reduction means:
- Less ability to understand complex contexts
- Reduced capability for multi-step reasoning
- Limited tool-use abilities
- Simplified decision-making process
Think of it like running your development environment on a calculator instead of a computer it might handle basic tasks, but complex operations become unreliable or impossible.
<Frame>
<img src="/assets/robot_panel_dark.png" alt="Local model comparison diagram" />
</Frame>
### What Actually Happens
When you run a local model with Cline:
#### Performance Impact 📉
- Responses are 5-10x slower than cloud services
- System resources (CPU, GPU, RAM) get heavily utilized
- Your computer may become less responsive for other tasks
#### Tool Reliability Issues 🛠️
- Code analysis becomes less accurate
- File operations may be unreliable
- Browser automation capabilities are reduced
- Terminal commands might fail more often
- Complex multi-step tasks often break down
### Hardware Requirements 💻
You'll need at minimum:
- Modern GPU with 8GB+ VRAM (RTX 3070 or better)
- 32GB+ system RAM
- Fast SSD storage
- Good cooling solution
Even with this hardware, you'll be running smaller, less capable versions of models:
| Model Size | What You Get |
| ---------- | ------------------------------------------------------- |
| 7B models | Basic coding, limited tool use |
| 14B models | Better coding, unstable tool use |
| 32B models | Good coding, inconsistent tool use |
| 70B models | Best local performance, but requires expensive hardware |
Put simply, the cloud (API) versions of these models are the full-bore version of the model. The full version of DeepSeek-R1 is 671B. These distilled models are essentially "watered-down" versions of the cloud model.
### Practical Recommendations 💡
#### Consider This Approach
1. Use cloud models for:
- Complex development tasks
- When tool reliability is crucial
- Multi-step operations
- Critical code changes
2. Use local models for:
- Simple code completion
- Basic documentation
- When privacy is paramount
- Learning and experimentation
#### If You Must Go Local
- Start with smaller models
- Keep tasks simple and focused
- Save work frequently
- Be prepared to switch to cloud models for complex operations
- Monitor system resources
### Common Issues 🚨
- **"Tool execution failed":** Local models often struggle with complex tool chains. Simplify your prompt.
- **"No connection could be made because the target machine actively refused it":** This usually means that the Ollama or LM Studio server isn't running, or is running on a different port/address than Cline is configured to use. Double-check the Base URL address in your API Provider settings.
- **"Cline is having trouble...":** Increase your model's context length to its maximum size.
- **Slow or incomplete responses:** Local models can be slower than cloud-based models, especially on less powerful hardware. If performance is an issue, try using a smaller model. Expect significantly longer processing times.
- **System stability:** Watch for high GPU/CPU usage and temperature
- **Context limitations:** Local models often have smaller context windows than cloud models. Break tasks down into smaller pieces.
### Looking Ahead 🔮
Local model capabilities are improving, but they're not yet a complete replacement for cloud services, especially for Cline's tool-based functionality. Consider your specific needs and hardware capabilities carefully before committing to a local-only approach.
### Need Help? 🤝
- Join our [Discord](https://discord.gg/cline) community and [r/cline](https://www.reddit.com/r/CLine/)
- Check the latest compatibility guides
- Share your experiences with other developers
Remember: When in doubt, prioritize reliability over cost savings for important development work.