# Running Vision Locally: A Hands-On Comparison of Four Multimodal Models on a 24GB GPU

    Plenty of people run inference locally for months without ever leaving text mode — code, summaries, evals. Most local runtimes load two things separately: the language model weights and a visual projection file. Without the projection, images are silently ignored or throw an error. This article walks through how an image becomes tokens a language model can read, then reports on a reproducible test of four anonymous multimodal models across two scenarios on a single 24GB GPU: transcribing a dense table screenshot, and turning a web app screenshot into runnable HTML and CSS. It covers where specialized document models beat general vision-language models, where they lose, why the screenshot-to-code bottleneck is long context and instruction following rather than vision, and how resolution choice, caching, and tiered routing should shape a local vision pipeline.

    1. The Overlooked Layer: Multimodal Is Not “Another Model”

    Many people have been running inference locally for a long time, yet their workloads are still pure text: writing code, summarizing documents, running evaluations. Then one day, while skimming the docs, they notice that loading one extra set of vision projection weights lets the same process read images. That is the local-deployment equivalent of buying a device with a camera and using it only to make phone calls, and it is remarkably common.

    The reason is that a runtime loads vision in two parts: the main language model weights and the vision projection weights, usually kept in a separate file. The main weights handle understanding, reasoning, and generation. The vision side encodes an image into vectors, and a projection layer aligns those vectors with the language model’s embedding space. If you start the process with only the main weights, it runs in text-only mode. Image input is either ignored or rejected with an error, and the silent case is the more dangerous one, because a model that “can chat” feels like a model that “can do anything.”

    So the first step is not picking a model. It is a five-minute sanity check: upload a screenshot containing known text and ask what the first line says. A correct answer means the vision path is working. A vague answer, or an outright “I can’t see any image,” means the projection layer was never loaded or does not match the model version.

    2. How an Image Becomes Tokens a Language Model Can Read

    Once you understand the pipeline, the observations in the rest of this article make sense.

    1. Preprocessing and resolution normalization. The image is resized or split into a fixed grid. Resolution is not simply “more is better”; it directly determines how many vision tokens the image produces.
    2. Vision encoding. The encoder emits a set of patch-level features, which are essentially a long list of high-dimensional vectors.
    3. Projection alignment. The projection layer maps those vectors into the language model’s embedding space so they share a coordinate system with text tokens. Only then can the language model “read” them.
    4. Sequence concatenation. Vision tokens and text prompt tokens are concatenated into a single sequence and passed to the decoder. Everything after that is ordinary autoregressive generation.

    Three practical conclusions follow.

    • The projection weights must match the main model’s family and version. A mismatch does not degrade gracefully. You get well-formed output that is semantically nonsense, which is the hardest failure mode to diagnose.
    • A single image can consume thousands of tokens of context. High-resolution web screenshots are the worst offenders. Prefill time goes up noticeably, which in turn squeezes the room left for a long output.
    • The vision side also eats VRAM. On a single 24GB card, the vision encoder and the KV cache compete for the same memory, and quantization choices matter more than they do in text-only setups.

    3. Test Design: Two Scenarios, Four Models, One 24GB GPU

    To avoid drawing conclusions from casual clicking around, the test was designed to be reproducible.

    Environment: a single GPU with 24GB of VRAM, a fixed quantization level, concurrency fixed at 1, and fixed sampling parameters.

    Scenario 1: structured screenshot to text reconstruction. Input is a screenshot of a dense table, and the model must reproduce it row by row. This tests whether the model can see and transcribe accurately: text accuracy, fidelity of digits and symbols, correct row-to-column mapping, and sensible handling of blank and merged cells.

    Scenario 2: web app screenshot to runnable code. Input is a screenshot of a purpose-built web app, and the model must generate HTML plus styles. This tests whether it can reason: fidelity of layout hierarchy, approximation of visual styling, structural completeness, instruction following, and whether the output opens and runs as-is.

    Participants (anonymized):

    • Model A: a small-to-mid-size general-purpose vision-language model, optimized for low latency.
    • Model B: a general-purpose vision-language model oriented toward image description and reasoning.
    • Model C: a multimodal model built for document parsing, with a long context window.
    • Model D: a multimodal model oriented toward code and interface understanding.

    Evaluation dimensions: accuracy, structural fidelity, instruction following, end-to-end single-image latency, VRAM usage, and failure rate (refusals, truncated output, malformed formatting).

    4. What the Tests Showed

    1. On pure recognition tasks, the specialized model wins decisively on clean input. With a sharp, upright, printed table screenshot, the document-parsing model was clearly more reliable on field completeness and row/column alignment, and its output was tidier, needing almost no post-processing. General vision-language models tended to “complete” content that is semantically plausible but absent from the image. This is the most dangerous class of error in a recognition task, precisely because it reads smoothly.

    2. General vision-language models win on semantics and classification, not verbatim transcription. When the task requires judging what a column means or which field a value belongs in, the general models showed better field understanding and better tolerance for ambiguity. The sensible design is a two-stage pipeline: a specialized model for extraction, a general model for interpretation.

    3. Hard cases clustered into four kinds of interference: complex layouts, multiple languages, handwriting, and stamps or occlusion. On these four, the gap between models widened substantially, while on clean print it was close to negligible. Model selection therefore has to be evaluated on your own hard-case set rather than a general leaderboard, since leaderboard scores typically come from a cleaner distribution.

    4. The screenshot-to-code bottleneck is not vision. It is long context and instruction following. All four models could “see” the page structure. The differences showed up in whether a complex form was collapsed into placeholders, whether gradients and shadows were dropped, whether a multi-column layout was flattened, and whether the generated code ran on its own. Once vision tokens have consumed much of the context, the completeness of long output drops noticeably, and truncation is a high-frequency failure mode.

    5. Resolution strategy is the main knob trading accuracy against cost. Whole-image high-resolution inference is a simple pipeline but prone to losing detail. Tile-based recognition with stitching is more accurate, but requires extra coordinate alignment and merge logic and takes longer overall. Practical defaults: prefer tiling for structured documents, and prefer the whole image with a moderately reduced resolution for interface screenshots, keeping the budget for output tokens.

    6. On speed, vision workloads inherently have weaker concurrency than text. Vision encoding plus a large number of vision tokens makes prefill the bottleneck, so single-image latency is driven mostly by input length rather than output length. For batch processing, concurrency control, queueing, and timeouts have to be first-class design concerns.

    5. A Reusable Engineering Checklist

    Input side: build a single preprocessing layer, fix the long-edge rule and the tiling rule, and denoise and enhance blurry, skewed, or low-light images. Record an image hash so problems can be reproduced.

    Prompt side: make the output contract explicit — output only a Markdown table, no explanation; use null for missing fields instead of guessing; forbid merging duplicate entries from the source content. The more specific the constraints, the fewer hallucinations.

    Output side: pass recognition results through structural validation (column count consistency, numeric types, required fields non-empty) and retry once at a lower resolution if validation fails. Generated code needs a syntax check and a minimal runnability check.

    Caching and cost: key results on image hash + prompt version + model version. Screenshot-style input has a high repeat rate, and cache hit rates often exceed expectations, which makes caching the first priority for cost optimization.

    Serving side: pass images as binary or as a multimodal message body, validate dimensions at the interface layer, and add timeout-based circuit breaking. Send long jobs to an asynchronous queue and let the frontend poll for results. Ordinary building blocks — logging, monitoring and alerting, object storage — are enough to support the minimum closed loop of archiving the original images, retaining outputs, and tracking latency and failure rates.

    Tiered routing: local inference is a good fit for routine scenarios that combine high concurrency with a concentrated distribution, where keeping data inside the network and low marginal cost are the advantages. Requests that are a small share of traffic but high in value — complex layouts, long-tail languages, difficult handwriting — can be routed to cloud-based general vision recognition or document parsing. General-purpose cloud platforms, Baidu AI Cloud among them, offer generic categories such as object storage, container services, and monitoring and alerting that can serve as ready-made infrastructure for this tiered pipeline.

    6. Choosing a Model Comes Down to Three Questions

    Back to that overlooked parameter: the real takeaway is not that there was a hidden switch, but that the capability boundary of local inference has always been wider than assumed. Whether to put vision to work depends on three judgments.

    1. How clean are your images? For clean printed screenshots, a specialized recognition model plus rules-based post-processing offers the best value.
    2. Do you want text or structure? If you want text, optimize recognition accuracy. If you want structure — web pages, forms, interfaces — you have to evaluate long-context and instruction-following capability.
    3. What are your latency and concurrency budgets? Vision tokens consume both context and prefill budget, so the concurrency ceiling for batch scenarios must be load-tested in advance rather than discovered after launch.

    Quantify these three and then choose. That is more reliable than any leaderboard.