Skip to content

Commit 2df1560

Browse files
committed
fix: default to llama3.1 for Ollama (llama3.3 requires 32GB+ RAM)
1 parent 43182f8 commit 2df1560

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ guard := detector.New(
159159
detector.WithLLM(judge, detector.LLMConditional),
160160
)
161161

162-
// Ollama - use any local model (llama3.3, mistral, qwen, etc.)
163-
judge := detector.NewOllamaJudge("llama3.3")
162+
// Ollama - use any local model (llama3.1, llama3.3, mistral, qwen, etc.)
163+
judge := detector.NewOllamaJudge("llama3.1") // 8B model, runs on 8GB RAM
164164
guard := detector.New(
165165
detector.WithLLM(judge, detector.LLMFallback),
166166
)
@@ -200,8 +200,10 @@ ANTHROPIC_MODEL=claude-sonnet-4-5-20250929
200200
OPENROUTER_API_KEY=sk-or-...
201201
OPENROUTER_MODEL=anthropic/claude-sonnet-4.5
202202

203-
# Ollama (local, no API key needed, defaults to llama3.3)
204-
OLLAMA_MODEL=llama3.3
203+
# Ollama (local, no API key needed)
204+
# Defaults to llama3.1 (8B, most common, runs on 8GB RAM)
205+
# For better quality: OLLAMA_MODEL=llama3.3:70b-instruct-q2_K (needs 32GB+ RAM)
206+
OLLAMA_MODEL=llama3.1
205207
OLLAMA_HOST=http://localhost:11434
206208
```
207209

cmd/go-promptguard/interactive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func (m *model) updateGuard() {
226226

227227
ollamaModel := os.Getenv("OLLAMA_MODEL")
228228
if ollamaModel == "" {
229-
ollamaModel = "llama3.3" // Default fallback
229+
ollamaModel = "llama3.1"
230230
}
231231

232232
if ollamaHost != "" {

0 commit comments

Comments
 (0)