paperless-gpt was generating plausible-looking, entirely fabricated German OCR text for my scanned documents. The model returned confident, grammatically correct German for pages that were actually invoices, receipts, and handwritten notes, and the titles it assigned were just as fictional.
The cause was not a bug in paperless-gpt. A configuration error sent page images to a text-only model that could not see images at all, and the model did what language models do with input they can’t process: it made something up.
A second, independent problem sat underneath. The Ollama iGPU backend that was supposed to speed up inference crashed 451 times in one day on an unstable Vulkan/radv path.
View the complete homelab infrastructure source on GitHub
The Configuration Error
The paperless-gpt deployment had two model settings:
# kubernetes/apps/paperless/paperless-gpt.yml
env:
- name: LLM_MODEL
value: "qwen2.5-coder:7b" # text-only model for tagging/title generation
- name: VISION_LLM_MODEL
value: "qwen2.5-coder:7b" # ← BUG: this is also text-only
VISION_LLM_MODEL has to point at a model that can process images. qwen2.5-coder:7b is a text-only code model. It has no image encoder and no way to process pixel data.
paperless-gpt’s OCR provider sends page images to whatever model VISION_LLM_MODEL names. In this setup there was no capability check and no error when the model couldn’t handle images. The page image never reached anything that could interpret it, so the model answered from the only input it had, the prompt text, which asks for the content of a document page.
For a scanned German invoice, the model would generate something like:
Rechnung Nr. 2024-0847
Betrag: €1.247,83
Firma: Mustermann GmbH
Confident, grammatically correct, and entirely fictional. The real document might have been a parking ticket, a utility bill, or a handwritten note. The model couldn’t tell, because it never saw the image.
How Many Documents Were Affected
The pipeline ran with this misconfiguration for several weeks. Every image-based document (scanned PDFs, photographed receipts, screenshots) received fabricated OCR content. Text-based documents (digital PDFs with selectable text) were unaffected because paperless-gpt uses the embedded text layer, not the vision model, for those.
The affected documents had titles like:
Rechnung Nr. 2024-1847 — Firma Schmidt & Partner
GEPRÜFT — Handelsregister HRB 12345
The titles were made up, but they looked real enough that I didn’t notice until I searched for a specific invoice and found a document titled with a company name I didn’t recognize. The scanned image showed a utility bill from a different provider entirely.
The Fix
# kubernetes/apps/paperless/paperless-gpt.yml
env:
- name: LLM_MODEL
value: "qwen2.5:7b-instruct" # changed a week later, separate from this fix
- name: VISION_LLM_MODEL
value: "minicpm-v" # actual vision-capable model
minicpm-v (MiniCPM-V 2.6, 8B parameters in Ollama’s library) is a small vision-language model that takes images and returns text. It is less capable than larger models, but it can actually see the page and produce real OCR text.
Switching the model did not repair the damage. paperless-gpt doesn’t re-process documents on its own, and the fabricated content was already written to the Paperless database, so every affected document had to be re-OCRed by hand.
The Ollama iGPU Problem
The configuration error would have been easier to spot with a stable Ollama backend. The Ollama instance ran on the AI LXC using the AMD Barcelo iGPU through the Vulkan/radv path, and it crashed constantly.
The integrated GPU of the AMD Ryzen 7 5825U (gfx90c) has no official ROCm support. I had tried two GPU paths on it. The first was the usual community workaround for ROCm, HSA_OVERRIDE_GFX_VERSION=9.0.0, which makes ROCm treat the chip as a supported gfx900. It was never stable, and I had already abandoned it. The second was Vulkan via the radv driver, enabled with OLLAMA_IGPU_ENABLE=1. That is the one that was running here.
The crash pattern:
vk::DeviceLostError: the GPU has been lost
451 crashes in a single day, under paperless-gpt’s auto-tagging backlog, which worked out to roughly one crash per request under concurrent load. Each crash kills the Ollama inference process and every in-flight request with it. paperless-gpt, Open WebUI, and anything else using Ollama saw connection refused errors.
Some of the paperless-gpt failures I first blamed on paperless-gpt itself were these crashes: the request died before the model returned anything. Single isolated requests usually went through, which is why the instability went unnoticed at first.
The fix: switch Ollama to CPU-only mode and remove the OLLAMA_IGPU_ENABLE=1 flag entirely.
# Ansible role for Ollama
env:
OLLAMA_HOST: "0.0.0.0:11434"
# OLLAMA_IGPU_ENABLE removed - CPU-only for stability
# HSA_OVERRIDE_GFX_VERSION removed - was never stable on gfx90c
CPU inference is slower (qwen2.5:7b takes ~30 seconds per inference vs ~8 seconds on the iGPU), but it doesn’t crash. For a homelab document pipeline, stability wins over speed. It is the same trade-off that decides what gets to auto-update on this cluster and what needs a human: a slow, boring path beats a fast, unstable one.
The Lesson: Two Failure Modes Stacked
The incident had two independent root causes that interacted to make debugging harder:
- Vision model pointing at a text-only model: fabricated OCR content
- Ollama iGPU crashing 451 times in a day: intermittent connection failures
On its own, (1) produces consistent garbage on every image document, a pattern that points straight at configuration. On its own, (2) looks like plain Ollama instability. Together, every paperless-gpt problem looked like an Ollama crash (intermittent, random) instead of a systematic configuration error (consistent, every image document).
The debugging lesson: when a system fails in two different ways (sometimes fabricated content, sometimes connection refused), look for two separate root causes instead of assuming one explains both. The same discipline mattered when three merged GitOps fixes turned out to have three unrelated failure modes.
The same risk exists in production AI pipelines: if the input type silently never reaches the model, you get plausible-looking wrong output instead of an error. Hosted APIs such as Azure OpenAI generally reject image content sent to a deployment without vision support with an HTTP 400, which is the failure mode you want. A self-hosted stack that drops the image without an error is the dangerous one. Either way, the fix is the same: confirm the model’s capabilities match your input types, and test with known inputs before you trust the output.
The LXC running this workload sits on an older BMAX B5A Pro (Ryzen 7 5825U), and the ROCm gap described above is specific to that chip. If you’re buying a mini PC for this kind of local-inference box today, the BMAX Ryzen 7 8745HS Mini PC* is the direct successor with a much stronger Radeon 780M iGPU.