Local extract reliability (Ollama / LM Studio)
Local extract reliability (Ollama / LM Studio)
Section titled “Local extract reliability (Ollama / LM Studio)”Quick ops runbook when KG extraction stalls with Network error … /api/chat or
Local inference gate saturated under a single-slot Ollama runner (-np 1).
Recommended local profile
Section titled “Recommended local profile”| Knob | Value | Why |
|---|---|---|
OLLAMA_CONTEXT_LENGTH |
8192 |
Avoid 128k runner cost on extract |
EDGEQUAKE_MAX_CONCURRENT_EXTRACTIONS |
1 |
Match Ollama serial slot |
EDGEQUAKE_PROVIDER_BUDGET / EDGEQUAKE_LOCAL_MAX_INFLIGHT |
1 |
Gate admits one in-flight chat |
EDGEQUAKE_EXTRACT_REASONING_EFFORT |
none |
Forces think:false / reasoning:"off" |
| Extract model | gemma4:latest (or cloud) |
Prefer over 35B for bulk PDFs |
make dev / make backend-bg export these defaults for ollama/lmstudio providers.
Unblock a stuck document
Section titled “Unblock a stuck document”- Restart backend so think-off + admission clamps are live:
Terminal window make stopexport OLLAMA_CONTEXT_LENGTH=8192export EDGEQUAKE_MAX_CONCURRENT_EXTRACTIONS=1export EDGEQUAKE_PROVIDER_BUDGET=1export EDGEQUAKE_EXTRACT_REASONING_EFFORT=nonemake backend-bg # or make dev - Prefer a smaller extract model on the workspace (Settings → models) if still on
qwen3.6:35b*. - Cancel the stuck track in Documents → Active run, then requeue / re-upload.
- Confirm health:
curl -s http://localhost:8090/health | jq .providers
Success signals
Section titled “Success signals”- Near-zero
Network errorunder single-doc local extract with healthy Ollama. - Gate saturation becomes wait + heartbeat (
Extracting … in flight), not connection storms. - Outbound Ollama body includes
"think": falseandoptions.num_ctx≤ configured ctx.