Configure LM Studio as embedding provider for GrepAI. Use this skill for local embeddings with a GUI interface.
This skill covers using LM Studio as the embedding provider for GrepAI, offering a user-friendly GUI for managing local models.
LM Studio is a desktop application for running local LLMs with:
Visit lmstudio.ai and download for your platform:
nomic-embed-text-v1.5bge-small-en-v1.5bge-large-en-v1.5http://localhost:1234)# .grepai/config.yaml
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
endpoint: http://localhost:1234
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
endpoint: http://localhost:8080
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
endpoint: http://localhost:1234
dimensions: 768
| Property | Value |
|---|---|
| Dimensions | 768 |
| Size | ~260 MB |
| Quality | Excellent |
| Speed | Fast |
embedder:
provider: lmstudio
model: nomic-embed-text-v1.5
| Property | Value |
|---|---|
| Dimensions | 384 |
| Size | ~130 MB |
| Quality | Good |
| Speed | Very fast |
Best for: Smaller codebases, faster indexing.
embedder:
provider: lmstudio
model: bge-small-en-v1.5
dimensions: 384
| Property | Value |
|---|---|
| Dimensions | 1024 |
| Size | ~1.3 GB |
| Quality | Very high |
| Speed | Slower |
Best for: Maximum accuracy.
embedder:
provider: lmstudio
model: bge-large-en-v1.5
dimensions: 1024
| 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 | ā” | āāāāā |
1234 (default)Look for the green indicator showing the server is running.
# 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)"
}'
In LM Studio's Local Server tab:
| Setting | Recommended Value |
|---|---|
| Port | 1234 |
| Enable CORS | Yes |
| Context Length | Auto |
| GPU Layers | Max (for speed) |
LM Studio automatically uses:
Adjust GPU layers in settings for memory/speed balance.
For server environments, LM Studio supports CLI mode:
# Start server without GUI (check LM Studio docs for exact syntax)
lmstudio server start --model nomic-embed-text-v1.5 --port 1234
ā Problem: Connection refused ā Solution: Ensure LM Studio server is running:
ā Problem: Model not found ā Solution:
ā Problem: Slow embedding generation ā Solutions:
ā Problem: Port already in use ā Solution: Change port in LM Studio settings:
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
| 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.
If you need a more reliable background service:
brew install ollama
ollama serve &
ollama pull nomic-embed-text
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434
rm .grepai/index.gob
grepai watch
nomic-embed-text-v1.5 for best balanceSuccessful 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.