grepai-embeddings-ollama
Skill22 starsChanged 10 months agoMITView on GitHub
Configure Ollama as embedding provider for GrepAI. Use this skill for local, private embedding generation.
- Pipes a download into a shell
- Installs packages
In this repository26 other files it gives its agents.
- grepai-languagesSkill
- grepai-troubleshootingSkill
- grepai-workspacesSkill
- grepai-config-referenceSkill
- grepai-ignore-patternsSkill
- grepai-initSkill
- grepai-embeddings-lmstudioSkill
- grepai-embeddings-openaiSkill
- grepai-installationSkill
- grepai-ollama-setupSkill
- grepai-quickstartSkill
- grepai-chunkingSkill
- grepai-watch-daemonSkill
- grepai-mcp-claudeSkill
- grepai-mcp-cursorSkill
- grepai-mcp-toolsSkill
- grepai-search-advancedSkill
- grepai-search-basicsSkill
- grepai-search-boostingSkill
- grepai-search-tipsSkill
- grepai-storage-gobSkill
- grepai-storage-postgresSkill
- grepai-storage-qdrantSkill
- grepai-trace-calleesSkill
- grepai-trace-callersSkill
- grepai-trace-graphSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 263
Run Ollama on a powerful server and connect remotely:
- Very specific: line 300
Use a smaller model (nomic-embed-text)
- Very specific: line 301
Ensure GPU is being used (ollama ps)
- Distinctive: line 303
Consider a remote server with better hardware
- Distinctive: line 307
Use a smaller model
- Distinctive: line 310
Use remote Ollama server
- Distinctive: line 323
Match dimensions: Don't mix models with different dimensions
- Distinctive: line 324
Re-index on model change: Delete index and re-run watch
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GrepAI Embeddings with Ollama
This skill covers using Ollama as the embedding provider for GrepAI, enabling 100% private, local code search.
When to Use This Skill
- Setting up private, local embeddings
- Choosing the right Ollama model
- Optimizing Ollama performance
- Troubleshooting Ollama connection issues
Why Ollama?
| Advantage | Description |
| 🔒 Privacy | Code never leaves your machine |
| 💰 Free | No API costs or usage limits |
| ⚡ Speed | No network latency |
| 🔌 Offline | Works without internet |
| 🔧 Control | Choose your model |
Prerequisites
- Ollama installed and running
- An embedding model downloaded
# Install Ollama
brew install ollama # macOS
# or
curl -fsSL https://ollama.com/install.sh | sh # Linux
# Start Ollama
ollama serve
# Download model
ollama pull nomic-embed-textConfiguration
Basic Configuration
# .grepai/config.yaml
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434With Custom Endpoint
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://192.168.1.100:11434 # Remote Ollama serverWith Explicit Dimensions
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434
dimensions: 768 # Usually auto-detectedAvailable Models
Recommended: nomic-embed-text
ollama pull nomic-embed-text| Property | Value |
| Dimensions | 768 |
| Size | ~274 MB |
| Speed | Fast |
| Quality | Excellent for code |
| Language | English-optimized |
Configuration:
embedder:
provider: ollama
model: nomic-embed-textMultilingual: nomic-embed-text-v2-moe
ollama pull nomic-embed-text-v2-moe| Property | Value |
| Dimensions | 768 |
| Size | ~500 MB |
| Speed | Medium |
| Quality | Excellent |
| Language | Multilingual |
Best for codebases with non-English comments/documentation.
Configuration:
embedder:
provider: ollama
model: nomic-embed-text-v2-moeHigh Quality: bge-m3
ollama pull bge-m3| Property | Value |
| Dimensions | 1024 |
| Size | ~1.2 GB |
| Speed | Slower |
| Quality | Very high |
| Language | Multilingual |
Best for large, complex codebases where accuracy is critical.
Configuration:
embedder:
provider: ollama
model: bge-m3
dimensions: 1024Maximum Quality: mxbai-embed-large
ollama pull mxbai-embed-large| Property | Value |
| Dimensions | 1024 |
| Size | ~670 MB |
| Speed | Medium |
| Quality | Highest |
| Language | English |
Configuration:
embedder:
provider: ollama
model: mxbai-embed-large
dimensions: 1024Model Comparison
| Model | Dims | Size | Speed | Quality | Use Case |
nomic-embed-text | 768 | 274MB | ⚡⚡⚡ | ⭐⭐⭐ | General use |
nomic-embed-text-v2-moe | 768 | 500MB | ⚡⚡ | ⭐⭐⭐⭐ | Multilingual |
bge-m3 | 1024 | 1.2GB | ⚡ | ⭐⭐⭐⭐⭐ | Large codebases |
mxbai-embed-large | 1024 | 670MB | ⚡⚡ | ⭐⭐⭐⭐⭐ | Maximum accuracy |
Performance Optimization
Memory Management
Models load into RAM. Ensure sufficient memory:
| Model | RAM Required |
nomic-embed-text | ~500 MB |
nomic-embed-text-v2-moe | ~800 MB |
bge-m3 | ~1.5 GB |
mxbai-embed-large | ~1 GB |
GPU Acceleration
Ollama automatically uses:
- macOS: Metal (Apple Silicon)
- Linux/Windows: CUDA (NVIDIA GPUs)
Check GPU usage:
ollama psKeeping Model Loaded
By default, Ollama unloads models after 5 minutes of inactivity. Keep loaded:
# Keep model loaded indefinitely
curl http://localhost:11434/api/generate -d '{
"model": "nomic-embed-text",
"keep_alive": -1
}'Verifying Connection
Check Ollama is Running
curl http://localhost:11434/api/tagsList Available Models
ollama listTest Embedding
curl http://localhost:11434/api/embeddings -d '{
"model": "nomic-embed-text",
"prompt": "function authenticate(user, password)"
}'Running Ollama as a Service
macOS (launchd)
Ollama app runs automatically on login.
Linux (systemd)
# Enable service
sudo systemctl enable ollama
# Start service
sudo systemctl start ollama
# Check status
sudo systemctl status ollamaManual Background
nohup ollama serve > /dev/null 2>&1 &Remote Ollama Server
Run Ollama on a powerful server and connect remotely:
On the Server
# Allow remote connections
OLLAMA_HOST=0.0.0.0 ollama serveOn the Client
# .grepai/config.yaml
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://server-ip:11434Common Issues
❌ Problem: Connection refused ✅ Solution:
# Start Ollama
ollama serve❌ Problem: Model not found ✅ Solution:
# Pull the model
ollama pull nomic-embed-text❌ Problem: Slow embedding generation ✅ Solutions:
- Use a smaller model (
nomic-embed-text) - Ensure GPU is being used (
ollama ps) - Close memory-intensive applications
- Consider a remote server with better hardware
❌ Problem: Out of memory ✅ Solutions:
- Use a smaller model
- Close other applications
- Upgrade RAM
- Use remote Ollama server
❌ Problem: Embeddings differ after model update ✅ Solution: Re-index after model updates:
rm .grepai/index.gob
grepai watchBest Practices
- Start with
nomic-embed-text: Best balance of speed/quality - Keep Ollama running: Background service recommended
- Match dimensions: Don't mix models with different dimensions
- Re-index on model change: Delete index and re-run watch
- Monitor memory: Embedding models use significant RAM
Output Format
Successful Ollama configuration:
✅ Ollama Embedding Provider Configured
Provider: Ollama
Model: nomic-embed-text
Endpoint: http://localhost:11434
Dimensions: 768 (auto-detected)
Status: Connected
Model Info:
- Size: 274 MB
- Loaded: Yes
- GPU: Apple MetalDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

