Skip to content

Commit f9832fa

Browse files
committed
Updated package v4.7
1 parent 75b3ddf commit f9832fa

File tree

14 files changed

+847
-45
lines changed

14 files changed

+847
-45
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to LocalLab will be documented in this file.
44

5+
## 0.4.7 - 2025-03-08
6+
7+
### Added
8+
9+
- Enhanced CLI with interactive configuration wizard
10+
- Added persistent configuration storage
11+
- Implemented environment detection for smart defaults
12+
- Added command groups: start, config, info
13+
- Added support for configuring optimizations through CLI
14+
- Improved Google Colab integration with context-aware prompts
15+
- Added system information command
16+
517
## 0.4.6 - 2025-03-08
618

719
### Fixed

docs/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ sequenceDiagram
4343
docs/
4444
├── guides/ # Start here for comprehensive guides
4545
│ ├── getting-started.md # Begin your journey
46+
│ ├── cli.md # Command-line interface guide
4647
│ ├── api.md # API documentation
4748
│ ├── faq.md # Common questions
4849
│ ├── troubleshooting.md # Solve common issues
@@ -71,8 +72,9 @@ docs/
7172
### For New Users
7273

7374
1. Start with our [Getting Started Guide](./guides/getting-started.md)
74-
2. Choose your client: [Python](./clients/python/README.md) or [Node.js](./clients/nodejs/README.md)
75-
3. Pick your deployment: [Local](./deployment/local.md) or [Google Colab](./colab/README.md)
75+
2. Explore the [CLI Guide](./guides/cli.md) for interactive setup
76+
3. Choose your client: [Python](./clients/python/README.md) or [Node.js](./clients/nodejs/README.md)
77+
4. Pick your deployment: [Local](./deployment/local.md) or [Google Colab](./colab/README.md)
7678

7779
### Deployment Decision Guide
7880

@@ -109,6 +111,7 @@ stateDiagram-v2
109111
1. **New Users**
110112

111113
- Start with [Getting Started](./guides/getting-started.md)
114+
- Explore the [CLI Guide](./guides/cli.md) for interactive setup
112115
- Check [FAQ](./guides/faq.md) for common questions
113116
- Use [Troubleshooting](./guides/troubleshooting.md) when stuck
114117

@@ -132,6 +135,7 @@ stateDiagram-v2
132135

133136
## 🌟 Features
134137

138+
- **Interactive CLI**: Configure and run your server with an intuitive command-line interface
135139
- **Multiple Model Support:** Pre-configured models and custom model loading
136140
- **Advanced Optimizations:** Quantization, attention slicing, and more
137141
- **Resource Management:** Automatic monitoring and optimization

docs/guides/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# LocalLab Guides
22

33
## Getting Started
4+
45
- [Getting Started Guide](./getting-started.md) - Start here!
6+
- [CLI Guide](./cli.md) - Interactive command-line interface
57
- [API Reference](./api.md)
68
- [FAQ](./faq.md)
79
- [Troubleshooting](./troubleshooting.md)
810

911
## Advanced Topics
12+
1013
- [Advanced Usage](./advanced.md)
1114
- [Contributing](./contributing.md)
1215

1316
## Related Documentation
17+
1418
- [Client Libraries](../clients/README.md)
1519
- [Deployment Options](../deployment/README.md)
1620
- [Features](../features/README.md)

docs/guides/advanced.md

Lines changed: 85 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@
66
2. [Performance Optimization](#performance-optimization)
77
3. [Model Management](#model-management)
88
4. [System Configuration](#system-configuration)
9-
5. [Best Practices](#best-practices)
9+
5. [CLI Configuration](#cli-configuration)
10+
6. [Best Practices](#best-practices)
1011

1112
## Advanced Features
1213

1314
### Custom Model Loading
1415

16+
**Using CLI (New!)**
17+
18+
```bash
19+
# Load a custom model with the CLI
20+
locallab start --model meta-llama/Llama-2-7b-chat-hf
21+
```
22+
23+
**Using Environment Variables**
24+
1525
```python
1626
import os
1727
from locallab import start_server
@@ -48,6 +58,15 @@ responses = await client.batch_generate(prompts)
4858

4959
### 1. Memory Optimization
5060

61+
**Using CLI (New!)**
62+
63+
```bash
64+
# Enable memory optimizations via CLI
65+
locallab start --quantize --quantize-type int8 --attention-slicing
66+
```
67+
68+
**Using Environment Variables**
69+
5170
```python
5271
# Enable memory optimizations
5372
os.environ["LOCALLAB_ENABLE_QUANTIZATION"] = "true"
@@ -57,6 +76,15 @@ os.environ["LOCALLAB_ENABLE_CPU_OFFLOADING"] = "true"
5776

5877
### 2. Speed Optimization
5978

79+
**Using CLI (New!)**
80+
81+
```bash
82+
# Enable speed optimizations via CLI
83+
locallab start --flash-attention --better-transformer
84+
```
85+
86+
**Using Environment Variables**
87+
6088
```python
6189
# Enable speed optimizations
6290
os.environ["LOCALLAB_ENABLE_FLASH_ATTENTION"] = "true"
@@ -120,14 +148,66 @@ os.environ["LOCALLAB_ENABLE_FILE_LOGGING"] = "true"
120148
os.environ["LOCALLAB_LOG_FILE"] = "locallab.log"
121149
```
122150

151+
## CLI Configuration
152+
153+
The LocalLab CLI provides a powerful way to configure and manage your server. Here are some advanced CLI features:
154+
155+
### Interactive Configuration Wizard
156+
157+
```bash
158+
# Run the configuration wizard
159+
locallab config
160+
```
161+
162+
### System Information
163+
164+
```bash
165+
# Get detailed system information
166+
locallab info
167+
```
168+
169+
### Advanced CLI Options
170+
171+
```bash
172+
# Start with advanced configuration
173+
locallab start \
174+
--model microsoft/phi-2 \
175+
--port 8080 \
176+
--quantize \
177+
--quantize-type int4 \
178+
--attention-slicing \
179+
--flash-attention \
180+
--better-transformer
181+
```
182+
183+
### Persistent Configuration
184+
185+
The CLI stores your configuration in `~/.locallab/config.json`. You can edit this file directly for advanced configuration:
186+
187+
```json
188+
{
189+
"model_id": "microsoft/phi-2",
190+
"port": 8080,
191+
"enable_quantization": true,
192+
"quantization_type": "int8",
193+
"enable_attention_slicing": true,
194+
"enable_flash_attention": true,
195+
"enable_better_transformer": true
196+
}
197+
```
198+
199+
For more details, see the [CLI Guide](./cli.md).
200+
123201
## Best Practices
124202

125203
1. **Resource Management**
204+
126205
- Monitor system resources
127206
- Use appropriate quantization
128207
- Enable optimizations based on hardware
129208

130209
2. **Error Handling**
210+
131211
```python
132212
try:
133213
response = await client.generate("Hello")
@@ -148,6 +228,7 @@ os.environ["LOCALLAB_LOG_FILE"] = "locallab.log"
148228

149229
## Related Resources
150230

151-
- [API Reference](https://github.com/Developer-Utkarsh/LocalLab/blob/main/docs/features/api-reference.md)
152-
- [Configuration Guide](https://github.com/Developer-Utkarsh/LocalLab/blob/main/docs/features/configuration.md)
153-
- [Troubleshooting](https://github.com/Developer-Utkarsh/LocalLab/blob/main/docs/troubleshooting.md)
231+
- [CLI Guide](./cli.md)
232+
- [API Reference](./api.md)
233+
- [Configuration Guide](../features/configuration.md)
234+
- [Troubleshooting](./troubleshooting.md)

0 commit comments

Comments
 (0)