Local Deployment of Large Multimodal Models on Non-GPU Hardware

    This article walks through a real-world deployment of a native multimodal large model on four non-GPU accelerator cards with roughly 119GB of total VRAM. It explains a four-layer view of the inference stack, how to choose a runtime branch, backend, and parallelism strategy, how to budget VRAM with low-bit dynamic quantization, why the vision projection module is required, and how to validate text and image inputs. Readers will also get a checklist of common pitfalls and a note on when to move to cloud general-purpose compute.

    1. Background: Why Decouple LLM Inference from General-Purpose GPUs

    Native multimodal models are becoming the mainstream form: text, images, and video are encoded into a single context, so the model no longer depends on a bolt-on image recognition pipeline. These models usually have enormous parameter counts (original weights are often in the hundreds of billions), while most developers work with limited local hardware: a general-purpose GPU may not be available at all, or the total VRAM may sit right at the boundary where the setup is theoretically feasible but practically tight.

    That raises a practical question: can such a model run on accelerator hardware other than a general-purpose GPU, and run well enough to be usable? The answer is yes, but the price is extra engineering work caused by an immature ecosystem. This article uses a deployment on four cards with about 119GB of total VRAM, on non-general-purpose GPUs, as a thread to extract a transferable methodology.

    One boundary to state up front: at the time of writing, the video path of native multimodal capability is generally not yet wired up in open-source runtimes, so the validation scope here is limited to text and image inputs.

    2. Layered View of the Inference Stack: Know What Each Layer Does

    Breaking the deployment into four layers makes every later decision clearer:

    • Hardware layer: accelerator cards, VRAM capacity and bandwidth, inter-card interconnect.
    • Runtime layer: operator implementations, backend abstraction (such as a general compute backend and vendor-specific backends), parallelism strategy.
    • Format and quantization layer: the container format of model weights, quantization levels, dynamic quantization strategy.
    • Capability add-on layer: multimodal projection modules, context cache management, sampling parameters.

    A typical early-ecosystem predicament is that the model ships first and runtime support follows. So the first step is not tuning parameters, but confirming which runtime branch already supports the target model architecture.

    3. Runtime Selection: Branch, Backend, and Parallelism

    3.1 Branch Before Version Number

    Mainstream open-source inference projects usually track released models on the main branch, and new architectures often land in a bleeding-edge branch first. Practical advice:

    1. Search the project repository’s branches and commit history for the target model’s architecture identifiers to confirm whether support has been merged;
    2. If the main branch does not support it, evaluate the stability and build cost of the bleeding-edge branch;
    3. Pin the commit hash so that “it runs today” does not turn into “the build fails tomorrow.”

    Illustrative check logic (pseudocode):

    1. if main branch supports(target model architecture):
    2. use main branch
    3. else if bleeding-edge branch supports(target model architecture):
    4. pin commit + build from source
    5. else:
    6. wait, or switch to general-purpose cloud compute

    3.2 Backend Choice: General Compute Backend vs. Vendor-Specific Backend

    Non-general-purpose GPUs usually offer two paths: a vendor-specific compute backend, or a cross-platform general compute backend. The former has a higher performance ceiling but depends on drivers and operator coverage; the latter offers better compatibility and simpler builds, at the cost of some operators falling back to the CPU or taking a generic path, which lowers throughput. For a “get it running first, optimize later” stage, the general backend is usually the more stable starting point; once operator coverage is complete, switch to the vendor-specific backend for a performance comparison.

    3.3 Parallelism: Tensor Parallelism vs. Pipeline Parallelism

    Single-machine multi-card setups have two mainstream splitting approaches:

    • Tensor parallelism: weights of a single layer are split horizontally, inter-card communication is frequent, and it is sensitive to interconnect bandwidth;
    • Pipeline parallelism: layers are split vertically, communication volume is small and the implementation is simple, but pipeline bubbles exist and enough concurrent requests are needed to fill them.

    When inter-card interconnect conditions are average and the workload is mainly offline batch processing or low-concurrency validation, pipeline parallelism offers better engineering cost-effectiveness.

    4. Quantization and VRAM Budget: Turning “Theoretically Feasible” into “Actually Runnable”

    4.1 Trade-offs of Low-Bit Dynamic Quantization

    Dynamic quantization at the 2-bit level can compress hundreds of billions of parameters down to the hundreds-of-GB range, significantly lowering the local barrier. “Dynamic” means different precisions are applied to different tensors, with sensitive layers kept at higher bit widths, preserving quality as much as possible within the same bit-width level. The cost is that low bits amplify error accumulation in long-text inference, so acceptance must be based on task metrics rather than subjective impressions.

    4.2 VRAM Budget Table (Example)

    Item Usage Notes
    Main model weights ~108GB After low-bit dynamic quantization
    Vision projection module ~1.1GB Half precision
    KV cache Grows linearly with context length Estimate by max concurrency × max length
    Runtime and intermediate activations A few GB Depends on batch size and operator implementation
    Physical VRAM ~119GB Four cards combined

    Conclusion: the headroom is not generous. Actionable ways to converge include limiting maximum context, limiting concurrency, disabling unnecessary batching, and loading the vision tower on demand.

    A rough KV cache calculation:

    1. KV ≈ 2 × num layers × num KV heads × head dim × context length × concurrency × bytes per value

    5. The Multimodal Path: Why the Projection Module Is Indispensable

    Multimodal solutions in open-source runtimes usually consist of two parts: the main model weights handle language understanding and generation, while a vision projection module maps image encoding results into the main model’s embedding space. It is essentially an adapter layer connecting the vision encoder and the language model; without it, image input cannot enter the context.

    Engineering notes:

    • The projection module must strictly match the main model version; mixing them causes embedding dimension mismatches;
    • Half precision is a common default; if VRAM is tight, lower precision can be evaluated, but image Q&A metrics must be re-tested;
    • Image preprocessing resolution directly determines the number of visual tokens, which in turn amplifies KV overhead, so it should be exposed as a tunable parameter.

    6. Validation Plan: A Minimal Closed Loop for Text and Images

    For the text side, two kinds of test cases are recommended: short Q&A to validate basic usability and format adherence; long-document retrieval to validate “mid-section information recall,” which is where low-bit quantization most easily exposes problems.

    For the image side, three kinds of test cases are recommended: single-image attribute recognition, multi-image comparison, and chart/table document understanding. Acceptance metrics should include factual consistency, numeric transcription accuracy, and reasonableness of refusals.

    Illustrative invocation flow:

    1. Load main model + projection module
    2. → Text cases: short Q&A / long-document retrieval
    3. → Image cases: single image / multiple images / charts
    4. → Record peak VRAM, first-token latency, throughput

    7. Common Pitfalls Checklist

    • The main branch does not support the new architecture, and compilation fails with an unknown architecture error;
    • The quantized file does not match the runtime branch, and loading fails;
    • No KV space is reserved, causing overflow with long contexts;
    • The projection module is missing or version-mismatched, and image input is silently ignored;
    • Long-document retrieval degrades noticeably under low bits but is mistaken for a prompt problem;
    • Concurrency is insufficient under pipeline parallelism, and throughput is far below expectations.

    8. When Local Conditions Are Insufficient: Move to Cloud General-Purpose Compute

    If VRAM, operations, and tuning costs exceed the budget, a more pragmatic path is to use cloud general-purpose compute: a container platform hosts a custom runtime image, object storage holds weights and datasets, and logging and monitoring with alerting track latency and error rates. In these scenarios, Baidu AI Cloud provides general-category capabilities that can be combined as needed, without being tied to a specific hardware form.

    9. Conclusion

    Deploying a native multimodal large model on non-general-purpose GPUs is essentially a problem of an “ecosystem time gap”: model capability is already in place, while runtime support is still catching up. The reusable methodology is fixed — first confirm branch support, then choose the backend and parallelism strategy, then use a VRAM budget table to constrain context and concurrency, and finally accept quantization quality with task metrics. Once this process is established, a change in hardware form is just a parameter change rather than a fresh round of pitfalls.