Multimodal Model Selection for Edge and Cloud: Analyzing MoE Memory and Distillation
This article analyzes key factors in selecting multimodal models for edge and cloud deployment. It explains why actual long context lengths fall short of vendor claims due to KV Cache and multimodal token limits. It also explores why MoE models may not offer low latency in low-concurrency scenarios, addresses the parameter gap affecting mid-range GPU users, and evaluates the reality of cross-generation benchmark gains and distillation techniques for small models.
Key Takeaways
Selecting from this batch of multimodal models comes down to three things. Nominal long-context limits must be recalculated based on your VRAM budget. The low-latency advantage of MoE models primarily appears in high-concurrency cloud scenarios. The capabilities of edge-side small models must be validated using your own task data.
1. Why You Can’t Fully Utilize Long Contexts
Vendors advertise context windows up to 256K, but in single-card or VRAM-constrained environments, the actual usable length is often around 20K. Two main factors cause this gap.
First is the KV Cache. During inference, the model stores Keys and Values for each token at every layer. The VRAM footprint can be estimated using this approximation:
KV Cache bytes ≈ 2 × number of layers × number of KV heads × head dimension × bytes per element × sequence length × batch size
This formula shows that the KV Cache grows almost linearly with sequence length. The attention computation itself grows quadratically with sequence length, but this affects computation time rather than directly increasing VRAM usage. These two aspects must be considered separately.
Second is the token consumption of multimodal inputs. A high-resolution image or a long audio clip is encoded into a large number of visual or audio tokens. Like text, these tokens consume context window space and KV Cache. Once a user uploads a few large images, the space left for text rapidly diminishes.
During actual deployment, follow these steps. First, determine the token budget for a single request, including system prompts, multimodal inputs, and conversation history. Then, use the formula above to calculate the KV Cache, add the VRAM required for weights and activations, and assess whether a single card can handle the target concurrency. Cloud deployments can use paged management technologies like PagedAttention to reduce VRAM fragmentation, though it does not reduce the total KV Cache size.
2. Why MoE Isn’t Necessarily Faster Under Low Concurrency
MoE models have a large total parameter count but only activate a small number of experts (top-k) per token. Therefore, the single-step computation is much smaller than that of a Dense model with the same total parameter count. In scenarios with large batches and abundant compute, this advantage is clear because the GPU can merge computations from multiple requests and fully utilize its compute power.
In low-concurrency scenarios, the situation differs for three main reasons.
First, inference is typically memory-bandwidth bound. With small batches, the computation per step is minimal, and the GPU spends most of its time reading weights from VRAM. The arithmetic intensity is low, and the utilization of compute units is also low.
Second, routing and memory access patterns are irregular. The routing network must first select experts for each token. Different tokens select different experts, and the weights are scattered across VRAM. This makes continuous memory access difficult and results in a low cache hit rate.
Third, multi-card deployment incurs communication overhead. When experts are distributed across multiple cards, token dispatching and result aggregation must occur at every layer. With small batches, this communication is hard to mask with computation, leading to a noticeable increase in end-to-end latency.
Additionally, all expert weights of an MoE model must reside in VRAM, meaning its primary barrier is capacity. While a single token only uses a few experts, a batch of multiple requests will activate many experts, making the actual read volume approach the total number of experts. When selecting a model, consider both the total parameter count (which dictates VRAM capacity) and the activated parameter count (which dictates single-step computation).
3. The Parameter Gap: The Plight of Mid-Range GPU Users
Public information indicates that among this batch of new models, there is no intermediate size between an edge-side model with approximately 4.5 billion effective parameters and a cloud-side MoE model with approximately 26 billion total parameters. The previous generation’s roughly 12 billion parameter Dense model is also no longer available. This change directly impacts mid-range GPU users.
Let’s do a rough estimate based on weight VRAM (excluding KV Cache and runtime overhead): each parameter takes about 1 byte in INT8 and 0.5 bytes in INT4.
- 4.5 billion parameters: ~4.5GB in INT8, ~2.3GB in INT4.
- 12 billion parameters (previous generation Dense): ~12GB in INT8, ~6GB in INT4.
- 26 billion total parameters MoE: ~26GB in INT8, ~13GB in INT4.
Based on this rough calculation, the 4.5B model can run locally on most consumer-grade GPUs. The 26B MoE requires substantial VRAM even in INT4, typically exceeding the capacity of a single mid-range card.
The MoE model activates about 3.8 billion parameters, making its single-step computation comparable to a 4B-level model. This suggests it approaches a large model in terms of VRAM capacity while resembling a small model in compute. This might be one reason manufacturers use MoE to cover intermediate size requirements. However, this assumption needs empirical testing. Before deployment, load the model using the target quantization format and record peak VRAM, time-to-first-token (TTFT), and tokens-per-second under both single-request and multi-request conditions.
4. Distillation Potential of Small Models: How to View Cross-Generation Comparisons
Public reports claim that an edge-side model with approximately 2.3 billion effective parameters surpasses the previous generation’s 27 billion parameter model in benchmark tests. This conclusion should be treated with caution.
First, cross-generation comparisons require consistency in benchmark versions, task sets, prompt templates, decoding parameters, and quantization methods. Evaluation leaderboards may also feature targeted optimizations, where high scores do not necessarily translate to good real-world business performance. Second, the previous generation’s large model may not have been the strongest baseline of its time; the choice of comparison target will influence the conclusion.
Distillation is indeed a vital method for enhancing small model capabilities, with three common approaches:
- Logit Distillation: The student model learns the probability distribution output by the teacher model. This carries a lot of information but requires the teacher and student to align their vocabularies or output spaces.
- Feature Distillation: The student model aligns with the teacher’s intermediate representations. Suitable for cases with significant structural differences, but complex to implement.
- Data Synthesis Distillation: The teacher model generates high-quality instruction and reasoning data to train the student model. Low cost and easily scalable, but quality depends on the teacher’s data.
These methods have limitations. Distillation transfers capabilities already possessed by the teacher and cannot magically expand a small model’s knowledge capacity. Cross-generation improvements cannot be entirely attributed to distillation; training data, post-training pipelines, and architectural improvements also contribute. Based solely on public information, it is impossible to isolate the specific impact of these factors.
