Deploying Large-Scale MoE Models: A Practical Guide to Capacity and Serving Evaluation

    This guide explains how to evaluate deployment requirements for large-scale Mixture-of-Experts (MoE) models. It clarifies why low activated parameter counts do not reduce VRAM needs, breaks down the four components of memory usage, and outlines resource tiers from POC to production. You will learn how KV Cache drives long-context costs, how to size capacity through load testing, and how to design length-based serving tiers with a pre-launch checklist.

    1. First, a common misconception: fewer activated parameters does not mean lower VRAM requirements

    Large-scale Mixture-of-Experts (MoE) architectures are now one of the mainstream directions for large models. Take a model with roughly 744B total parameters and about 40B activated parameters as an example. Many people see “40B activated” at first glance and assume VRAM planning only needs to account for 40B worth of weights. This is the first and most common mistake in deployment evaluation.

    The reason is that activated parameters describe the scale of experts routed to in a single forward pass. They determine compute intensity and memory access intensity. However, weights must reside in VRAM in their complete form, because the Router may assign tokens to any expert at every step. You cannot predict which experts the next batch will hit, so you cannot load only a subset of the weights.

    Therefore, actual VRAM usage consists of at least four parts:

    1. Complete weights: all expert parameters, converted by precision (FP16 is about 2 bytes per parameter, FP8 about 1 byte per parameter, 4-bit quantization about 0.5 bytes per parameter plus dequantization overhead).
    2. KV Cache: proportional to sequence length, concurrency, number of layers, and attention head dimension. It is the main variable in long-context scenarios.
    3. Runtime overhead: framework context, communication buffers, temporary operator tensors, and VRAM fragmentation.
    4. Concurrency and batching headroom: Continuous Batching dynamically expands VRAM usage, so you must reserve a watermark.

    A practical estimation order for self-checking is: first calculate the weight lower bound, then add the KV Cache peak, and finally multiply by a safety factor (empirically 1.2–1.4). Only then do you get a meaningful capacity baseline.

    2. Resource tier assessment: a ladder from validation to production

    Under general-purpose hardware conditions, you can do an initial screening by “resource tier” rather than “exact configuration”:

    • Single-node FP8 deployment reference: 8 accelerators in the 141GB class are a common starting tier, suitable for functional validation and moderate concurrency.
    • Full million-level context evaluation: prioritize accelerators in the 180GB-per-card class with higher bandwidth and larger VRAM, to avoid frequent swapping under long sequences.
    • Quantization lowers the POC barrier: 4-bit quantization can significantly reduce VRAM requirements, letting the validation phase run the pipeline with fewer cards, but you must also evaluate accuracy loss and throughput changes.

    It must be emphasized that all of the above are resource tier assessments. They answer “roughly what class of machine is needed,” not “can it go live.” Whether it can go live depends on real task distribution and production constraints.

    3. Million-token context is not “free to use”: the real cost is KV Cache

    “Supports 1M context” is the model’s capability ceiling, not a default serving window. Opening the ceiling as the default value is a typical starting point for long-context service collapse.

    KV Cache growth is approximately linear with sequence length and stacks with concurrency. A single request close to 1M and dozens of 128K requests may exert the same or even worse pressure on VRAM and scheduling queues—the latter also brings more frequent preemption and recomputation.

    An illustrative capacity calculation logic (pseudocode, expressing relationships only, not representing any specific product parameters):

    1. # Single-request KV Cache estimation (order-of-magnitude illustration)
    2. bytes_per_token = 2 * num_layers * num_kv_heads * head_dim
    3. kv_cache = seq_len * bytes_per_token # single request
    4. peak = kv_cache * concurrency * batch_factor # peak
    5. required = (weights_bytes + peak) * 1.25 # safety factor

    A more practical engineering approach is to reverse-engineer through load testing: fix input/output length combinations, gradually increase concurrency, and observe the inflection points of first-token latency (TTFT), per-token latency (TPOT), and VRAM watermark. Take 70% before the inflection point as the committable capacity.

    4. Serving strategy tiered by request length

    A more stable approach than “opening 1M by default” is to first profile the real request length distribution, then govern it in tiers:

    • Mostly within 32K: build a shared service pool, combined with retrieval-augmented generation (RAG) and cache reuse, pursuing high throughput and low cost.
    • 32K–128K: set quotas and queuing mechanisms, allocating capacity by tenant/business line to avoid a single caller monopolizing resources.
    • Above 128K: split into an independent long-context service group, using separate model replicas and scheduling policies to prevent long requests from blocking short ones.
    • Close to 1M: low-concurrency dedicated queues, made asynchronous when necessary, with clear SLAs and timeout policies.

    Supporting engineering measures include: tiered timeouts and retries, priority queues, prefix cache reuse, and request length admission checks (rejecting over-limit requests directly at the gateway layer rather than dragging down the backend).

    5. Pre-launch checklist

    1. Define the length distribution: use real traffic sampling to obtain P50/P95/P99 input and output lengths.
    2. Define concurrency targets: distinguish average concurrency from peak concurrency, and calculate VRAM for each.
    3. Define the precision scheme: run accuracy regression and throughput baselines for both FP8 and quantized versions.
    4. Define the fallback path: how to fall back to RAG or truncation strategies when long context is unavailable.
    5. Define observability: integrate general logging services and monitoring alerts, setting thresholds for VRAM watermark, queue length, and TTFT/TPOT.

    6. Conclusion

    Evaluating the deployment of large-scale MoE models is essentially translating capability ceilings into resource and scheduling constraints. Activated parameters only affect compute; complete weights and KV Cache determine VRAM. Million-token context is a capability statement; tiered serving is the production solution. When deploying on platforms such as Baidu AI Cloud, first use resource tiers for initial screening, then use real length distribution and load-testing inflection points to set capacity, and finally use tiered queues and fallback strategies to ensure stability. This is a reproducible evaluation path.