grepai-embeddings-lmstudio
Configure LM Studio as embedding provider for GrepAI. Use this skill for local embeddings with a GUI interface.
What this skill does
# GrepAI Embeddings with LM Studio
This skill covers using LM Studio as the embedding provider for GrepAI, offering a user-friendly GUI for managing local models.
## When to Use This Skill
- Want local embeddings with a graphical interface
- Already using LM Studio for other AI tasks
- Prefer visual model management over CLI
- Need to easily switch between models
## What is LM Studio?
LM Studio is a desktop application for running local LLMs with:
- š„ļø Graphical user interface
- š¦ Easy model downloading
- š OpenAI-compatible API
- š 100% private, local processing
## Prerequisites
1. Download LM Studio from [lmstudio.ai](https://lmstudio.ai)
2. Install and launch the application
3. Download an embedding model
## Installation
### Step 1: Download LM Studio
Visit [lmstudio.ai](https://lmstudio.ai) and download for your platform:
- macOS (Intel or Apple Silicon)
- Windows
- Linux
### Step 2: Launch and Download a Model
1. Open LM Studio
2. Go to the **Search** tab
3. Search for an embedding model:
- `nomic-embed-text-v1.5`
- `bge-small-en-v1.5`
- `bge-large-en-v1.5`
4. Click **Download**
### Step 3: Start the Local Server
1. Go to the **Local Server** tab
2. Select your embedding model
3. Click **Start Server**
4. Note the endpoint (default: `http://localhost:1234`)
## Configuration
### Basic Configuration
```yaml
# .grepai/config.yaml
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
endpoint: http://localhost:1234
```
### With Custom Port
```yaml
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
endpoint: http://localhost:8080
```
### With Explicit Dimensions
```yaml
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
endpoint: http://localhost:1234
dimensions: 768
```
## Available Models
### nomic-embed-text-v1.5 (Recommended)
| Property | Value |
|----------|-------|
| Dimensions | 768 |
| Size | ~260 MB |
| Quality | Excellent |
| Speed | Fast |
```yaml
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
```
### bge-small-en-v1.5
| Property | Value |
|----------|-------|
| Dimensions | 384 |
| Size | ~130 MB |
| Quality | Good |
| Speed | Very fast |
Best for: Smaller codebases, faster indexing.
```yaml
embedder:
provider: lmstudio
model: bge-small-en-v1.5
dimensions: 384
```
### bge-large-en-v1.5
| Property | Value |
|----------|-------|
| Dimensions | 1024 |
| Size | ~1.3 GB |
| Quality | Very high |
| Speed | Slower |
Best for: Maximum accuracy.
```yaml
embedder:
provider: lmstudio
model: bge-large-en-v1.5
dimensions: 1024
```
## Model Comparison
| Model | Dims | Size | Speed | Quality |
|-------|------|------|-------|---------|
| `bge-small-en-v1.5` | 384 | 130MB | ā”ā”ā” | āāā |
| `nomic-embed-text-v1.5` | 768 | 260MB | ā”ā” | āāāā |
| `bge-large-en-v1.5` | 1024 | 1.3GB | ā” | āāāāā |
## LM Studio Server Setup
### Starting the Server
1. Open LM Studio
2. Navigate to **Local Server** tab (left sidebar)
3. Select an embedding model from the dropdown
4. Configure settings:
- Port: `1234` (default)
- Enable **Embedding Endpoint**
5. Click **Start Server**
### Server Status
Look for the green indicator showing the server is running.
### Verifying the Server
```bash
# Check server is responding
curl http://localhost:1234/v1/models
# Test embedding
curl http://localhost:1234/v1/embeddings \
-H "Content-Type: application/json" \
-d '{
"model": "nomic-embed-text-v1.5",
"input": "function authenticate(user)"
}'
```
## LM Studio Settings
### Recommended Settings
In LM Studio's Local Server tab:
| Setting | Recommended Value |
|---------|-------------------|
| Port | 1234 |
| Enable CORS | Yes |
| Context Length | Auto |
| GPU Layers | Max (for speed) |
### GPU Acceleration
LM Studio automatically uses:
- **macOS:** Metal (Apple Silicon)
- **Windows/Linux:** CUDA (NVIDIA)
Adjust GPU layers in settings for memory/speed balance.
## Running LM Studio Headless
For server environments, LM Studio supports CLI mode:
```bash
# Start server without GUI (check LM Studio docs for exact syntax)
lmstudio server start --model nomic-embed-text-v1.5 --port 1234
```
## Common Issues
ā **Problem:** Connection refused
ā
**Solution:** Ensure LM Studio server is running:
1. Open LM Studio
2. Go to Local Server tab
3. Click Start Server
ā **Problem:** Model not found
ā
**Solution:**
1. Download the model in LM Studio's Search tab
2. Select it in the Local Server dropdown
ā **Problem:** Slow embedding generation
ā
**Solutions:**
- Enable GPU acceleration in LM Studio settings
- Use a smaller model (bge-small-en-v1.5)
- Close other GPU-intensive applications
ā **Problem:** Port already in use
ā
**Solution:** Change port in LM Studio settings:
```yaml
embedder:
endpoint: http://localhost:8080 # Different port
```
ā **Problem:** LM Studio closes and server stops
ā
**Solution:** Keep LM Studio running in the background, or consider using Ollama which runs as a system service
## LM Studio vs Ollama
| Feature | LM Studio | Ollama |
|---------|-----------|--------|
| GUI | ā
Yes | ā CLI only |
| System service | ā App must run | ā
Background service |
| Model management | ā
Visual | ā
CLI |
| Ease of use | āāāāā | āāāā |
| Server reliability | āāā | āāāāā |
**Recommendation:** Use LM Studio if you prefer a GUI, Ollama for always-on background service.
## Migrating from LM Studio to Ollama
If you need a more reliable background service:
1. Install Ollama:
```bash
brew install ollama
ollama serve &
ollama pull nomic-embed-text
```
2. Update config:
```yaml
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434
```
3. Re-index:
```bash
rm .grepai/index.gob
grepai watch
```
## Best Practices
1. **Keep LM Studio running:** Server stops when app closes
2. **Use recommended model:** `nomic-embed-text-v1.5` for best balance
3. **Enable GPU:** Faster embeddings with hardware acceleration
4. **Check server before indexing:** Ensure green status indicator
5. **Consider Ollama for production:** More reliable as background service
## Output Format
Successful LM Studio configuration:
```
ā
LM Studio Embedding Provider Configured
Provider: LM Studio
Model: nomic-embed-text-v1.5
Endpoint: http://localhost:1234
Dimensions: 768 (auto-detected)
Status: Connected
Note: Keep LM Studio running for embeddings to work.
```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts ā single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ā„ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.