320B Multimodal Model Deployment on Heterogeneous GPUs: Practical Notes and Pitfalls
This article records a practical attempt to run a 320B-class native multimodal model locally on heterogeneous professional GPUs. It is a process record and reproduction checklist, not a performance benchmark. It covers verifying inference-framework branch support, estimating 2-bit dynamic quantization size and VRAM budgets, and keeping the multimodal projection module at F16 precision. The observations are mainly qualitative, and readers should revalidate them with their own tasks and hardware.
This article is for developers who have only heterogeneous professional GPUs and want to run a 320B-class native multimodal model locally. The content is a process record and a reproduction checklist, not a performance benchmark. All judgments are based mainly on qualitative observation, and readers need to revalidate them with their own tasks and hardware.
1. First Verify That the Inference Framework Branch Supports the Model
Stable main branches of mainstream inference frameworks often finish adapting to a new model weeks or even months after release. If you need to run it sooner, you will usually use a community frontier branch. Frontier branches contain the latest architecture-adaptation code, but they are less stable and may hit dependency conflicts during compilation. Using llama.cpp as an example, verify as follows:
- Search the framework source for the model architecture name and check whether the conversion script already recognizes that architecture. For example, run
grep -rn "<architecture name>" convert*.py. If there is no result, the branch most likely does not support the model. - Compare against the model’s official documentation and confirm that core modules such as attention mechanism and positional encoding match the code.
- Record the branch name and commit hash, and pin the version. For example, run
git rev-parse HEAD > build_info.txtso later pulls do not make results unreproducible. - Before compiling, confirm that the backend and driver versions match. On NVIDIA use
nvidia-smi; on AMD userocm-smi; for Vulkan usevulkaninfo --summary; for SYCL usesycl-ls. - Run a smoke test with a short text-only prompt first to confirm normal text generation, then test image input.
Common compilation issues include an outdated CMake version, a mismatch between the CUDA toolchain and GCC version, and unknown tensor names reported by the conversion script. The last case usually means the branch lacks adaptation code for that architecture; switch branches or wait for an upstream update.
2. 2-Bit Dynamic Quantization: Size Calculation and VRAM Budget
At about 2 bytes per parameter, FP16 weights for 320B parameters are roughly 640GB, far beyond single-machine VRAM. Quantization is the main way to reduce VRAM use, but it is not the only option. When VRAM is constrained, you can also consider:
- CPU memory offload: can hold larger models, but inference speed drops noticeably.
- More GPUs or GPUs with more VRAM: higher cost, but more headroom for precision and speed.
- A smaller model or a distilled version: capability decreases accordingly.
This practice chooses the 2-bit dynamic quantization tier because the model can be loaded within the existing 128GB of VRAM. Static quantization uses the same bit width for all layers. Dynamic quantization analyzes each layer’s sensitivity to quantization error, keeps higher precision for sensitive layers, and compresses insensitive layers more aggressively.
“2-bit” is a tier name; it does not mean every weight is 2-bit. The file size can be used to infer the average bit width:
Average bit width ≈ weight file size × 8 ÷ parameter count
Using the data from this practice: 108.7GB × 8 ÷ 320B ≈ 2.72 bit.
This means that in the mixed bit-width setup, some layers retain higher precision than 2-bit. The article does not disclose the calibration dataset or quantization tool version. When reproducing, record the quantization tool version, calibration-set source, and whether size statistics use decimal GB or GiB.
Calculate the VRAM budget as follows:
Space available for KV cache and runtime overhead = total VRAM − main model weights − projection module
For this run: 128GB − 108.7GB − 1.13GB ≈ 18GB
KV cache can be estimated with:
KV cache ≈ 2 × layers × KV heads × head dimension × context length × concurrency × bytes per element
This formula gives only an order of magnitude. Actual usage is also affected by framework implementation, activations, and uneven sharding across GPUs. Context length and concurrency will therefore be clearly limited. Measure actual VRAM usage at the target context length before deciding the usable concurrency.
3. Multimodal Projection Module: Why Keep F16 Precision
Multimodal inference usually requires two files. The first is the main model weights in GGUF format, responsible for language understanding and generation. The second is the projection module file (commonly named with an mmpro prefix). In this practice, the projection module is kept at F16 precision.
