Local Deployment of Multimodal LLMs on Non-NVIDIA Hardware

    This article walks through deploying a large multimodal model on non-NVIDIA accelerators, covering framework branch selection, dynamic low-bit quantization, loading the vision projection weights, and calculating memory and bandwidth requirements. It also lists common pitfalls and outlines a cloud-based alternative when local hardware is insufficient.

    1. Background: Why Move a Multimodal LLM to Non-NVIDIA Hardware

    A general-purpose multimodal model that recently drew widespread attention was first tested anonymously on a model aggregation platform, then spread through the community under an informal nickname. Its official form is a native multimodal model built for general scenarios. One key characteristic is that text, images, and video are encoded into the same representation space before entering the model, rather than being stitched together through a bolt-on, independent vision branch. As a result, it shows clear improvements over the previous generation on tasks such as mixed image-text reasoning and temporal video understanding.

    Most users are accustomed to calling this kind of model through the official API, but API access comes with three practical constraints: data must leave your environment, the cost of long contexts and high-frequency calls is hard to control, and offline or intranet environments cannot reach external services. Local deployment therefore becomes a hard requirement. The first hurdle in localizing the model is often not the model itself but hardware selection — whether it can only run on NVIDIA accelerator cards.

    The answer is clear: no. As long as the inference framework abstracts the operator backends cleanly, the model can run on a range of general-purpose acceleration hardware, including domestic general-purpose accelerator cards, various devices that support general compute interfaces, and even a CPU-plus-unified-memory setup. What really determines success comes down to four things: whether the framework branch has already merged support for the model architecture, whether the quantization format is compatible with the hardware, whether the multimodal projection weights are loaded correctly, and whether memory capacity and bandwidth are sufficient.

    2. Framework and Branch: First, Does It Even Recognize the Model?

    After a new model is released, there is a noticeable time lag in support across open-source inference frameworks. The mainline branch usually prioritizes stability, and new architectures often land in a cutting-edge development branch first. So the first step is not compiling but confirming whether the framework branch you intend to use already includes the model’s network definition (attention variants, positional encoding scheme, normalization placement, and so on).

    Practical recommendations:

    • Prefer the cutting-edge development branch from the official repository over a release-packaged build;
    • Before compiling, confirm that the vendor’s accelerator backend plugin version matches the framework version;
    • If you use a unified-memory or CPU backend, match thread count to memory bandwidth rather than simply increasing threads.
    1. # Illustrative only: this shows the workflow and does not point to any specific project
    2. git clone <inference-framework-repo>
    3. git checkout <development-branch>
    4. cmake -B build -DGGML_BACKEND=<your-accelerator-backend>
    5. cmake --build build --config Release -j

    One point worth stressing: the more cutting-edge the branch, the more important it is to pin the commit and record the environment. Otherwise the same weights can produce output drift across different commits.

    3. Quantization: The “Dynamic” Approach at Ultra-Low Bit Widths

    The original weights are roughly 320 billion parameters, and loading them directly at half precision is nearly infeasible in a single-machine, multi-card setup. The goal of quantization is to balance memory, bandwidth, and accuracy.

    A common industry practice is “dynamic quantization”: instead of using the same bit width for every layer, the budget is allocated according to layer importance — critical layers such as attention and embeddings keep higher precision, while high-redundancy parts like the feed-forward intermediate layers are pushed to lower bit widths. The benefit is less quality loss at the same memory footprint; the cost is increased dequantization overhead and higher demands on operator support in the inference framework.

    The naming usually carries three pieces of information: the source of the scheme, the bit tier (for example, a 2-bit tier), and a tier suffix indicating a sub-level within that scheme. When choosing, look at three things:

    1. Whether the quantization is officially supported by the framework branch rather than requiring extra patches;
    2. Whether the target hardware supports the required low-bit compute or dequantization instructions;
    3. Whether a vision projection file matching the quantized main weights is provided.

    4. The Multimodal Part: Don’t Forget the Projection Weights

    Beyond the language-only weights, a native multimodal model also needs a vision projection module that maps the vision encoder output into the language model’s embedding space. This module is usually distributed as a separate weight file, on the order of 1GB, in the same format as the main weights.

    A common failure is loading only the language weights: the model can chat but cannot understand images at all. Another is a projection file that comes from a different quantization batch than the main weights, which leads to abnormal visual output. The way to avoid both is to download from the same batch and explicitly specify the projection file path at startup.

    1. <inference-program> \
    2. -m <main-weights-file> \
    3. --mmproj <vision-projection-file> \
    4. -ngl 99 -c 8192 --host 0.0.0.0 --port 8080

    5. Memory and Bandwidth: Do the Capacity Math Before Asking Whether It Runs

    According to public descriptions, a 2-bit dynamic quantization scheme can compress 320 billion parameters to about 108.7GB. Add roughly 1.13GB for the projection file and the total is about 110GB. Four accelerator cards with 32GB of memory each can hold that in theory.

    But “fits in memory” is not the same as “runs well,” and three more calculations are required:

    • KV cache: grows linearly with context length and concurrency, and long-video understanding scenarios are especially memory-hungry;
    • Compute graph and temporary buffers: communication buffers under multi-card sharding cannot be ignored;
    • Inter-card interconnect bandwidth: low-bit quantization shifts the bottleneck from memory capacity to bandwidth and interconnect, and throughput drops noticeably if cards can only communicate over a low-speed channel.

    Capacity estimation can be expressed with the following approach:

    1. Total demand ≈ weight size + projection weights + KV cache (context × concurrency) + runtime buffers
    2. Usable per card ≈ nominal memory × 0.85 (leaving room for fragmentation and driver overhead)

    If you use multi-card tensor parallelism, you also need to confirm that the framework’s sharding strategy supports this model architecture; otherwise some cards will end up severely unbalanced in load.

    6. Common Pitfalls

    1. Branch and quantization mismatch: the quantized file was produced by a newer branch, and the older branch throws a structure error on load;
    2. Missing low-bit instructions: the hardware does not support the corresponding dequantization path and falls back to a very slow generic implementation;
    3. Context set too large: the KV cache overflows and the process is killed;
    4. Multimodal not active: the projection file is missing or the path is wrong;
    5. Versions not pinned: environment drift causes the same input to produce inconsistent output;
    6. Missing serving configuration: concurrency and batching are not enabled, so throughput is far below expectations.

    7. Cloud Alternative

    If local hardware is not up to the task, you can obtain general-purpose compute in the cloud: pull an inference service image through a container platform, distribute weights and projection files with object storage, track memory usage and latency with monitoring and alerting, and consolidate startup errors with a logging service. In these scenarios Baidu AI Cloud typically provides general-purpose compute and supporting infrastructure capabilities; refer to the official documentation for specific specifications.

    8. Summary

    Deploying a multimodal LLM on non-NVIDIA hardware comes down to four steps: pick the right framework branch, pick the right dynamic quantization tier, don’t miss the vision projection weights, and size capacity and bandwidth using “weights + KV + buffers.” Once those four are in place, the hardware vendor is no longer a limiting factor.