Deploying Multimodal LLMs on Heterogeneous Hardware: Quantization and VRAM Practices

    Learn how to deploy native multimodal large models on your own hardware with heterogeneous GPUs. This guide covers choosing the right inference framework branch, dynamic 2-bit quantization, pairing the main model with the mmproj file, planning VRAM across four 32GB cards, troubleshooting OOM errors, and distributing models at scale.

    Native multimodal large language models can understand text, images, and video at the same time. Concerns over data privacy, long-term inference costs, and dependence on a single hardware ecosystem are driving more teams to deploy these models on their own machines. However, inference support for newly released models often lags behind, and VRAM is usually tight. This article walks through the issues you need to verify, in deployment order.

    1. How Do You Choose the Right Inference Framework Branch?

    Take llama.cpp, a lightweight C++ inference framework, as an example. It supports multiple compute backends and can be compiled for accelerators from different vendors. For a newly released multimodal model, the stable branch often has not caught up, so you need to switch to a development branch that includes the new features. Development branches can introduce build errors or runtime exceptions, so some debugging ability is required.

    Before choosing a branch, verify the following items one by one:

    Check item How to verify
    Support for the multimodal projector file (mmproj) Read the release notes and run inference with a test image
    Support for the quantization format you plan to use Load the model and watch for errors
    The backend for your target accelerator compiles Build following the official build docs and record the full command
    Multi-GPU splitting works Check options such as split-mode with —help
    Branch and commit ID Record the commit hash for reproducibility

    When you hit issues, record the build parameters and dependency versions. These records are the foundation for pinning versions and stabilizing the deployment later.

    2. How Small Can Dynamic 2-Bit Quantization Make the Model?

    Quantization converts model weights from high precision to low-bit representations. Traditional quantization applies a uniform bit width to all layers. Dynamic quantization first analyzes how sensitive each layer is to precision, then adaptively adjusts on top of a 2-bit baseline: critical layers keep higher precision, while redundant layers are compressed further.

    The figures cited in this article are: original weights of several hundred GB, reduced to about 108GB after dynamic 2-bit quantization. These numbers come from a specific model and a specific tool; other versions will differ. Before deploying, confirm three things: the parameter count and precision of the original model, the calibration data used for quantization, and whether the file size includes the vision encoder.

    Quality validation is also required after quantization. Prepare a fixed set of text-only questions and image-text questions, run them before and after quantization, and compare answer accuracy. File size alone tells you nothing about whether the model’s capabilities were preserved.

    3. How Do the Main Model and the Vision Projector Work Together?

    A full deployment usually requires two files. The main model file handles language understanding, reasoning, and text generation. The multimodal projector file, typically in FP16 format at about 1.13GB, encodes images or video into visual embedding vectors that the main model can consume. Both files must be loaded; neither is optional.

    The two files must come from the same model version. When versions mismatch, loading typically fails, or the model gives answers unrelated to the image content. You can swap the projector file to adjust image resolution or visual processing, but you must re-validate after doing so.

    4. Is 4 × 32GB of VRAM Enough?

    Four 32GB accelerators provide 128GB of total VRAM, which fits roughly 110GB of weights. But weights are only part of the picture. VRAM must also hold the KV cache, intermediate activations, multimodal inputs, cross-GPU communication buffers, and fragmentation overhead. Here is a rough budget—the values are estimates and should be confirmed by measurement:

    Item Estimated size Notes
    Main model weights ~108GB Based on actual file size
    Multimodal projector file ~1.13GB FP16 format
    Total weights ~110GB Sum of the two
    Total VRAM 128GB 4 × 32GB
    Remaining headroom ~18GB Must cover the dynamic costs below
    KV cache Grows with context length Longer context means more usage
    Activations and multimodal inputs Grow with image count and resolution More images means more usage
    Communication buffers and fragmentation Hard to estimate precisely Requires measurement

    The remaining ~18GB must cover all dynamic costs, leaving only a few GB of headroom per GPU. Therefore, a model that loads successfully is not necessarily one that can run inference stably.

    With llama.cpp, a startup command looks like this (check the —help output of your version for exact parameter names):

    1. llama-server -m main-model.gguf --mmproj mmproj-f16.gguf -ngl 999 --split-mode layer --tensor-split 1,1,1,1 -c 8192

    Here, -c controls context length and directly determines KV cache usage. —split-mode layer splits by layer and typically places lower demands on cross-GPU communication. —tensor-split sets the load ratio across GPUs; even splitting across four cards is written as 1,1,1,1.

    5. What Order Should You Follow When Troubleshooting OOM?

    1. Recheck the budget table and confirm the gap between total weights and total VRAM.
    2. After startup, use tools like nvidia-smi to observe VRAM usage on each card. For non-NVIDIA accelerators, use the monitoring tool provided by the respective vendor.
    3. If one card fills up first, check whether the —tensor-split ratios are even.
    4. Reduce the -c value. This is the most direct fix.
    5. Lower image resolution, or reduce the number of images per request.
    6. Confirm that no other process is occupying the same VRAM.
    7. Confirm that the main model file and the projector file belong to the same version.

    6. How Can Cloud Services Help with Multi-Node Delivery?

    When many nodes are involved, distributing model files of roughly 110GB is itself a challenge. You can place the quantized files in object