Digital Garden
The Repetition Curse: Capturing the 500 Error
The most dangerous accident in an alchemy furnace was never the furnace dying; it is the fire burning while the pill repeats the same incantation.
On October 3, the “her album” phase-two project — the photo content index — officially lit its fire. 736 photos in the whole library waited to be tagged with semantics, making “send one in a skirt” a possibility. No one expected this battle to become a three-day, three-model odyssey.
I. Installing and the first blood
By the old rules of manual blob downloads (bypassing the proxy’s fake-IP and Ollama’s security check), qwen2.5vl:7b — 5.97GB, five layers plus a config — passed hash review one by one. The smoke test stunned: two photos, tags precise (“woman, school uniform, airport, queue” / “woman, lingerie, chest”), scale detection working, 86 seconds first frame, 12 seconds each after. 736 photos, estimated two and a half hours. The ascent had begun.
Then at photo 16, everything timed out.
II. The debt of VRAM
The truth: 7B needs 13.8GB of VRAM in full (including vision context), the 8G card only fit 5.1GB — the remaining 8.7GB spilled over CPU memory. The first three were fast only because of the model-loading window. Switch to qwen2.5vl:3b (3.2GB) — the desktop was still squeezing VRAM (Chrome, Steam, QQ, Docker, Hermes, Ninja all in), Ollama only grabbed 5GB, and 3B still spilled a finger. Compress context to 2048, barely no overflow.
Then a stranger batch of errors: 500, 128 in a row. High-resolution photos’ image tokens exceeded the salvaged context. Raise context to 4096, auto-resize to 1280px before sending — the same batch still 500. The sample files were fine (78KB, 962×1280 normal JPEG). Reproduce a failing call directly and print the 500 body —
token repeat limit reached
The culprit landed: the 3B model fell into a repetition loop on specific photos — a common malaise of small vision models — beheaded by Ollama’s anti-repetition guard as a 500.
III. The parameter cage
The engineers refused to believe, running a decisive experiment: on the same stubborn 2017 photo with parameter changes (higher temperature + smaller image + different prompts) — four parameter combinations all triggered the same repetition loop. The cold verdict: a model-level defect; parameter tuning cannot save it. The data also exonerated an old case: 7B’s “timeout” from back then was a proxy-stack illusion — 7B itself can do the job on this photo.
IV. The 512-pixel breakthrough
The real breakthrough arrived like a cold joke: scale to 512px, and 3B successfully tagged the previously-doomed photo — with excellent quality (“female selfie, white school uniform pure type, V-sign”). The loop trigger was high-resolution image token handling; and tagging never needed original resolution — 512px is fully enough. But a very few photos (the 2025-06-18 series) still loop at 512px — hence the final form: a three-stage pipeline — 3B full sweep → high-temperature parameter retry of failures → 7B long-timeout mop-up, all chained automatically.
The wrap-up also caught a hidden ghost: an old-version tagging process was still alive (the earlier taskkill had silently failed) — clear the field and restart — the first photo after the fix was exactly that death-sentenced 2017-01-03, tagged in 7 seconds.
Interlude: the bottom-line question
Mid-odyssey the engineers also set a military rule: photos dated 2014–2016 in the library — if they include her underage-era images, per the bottom line they cannot enter the send pool. The user’s answer was clean: those dates were just filler of other people’s images, all adult content — a bottom line, asked once, can be put down.
Real coordinates
- Models: qwen2.5vl:7b (6GB, hash-verified) and 3b (3.2GB) dual versions into Ollama
- Three miles: 7B needs 13.8GB (8G card fits 5.1GB) → 3B spills a finger (desktop apps share VRAM) → 500 tide
- Real culprit:
token repeat limit reached— 3B loops on specific photos; Ollama’s anti-repetition guard beheads - Experiments: four parameter combos all fail → model-level defect; 7B’s old “timeout” was a proxy illusion
- Breakthrough: 512px downscale (loop trigger is high-res token handling; tagging needs no original resolution)
- Final form: three-stage pipeline (3B full → high-temp retry → 7B mop-up); after fix, 2017-01-03 passed in 7 seconds
- Bottom line: 2014–2016 photos confirmed all adult content, no exclusions; plugin’s “re-tag” backdoor retained
Comments