Local Deployment of a Hundred-Billion-Parameter Native Multimodal Model: VRAM Budgeting and Verification
This guide describes how to deploy a large open-source native multimodal model on local hardware. It explains how to estimate VRAM needs for a 320B-parameter model with 2-bit dynamic quantization, how to check compatibility with an inference framework, how to pin versions for reproducible builds, and how to load and test the multimodal projector for text, image, and video inputs. The figures come from a single deployment and must be measured again for other model versions or hardware.
Introduction
Native multimodal large language models process text, image, and video inputs in one network. Earlier approaches attached a separate vision encoder to a language model. Compared with those, native multimodal models generally show stronger cross-modal understanding. However, their large parameter counts also make local deployment harder.
Many teams rely on cloud APIs or high-end GPU clusters. Local deployment becomes necessary when data must stay inside an internal network, or when inference must be customized on heterogeneous hardware. This article uses the deployment of an open-source native multimodal model at the hundred-billion-parameter scale as an example. It covers the cross-hardware deployment path, VRAM calculation methods, and verification steps. The numbers come from one deployment. Other model versions or hardware will require new measurements.
1. Two Calculations to Make First: VRAM and Framework Compatibility
The first calculation is VRAM. Model weights must reside in GPU memory, fully or mostly, for inference speed to be acceptable. For a 320B (320 billion) parameter model loaded in FP16, each parameter takes 2 bytes. The weights alone therefore require about 640GB. That exceeds the memory limit of common single GPUs and single machines.
The second calculation is framework compatibility. Open-source inference frameworks often lag behind model releases. A new model’s attention structure, normalization method, or multimodal components may have no matching operators yet, so loading the model directly can fail. In practice, this problem is underestimated more often than memory limits. It should be assessed during project planning.
2. Selecting and Pinning an Inference Framework Branch
Many teams use C++ inference frameworks, such as llama.cpp and similar projects. These frameworks support multiple quantization formats and cover a wide range of instruction sets and acceleration backends, which makes them suitable for cross-hardware deployment.
In this deployment, the stable main branch of a mainstream C++ inference framework did not support the native multimodal model at the time of writing. The team switched to a development branch or a model adaptation branch. Development branches include newer operators and model structure implementations. They are usually less stable than the main branch, but they are necessary for running a new model.
After selecting a branch, record the following information in the deployment log so the results can be reproduced:
- Model name, release version, and weight source;
- Framework branch name and commit hash;
- Quantization configuration, including the quantization level and the bit allocation for each tensor type;
- GPU model, driver version, and the CUDA or other acceleration backend version;
- Build options, including which acceleration backend switches are enabled.
Next, install dependencies and compile according to the framework documentation. Run a smoke test first, using a small-scale version or pre-converted weights, to confirm that the model loads and generates text. Then move on to the full model.
3. VRAM Budgeting for 2-Bit Dynamic Quantization
Quantization is the main option when VRAM is insufficient. This deployment used a 2-bit quantization scheme. The approach starts from a 2-bit base. It dynamically assigns higher bit widths to tensors that are more sensitive to precision, such as attention and feed-forward network layers. This preserves basic inference ability at very low bit widths.
Start by estimating the weight size:
Weight size ≈ parameter count × average bits per parameter ÷ 8
With pure 2-bit quantization, 320B parameters require about 80GB. The weight file produced in this deployment is about 108.7GB, which implies an average of roughly 2.72 bits per parameter. The difference comes from keeping key tensors at higher precision, along with the storage overhead of quantization scales and metadata.
The hardware in this deployment has four 32GB GPUs, for 128GB of total VRAM. After subtracting the 108.7GB of weights, about 19.3GB remains. Subtracting the roughly 1.13GB multimodal projector leaves about 18GB for runtime use. This space must hold the KV cache, activations, compute buffers, and the extra overhead of splitting the model across multiple GPUs.
The KV cache is the most commonly overlooked part. Its size can be estimated with the following formula:
KV cache bytes ≈ 2 × layers × KV heads × head dimension × context length × batch size × bytes per element
Here is an example. Assume a model with 64 layers, 8 KV heads, and a head dimension of 128. The cache is stored in FP16 (2 bytes per element), and the batch size is 1.
- Context length 8192: 2 × 64 × 8 × 128 × 8192 × 1 × 2 ≈ 2.1GB
- Context length 32768: the same calculation gives about 8.6GB
These architecture parameters are only an example. They do not reflect the actual structure of the model discussed here. For real estimates, use the values in the model’s configuration file.
With an 18GB margin, a single concurrent request with an 8K context usually runs stably. When concurrency rises to 4, the KV cache for 8K contexts reaches about 8.6GB. Combined with other overhead, the remaining margin becomes tight. A 32K context with multiple concurrent requests can easily trigger out-of-memory (OOM) errors. Therefore, “the model runs on four 32GB GPUs” only shows that the model can be loaded. It does not guarantee stable service in every scenario. Before going live, run load tests at your target concurrency and longest context length, and record peak VRAM usage.
4. Loading and Verifying the Multimodal Projector
In the multimodal support of mainstream C++ inference frameworks, a model is usually split into two files: the main model weights and the multimodal projector (mmproj). The main weights handle language understanding, reasoning, and text generation, and they use the quantized format described above. The projector is typically saved in FP16, and it is about 1.13GB in this deployment. It takes image or video features output by a vision encoder. After a linear projection and feature alignment, it converts them into visual embedding vectors that the language model can read.
Whether the projector includes the vision encoder itself depends on the specific release and conversion process. Before deployment, check the release notes to confirm which components the projector contains, which input types it supports (images, video, or both), and where the input features come from. A native multimodal model is designed to process multimodal inputs in a single network. A framework may implement this differently, so the release notes and the framework implementation take precedence.
The two files must come from the same release or the same conversion process. When the versions do not match, the model often produces normal text but describes image content incorrectly. To check, record the release tag and SHA256 hash of both files, and compare them before deployment.
When loading the model, specify both the main model path and the projector path. Then confirm in the startup log that the framework has recognized both files.
Validation covers three types of test cases:
- Text: Use fixed questions, such as general knowledge questions or simple arithmetic. A test passes when the answers are correct and contain no repetition or garbled text.
- Images: Use images with known content, such as images containing clear text or objects. Check whether the description includes the key objects and text in the image.
- Video (only if the projector declares video support): Extract a fixed number of keyframes, and check whether the model can describe temporal changes, such as the order of actions.
For each type of test case, prepare at least 20 samples and record the pass rate. The business team should set the pass threshold. For example, the hit rate for key objects in images might need to be at least 90%. These numbers are only starting suggestions, not universal standards.
If validation fails, check the following:
- Text is correct but image descriptions are wrong: First confirm that the projector and main model versions match. Then check the image preprocessing size.
- The framework reports that the projector cannot be found: Check the file path and file permissions.
