MoE Multimodal Models: Sparse Activation, Memory Estimation, and Deployment
Large language models and multimodal models are moving into enterprise workloads quickly, but growing parameter counts drive up inference costs. This article uses a publicly documented sparse MoE multimodal model as an example to explain how MoE decouples total parameters from per-token compute, how to estimate GPU memory for weights and KV cache, how to validate multimodal capabilities with your own data, and what to consider in multi-GPU deployment.
Large language models and multimodal large models are rapidly entering enterprise workloads, but growing parameter counts bring high inference costs. The Mixture of Experts (MoE) architecture is one of the mainstream approaches to this problem. It allows a model to have a very large total parameter count while using only a small fraction of those parameters for each computation. Using a sparse MoE multimodal model described in publicly available materials as an example, this article discusses its structure, memory requirements, capability validation methods, and deployment approach. All parameters cited here come from the original materials; always refer to the publisher’s official model card and configuration files before production use.
1. How MoE Supports Large Parameter Counts with Small Compute
In a traditional dense model, every token passes through the same feed-forward network in each Transformer layer. MoE replaces that feed-forward network with multiple parallel expert networks, and a gating network (router) selects a few experts for each token. The selected experts participate in computation while the rest stay idle. This decouples the model’s total parameter count from the number of parameters any single token actually traverses.
Take the model referenced in the original materials as an example: it has roughly 25.2B total parameters, with about 3.8B activated per token. Its expert configuration is “1 shared expert plus 128 routable experts, with 8 activated per token.” The shared expert participates in computation for every token and handles general-purpose base transformations. Routable experts are selected by the gating network based on input content, so different tokens take different expert combinations. Note that the 3.8B activated parameters also include non-expert components such as attention layers and embedding layers, so this figure should not be interpreted as a simple ratio of expert counts.
The speed advantage of this architecture depends on actual runtime conditions, and it is inaccurate to broadly claim “speed comparable to a 4B dense model.” The reason is that inference has two main bottlenecks: compute and memory bandwidth.
First, compute. The per-token forward pass is determined mainly by activated parameters, so single-token compute is close to that of a 3.8B-scale model.
Second, memory reads and writes. During decoding, the GPU reads the relevant weights from VRAM at every generation step. When the batch size is 1, each token only reads its selected experts, so the read volume is indeed small. But as the batch size grows, different requests activate different experts, expanding the range of experts that must be read. A rough estimate assuming uniformly random routing: with 128 routable experts per layer and 8 selected per token, about 60% of experts are hit by at least one token at batch size 8, and nearly all experts are hit at batch size 64. Real routing is usually not uniform, so actual proportions will deviate, but the trend holds. In other words, under high concurrency, MoE’s memory-bandwidth advantage over dense models shrinks significantly.
Multi-GPU deployment adds communication overhead. When experts are distributed across GPUs, every MoE layer requires two all-to-all communication operations—one to dispatch tokens and one to collect results. The share of step time consumed by communication depends on network bandwidth and batch size, and must be measured in practice.
A more accurate statement, therefore, is: in low-concurrency interactive scenarios with small batches, MoE’s per-token compute cost approaches that of a small model; under high concurrency, the cost advantage depends on whether expert load is balanced and whether communication becomes the bottleneck.
2. Memory Estimation: Weights, KV Cache, and Concurrency
Estimate memory before deployment. VRAM consumption consists mainly of three parts: model weights, KV cache, and runtime overhead (including activations and framework buffers).
Model weight size is determined by parameter count and precision. For 25.2B parameters:
| Precision | Bytes per Parameter | Approximate Weight Footprint |
|---|---|---|
| BF16 / FP16 | 2 | ~50.4 GB |
| INT8 | 1 | ~25.2 GB |
| INT4 | 0.5 | ~12.6 GB |
These figures exclude quantization scaling factors, non-quantized layers, and runtime buffers. If the vision encoder’s parameters are not included in the 25.2B, they must be calculated separately.
KV cache size scales linearly with context length and concurrency. The standard formula is:
KV cache bytes = 2 × number of layers × number of KV heads × head dimension × bytes per element × sequence length × concurrency
This model uses sliding-window attention, so two layer types must be distinguished in the calculation. For sliding-window layers, the KV cache is capped at the window length of 1024 tokens. For global-attention layers, the KV cache grows linearly with sequence length. The original materials do not specify the number or proportion of global-attention layers; consult the layer-type list, layer count, and KV head count in the model’s configuration file.
The following worked example uses assumed parameters—these are not the model’s actual configuration. Suppose there are 6 global-attention layers, 8 KV heads, a head dimension of 128, and BF16 storage. For one 256K sequence (262,144 tokens), the KV cache would be approximately:
2 × 6 × 8 × 128 × 2 × 262144 ≈ 6.44 GB
Serving 4 such long sequences concurrently would require about 26 GB for KV cache alone, excluding weights. In practice, obtain the real configuration first, plug it into the formula, and reserve roughly 20% headroom.
3. Multimodal Capabilities: Validate Them, Don’t Just Trust the Capability List
The original materials list capabilities such as object detection and referring expression grounding, document and chart parsing, and OCR and handwriting recognition. These capabilities vary greatly under different input conditions, so test each item with your own data.
How do you test referring expression grounding? Prepare a set of images, each containing a varying number of similar objects—for example, 5 to 20 similar parts. Give instructions such as “locate the part with the red label in the bottom-left corner” and check whether the returned bounding box is correct. Metrics to record include grounding accuracy, false-positive count, and how accuracy changes as object count increases. Common failure scenarios include object occlusion, coexisting similar objects, and questions that require counting.
How do you test document and chart parsing? Select several real PDFs containing multi-column layouts, cross-page tables, footnotes, and formulas. Have the model produce structured output, such as tables or field lists in JSON format, and compare against human annotations. Chart parsing should be tested separately for reading values from line charts, recognizing axis units, and matching legends. Small font sizes, low-resolution scans, and complex merged cells are typical sources of failure.
How do you test OCR and handwriting recognition? Handwriting recognition is highly sensitive to writing style. Coverage should include different people’s handwriting, cursive strokes, corrections and strikethroughs, and lighting variations when photographing. Record character-level error rates during testing and report printed text and handwriting results separately.
How do you check input formats and limits? The original materials mention that the model supports interleaved text-and-image input, but do not specify limits for a single image…
