You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| CodeLlama:13b |~40% | No tool calling, weak on multi-file editing |
189
+
| Llama3.1:8b |**15%**| "Catastrophic failure" on agentic tasks - cannot reliably use tools |
190
+
191
+
> **Note**: High HumanEval scores (Llama3.1:8b = 68%) do NOT indicate agentic capability. SWE-bench measures real GitHub issue resolution, which requires tool use and multi-step reasoning.
OLLAMA_CONTEXT_LENGTH=8192 # Contexte optimal pour 32B
19
19
OLLAMA_KEEP_ALIVE=24h # Garde le modèle en RAM 24h
20
20
```
21
21
22
+
> **New in 2025**: `OLLAMA_KV_CACHE_TYPE=q4_0` enables KV cache quantization, reducing cache memory from ~48GB to ~12GB for 64K context. This makes 64K context feasible on 32GB machines.
|**CNVD-2025-04094**| 🔴 Critical | No authentication by default - any network access to port 11434 can call API | Never expose port 11434; firewall to 127.0.0.1 only |
195
+
|**Model File OOB Write**| 🔴 High | Malformed .gguf files can trigger out-of-bounds write (RCE potential) | Only load models from trusted sources; verify checksums |
196
+
|**Model Poisoning**| 🟡 High | Unrestricted model upload API allows backdoored models | Disable upload API; whitelist approved models |
197
+
198
+
**Recommended Hardening**:
199
+
```bash
200
+
# 1. Firewall: Block external access to Ollama
201
+
sudo ufw deny 11434
202
+
# Or allow only localhost
203
+
sudo ufw allow from 127.0.0.1 to any port 11434
204
+
205
+
# 2. Resource limits (prevent DoS)
206
+
export OLLAMA_MAX_QUEUE=5
207
+
export OLLAMA_NUM_PARALLEL=1
208
+
export OLLAMA_MAX_LOADED_MODELS=1
209
+
210
+
# 3. Run as non-root user (if containerized)
211
+
# See Dockerfile example in docs
212
+
```
213
+
214
+
**Source**: [Cisco Shodan Case Study on Ollama (2025)](https://blogs.cisco.com/security/detecting-exposed-llm-servers-shodan-case-study-on-ollama)
215
+
216
+
---
217
+
218
+
#### 🔒 Air-Gapped Model Verification Protocol
219
+
220
+
**Problem**: Ollama cannot verify model integrity in air-gapped environments (GitHub Issue #9756). When models are transferred offline, the system assumes manifest data is authoritative.
0 commit comments