← back to Settlement Prescan
num_ctx=8192 fix (context-overflow on large images) + detached full-scan runner
ad49317ce1738333a0ac8e5746b4c2f1597cce99 · 2026-07-09 19:33:30 -0700 · Steve Abrams
Files touched
Diff
commit ad49317ce1738333a0ac8e5746b4c2f1597cce99
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Jul 9 19:33:30 2026 -0700
num_ctx=8192 fix (context-overflow on large images) + detached full-scan runner
---
run-full.sh | 17 +++++++++++++++++
scan.mjs | 3 ++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/run-full.sh b/run-full.sh
new file mode 100755
index 0000000..222e708
--- /dev/null
+++ b/run-full.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+# Detached resumable full settlement pre-scan runner.
+# Scans ONLY rows where settlement_verdict IS NULL (resumable — safe to re-run).
+# $0 local (Mac1 Ollama qwen2.5vl). Writes only to the 3 staging tables.
+set -euo pipefail
+cd "$(dirname "$0")"
+
+LOG="$PWD/scan-full.log"
+echo "=== full pre-scan launch $(date -u +%FT%TZ) ===" >> "$LOG"
+
+# Guarantee VRAM headroom: unload qwen3:14b so the 7B vision model fits.
+curl -s http://192.168.1.133:11434/api/generate \
+ -d '{"model":"qwen3:14b","keep_alive":0,"prompt":""}' --max-time 20 >/dev/null 2>&1 || true
+
+# Scan all NULL rows across all 3 tables (no --limit).
+node scan.mjs >> "$LOG" 2>&1
+echo "=== full pre-scan finished $(date -u +%FT%TZ) ===" >> "$LOG"
diff --git a/scan.mjs b/scan.mjs
index 4580f8b..a2d6b42 100644
--- a/scan.mjs
+++ b/scan.mjs
@@ -101,7 +101,8 @@ Respond with ONLY a compact JSON object, no prose:
async function runVision(b64) {
const body = {
model: MODEL, prompt: VISION_PROMPT, images: [b64],
- stream: false, format: 'json', keep_alive: '30m', options: { temperature: 0 },
+ stream: false, format: 'json', keep_alive: '30m',
+ options: { temperature: 0, num_ctx: 8192 },
};
const res = await fetch(`${OLLAMA}/api/generate`, {
method: 'POST', headers: { 'Content-Type': 'application/json' },
← b4e4776 settlement pre-scan: /bin/zsh-local vision gate over froment
·
back to Settlement Prescan
·
RETIRE settlement-prescan — false-green (contrarian + DTD-B) 067d455 →