Skip to content

Commit 7d73150

Browse files
committed
Docs: Added Models CLI Docs Refrences
1 parent e08e1f1 commit 7d73150

File tree

6 files changed

+173
-15
lines changed

6 files changed

+173
-15
lines changed

README.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ LocalLab gives you **your own personal ChatGPT** that runs entirely on your comp
1313
- 💰 **Zero Cost** - No monthly fees or API charges
1414
- 🌐 **Access Anywhere** - Use from any device with ngrok tunneling
1515
-**Multiple Models** - Support for various open-source AI models
16+
- 🤖 **Model Management** - Download, organize, and manage AI models locally
1617
- 🎮 **Free GPU** - Run on Google Colab for free GPU acceleration
1718

1819
Perfect for developers, students, researchers, or anyone who wants to experiment with AI without privacy concerns or ongoing costs.
@@ -32,6 +33,26 @@ locallab chat
3233

3334
That's it! You now have your own ChatGPT running locally.
3435

36+
### 🤖 Model Management (Optional)
37+
38+
Want to download models ahead of time or manage your local AI models? LocalLab includes powerful model management:
39+
40+
```bash
41+
# Discover available models
42+
locallab models discover
43+
44+
# Download a model locally (faster startup)
45+
locallab models download microsoft/phi-2
46+
47+
# List your cached models
48+
locallab models list
49+
50+
# Get detailed model information
51+
locallab models info microsoft/phi-2
52+
```
53+
54+
> 📖 **Learn More**: See the [Model Management Guide](./docs/guides/model-management.md) for complete documentation.
55+
3556
## 🧠 How LocalLab Works
3657

3758
LocalLab has three main components:
@@ -48,7 +69,13 @@ LocalLab has three main components:
4869
- Multiple generation modes
4970
- Access with: `locallab chat`
5071

51-
### 3. 🐍 **Python Client** (`pip install locallab-client`)
72+
### 3. 🤖 **Model Management** (Built-in)
73+
- Download and organize AI models locally
74+
- Discover available models from HuggingFace Hub
75+
- Manage disk space and cache cleanup
76+
- Use with: `locallab models`
77+
78+
### 4. 🐍 **Python Client** (`pip install locallab-client`)
5279
- Programmatic access for your code
5380
- Both sync and async support
5481
- Use with: `client = SyncLocalLabClient("http://localhost:8000")`
@@ -72,8 +99,9 @@ graph TD
7299
```
73100
📦 Easy Setup 🔒 Privacy First 🎮 Free GPU Access
74101
🤖 Multiple Models 💾 Memory Efficient 🔄 Auto-Optimization
75-
🌐 Local or Colab ⚡ Fast Response 🔧 Simple Server
76-
🌍 Access Anywhere 🔌 Client Package 🛡️ Secure Tunneling
102+
🗂️ Model Management ⚡ Fast Response 🔧 Simple Server
103+
🌐 Local or Colab 🔌 Client Package 🛡️ Secure Tunneling
104+
🌍 Access Anywhere 📥 Offline Models 🧹 Cache Cleanup
77105
```
78106

79107
**Two-Part System**:
@@ -509,6 +537,7 @@ graph LR
509537
| Guide | Description |
510538
|-------|-------------|
511539
| [**CLI Reference**](./docs/guides/cli.md) | Complete command documentation |
540+
| [**Model Management**](./docs/guides/model-management.md) | Download and organize AI models |
512541
| [**Python Client**](./docs/clients/README.md) | Programmatic access guide |
513542
| [**API Reference**](./docs/guides/API.md) | HTTP API documentation |
514543

docs/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Welcome! This guide will help you navigate LocalLab's documentation and get the
55
## 🚀 What Can You Do With LocalLab?
66

77
- **Run AI models locally** with a simple API interface
8+
- **Manage AI models** with built-in download and organization tools
89
- **Access your models from anywhere** using the built-in ngrok integration
910
- **Build applications** that use AI without relying on cloud services
1011
- **Share your models** with teammates or access from mobile devices
@@ -28,7 +29,13 @@ If you're new to LocalLab, follow this path:
2829
- Configuration options
2930
- Common commands
3031

31-
3. **[Basic Examples](./guides/examples.md)**
32+
3. **[Model Management Guide](./guides/model-management.md)**
33+
34+
- Download and organize AI models
35+
- Discover available models
36+
- Manage disk space and cache
37+
38+
4. **[Basic Examples](./guides/examples.md)**
3239
- Simple text generation
3340
- Chat conversations
3441
- Batch processing

docs/cli/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ locallab start
1818
locallab chat
1919
```
2020

21+
### 🤖 Model Management Quick Start
22+
23+
```bash
24+
# Discover available models
25+
locallab models discover
26+
27+
# Download a model for faster startup
28+
locallab models download microsoft/phi-2
29+
30+
# List your cached models
31+
locallab models list
32+
33+
# Get detailed model information
34+
locallab models info microsoft/phi-2
35+
```
36+
2137
## 📋 Available Commands
2238

2339
### Core Commands
@@ -43,6 +59,39 @@ locallab chat
4359
| `locallab logs` | View server logs | [CLI Guide](../guides/cli.md#view-logs) |
4460
| `locallab version` | Show version information | [CLI Guide](../guides/cli.md#version) |
4561

62+
## 🤖 Model Management
63+
64+
LocalLab includes comprehensive model management capabilities to help you download, organize, and manage AI models locally. This allows for faster server startup and offline usage.
65+
66+
### Why Use Model Management?
67+
68+
- **⚡ Faster Startup** - Pre-downloaded models load instantly
69+
- **📱 Offline Usage** - Use models without internet connection
70+
- **💾 Disk Management** - Monitor and clean up model cache
71+
- **🔍 Model Discovery** - Find and explore available models
72+
- **📊 System Compatibility** - Check if models work on your hardware
73+
74+
### Common Workflows
75+
76+
```bash
77+
# Discover and download a new model
78+
locallab models discover --search "phi"
79+
locallab models download microsoft/phi-2
80+
81+
# Check model details before using
82+
locallab models info microsoft/phi-2
83+
84+
# Start server with pre-downloaded model (faster!)
85+
locallab start --model microsoft/phi-2
86+
87+
# Clean up space when needed
88+
locallab models list
89+
locallab models remove old-model-id
90+
locallab models clean
91+
```
92+
93+
> 📖 **Complete Guide**: See the [Model Management Documentation](../guides/model-management.md) for detailed usage, examples, and advanced features.
94+
4695
## 💬 Chat Interface - The Star Feature
4796

4897
The LocalLab chat interface is a powerful terminal-based tool that lets you interact with your AI models directly from the command line.

docs/guides/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- [Getting Started Guide](./getting-started.md) - Start here!
66
- [CLI Guide](./cli.md) - Interactive command-line interface
7+
- [Model Management Guide](./model-management.md) - Download and organize AI models
78
- [API Reference](./API.md)
89
- [FAQ](./faq.md)
910
- [Troubleshooting](./troubleshooting.md)

docs/guides/cli.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ pip install locallab locallab-client
1111
# Configure your setup
1212
locallab config
1313

14+
# Download a model (optional, for faster startup)
15+
locallab models download microsoft/phi-2
16+
1417
# Start the server
1518
locallab start
1619

@@ -22,13 +25,14 @@ locallab chat
2225

2326
1. [Installation](#installation)
2427
2. [Chat Interface](#chat-interface)**Most Popular**
25-
3. [Server Management](#server-management)
26-
4. [Interactive Configuration](#interactive-configuration)
27-
5. [Command Reference](#command-reference)
28-
6. [Environment Variables](#environment-variables)
29-
7. [Configuration Storage](#configuration-storage)
30-
8. [Google Colab Integration](#google-colab-integration)
31-
9. [Recent Updates](#recent-updates)
28+
3. [Model Management](#model-management) 🤖 **New Feature**
29+
4. [Server Management](#server-management)
30+
5. [Interactive Configuration](#interactive-configuration)
31+
6. [Command Reference](#command-reference)
32+
7. [Environment Variables](#environment-variables)
33+
8. [Configuration Storage](#configuration-storage)
34+
9. [Google Colab Integration](#google-colab-integration)
35+
10. [Recent Updates](#recent-updates)
3236

3337
## Installation
3438

@@ -107,6 +111,49 @@ You: Process these --batch # Use batch mode
107111
108112
> 📖 **Complete Guide**: See the [Chat Interface Documentation](../cli/chat.md) for detailed features and examples.
109113
114+
## Model Management
115+
116+
LocalLab includes comprehensive model management capabilities to help you download, organize, and manage AI models locally.
117+
118+
### Why Use Model Management?
119+
120+
- **⚡ Faster Startup** - Pre-downloaded models load instantly
121+
- **📱 Offline Usage** - Use models without internet connection
122+
- **💾 Disk Management** - Monitor and clean up model cache
123+
- **🔍 Model Discovery** - Find and explore available models
124+
125+
### Quick Examples
126+
127+
```bash
128+
# Discover available models
129+
locallab models discover
130+
131+
# Download a model for faster startup
132+
locallab models download microsoft/phi-2
133+
134+
# List your cached models
135+
locallab models list
136+
137+
# Get detailed model information
138+
locallab models info microsoft/phi-2
139+
140+
# Clean up disk space
141+
locallab models clean
142+
```
143+
144+
### Available Commands
145+
146+
| Command | Description |
147+
|---------|-------------|
148+
| `locallab models list` | List locally cached models |
149+
| `locallab models download <model_id>` | Download a model locally |
150+
| `locallab models remove <model_id>` | Remove a cached model |
151+
| `locallab models discover` | Discover available models |
152+
| `locallab models info <model_id>` | Show detailed model information |
153+
| `locallab models clean` | Clean up orphaned cache files |
154+
155+
> 📖 **Complete Guide**: See the [Model Management Documentation](./model-management.md) for detailed usage, examples, and advanced features.
156+
110157
## Server Management
111158
112159
### Start Server

docs/guides/getting-started.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ After following this guide, you'll have:
88

99
-**Your own ChatGPT** running locally on your computer
1010
-**Terminal chat interface** for easy AI interactions
11+
-**Model management** for downloading and organizing AI models
1112
-**Python client** for building AI-powered applications
1213
-**Remote access** capability to use your AI from anywhere
1314

@@ -152,6 +153,29 @@ Congratulations! You now have:
152153

153154
## 💡 What's Next?
154155

156+
### 🤖 Manage Your AI Models
157+
158+
LocalLab includes powerful model management to help you download and organize AI models:
159+
160+
```bash
161+
# Discover available models
162+
locallab models discover
163+
164+
# Download a model for faster startup
165+
locallab models download microsoft/phi-2
166+
167+
# List your cached models
168+
locallab models list
169+
170+
# Get detailed model information
171+
locallab models info microsoft/phi-2
172+
173+
# Clean up disk space
174+
locallab models clean
175+
```
176+
177+
> 📖 **Learn More**: See the [Model Management Guide](./model-management.md) for complete documentation.
178+
155179
### Try Different Features
156180

157181
```bash
@@ -399,10 +423,11 @@ def sync_batch_example():
399423

400424
## Next Steps
401425

402-
1. Explore the [CLI Guide](./cli.md) for interactive configuration
403-
2. Check [Advanced Features](./advanced.md) for optimization options
404-
3. Read the [API Reference](./API.md) for detailed endpoint documentation
405-
4. See the [Performance Guide](../features/performance.md) for optimization tips
426+
1. Learn [Model Management](./model-management.md) to download and organize AI models
427+
2. Explore the [CLI Guide](./cli.md) for interactive configuration
428+
3. Check [Advanced Features](./advanced.md) for optimization options
429+
4. Read the [API Reference](./API.md) for detailed endpoint documentation
430+
5. See the [Performance Guide](../features/performance.md) for optimization tips
406431

407432
## Need Help?
408433

0 commit comments

Comments
 (0)