A Practical Guide to Evaluating Large-Scale MoE Models for Production Deployment
This guide explains how to evaluate a large-scale Mixture-of-Experts (MoE) model with roughly 744B total parameters and 40B activated parameters before moving it to production. It clarifies why activated parameters do not equal memory requirements, outlines a tiered approach to hardware sizing from POC to production, and shows why a 1M context window is a capability rather than a default setting. You will also find guidance on interpreting scheduling parameters such as max-model-len and max-num-seqs, plus a pre-launch validation checklist covering static baselines, length profiling, load testing, stability, observability, and elasticity.
1. Why Activated Parameters Do Not Equal Memory Requirements
When evaluating a large-scale Mixture-of-Experts (MoE) model with roughly 744B total parameters and about 40B activated parameters, the most common mistake is assuming that “40B activated” means you only need to load 40B of weights. From a computation graph perspective, activated parameters determine the size of the expert subset that actually participates in matrix multiplications during a single forward pass. They affect compute consumption and memory access intensity. From a serving process perspective, however, the inference engine must load the complete set of weights into device memory so that no page-load jitter occurs when any token is routed to any expert.
For this reason, memory planning must cover at least four parts:
- Complete weights: Even when stored in a low-precision format such as FP8, the weights for 744B parameters still occupy hundreds of gigabytes, far exceeding the capacity of a single device. This requires sharding across multiple devices using tensor parallelism or expert parallelism.
- KV Cache: Strongly correlated with context length, the number of concurrent sequences, the number of layers, and the number of attention heads, this is the main variable in long-context scenarios.
- Runtime overhead: Including communication buffers, temporary activations, and the framework’s own memory pool and fragmentation.
- Concurrency headroom: Continuous batching dynamically requests memory, so a safety margin must be reserved to avoid preemption or fallback under high load.
The conclusion is that activated parameters only determine “how fast you compute,” while complete weights and the KV Cache determine “whether it fits.” Any deployment plan should first perform a static memory baseline measurement after weight loading, then layer dynamic workloads on top.
2. Resource Tier Assessment: From POC to Production
On general-purpose hardware tiers, the following step-by-step assessment can be used as a reference (for resource tier guidance only, not a specification commitment for any particular product):
- Single node with 8 devices at the 141GB memory level: A starting reference for FP8 deployment, suitable for small-to-medium POC and internal trials.
- Single node with 8 devices at the 180GB memory level: Better suited for evaluating full capabilities near the million-token context level first.
- Low-bit quantization (such as 4-bit): Can significantly lower the POC barrier, allowing validation to start on fewer devices, but accuracy loss and throughput changes must be evaluated at the same time.
It is important to emphasize that all of the above are “resource tier assessments” that answer “roughly what class of machine is needed,” not “whether it can go live.” Whether it can go live depends on the real task distribution, latency targets, stability requirements, and operational capability.
3. Million-Level Context Is Not a “Default Available Window”
A model supporting 1M context and an inference service opening a 1M window by default are two completely different things. The real cost of long context is concentrated in the KV Cache: the longer the input, the longer the output, and the higher the concurrency, the larger the cache usage. A single request approaching 1M, or multiple 128K requests stacked together, can simultaneously overwhelm both memory and the scheduling queue.
A more robust approach is to first profile the request length distribution, then design tiered serving:
- Most tasks within 32K: Prioritize building retrieval-augmented generation (RAG) and a shared service pool, using high concurrency to spread costs.
- 32K to 128K: Set quotas and queuing policies to prevent individual long requests from crowding out public resources.
- Above 128K: Split out an independent long-context service group to isolate resources and failure domains.
- Near 1M: Use a dedicated low-concurrency queue with stricter admission and timeout controls.
An illustrative tiered routing logic can be expressed as:
if length <= 32K: route -> shared_poolelif length <= 128K: route -> pooled_with_quotaelif length <= 512K: route -> long_context_groupelse: route -> dedicated_low_concurrency_queue
This “tiering by length” architecture is more stable than opening the full 1M by default, and it makes capacity planning and cost accounting easier.
4. Understanding Scheduling Parameters Correctly
Two frequently misunderstood parameters need clarification:
max-model-len: Controls the maximum context window the service allows. It is a capability upper bound, not a resource commitment.max-num-seqs: Controls the number of active sequences in a single scheduling step. It is the online batching width, not the number of online users on the business side.
Business concurrency is also affected by request length, output length, queue depth, rate-limiting policies, and continuous batching strategy. An empirical tuning direction is to lower max-num-seqs when the proportion of long requests is high, in exchange for stable per-request latency; when the proportion of short requests is high and memory has headroom, gradually increase it to improve overall throughput. Tuning must be tied to a real task profile; there is no “best parameter” that exists independently of the task.
5. Pre-Launch Validation Checklist
- Static baseline: Record memory usage after weight loading and the remaining headroom per device.
- Length profile: Sample the input/output length percentiles of real requests.
- Load test matrix: Run concurrency gradient load tests bucketed by length, observing latency percentiles and preemption rates.
- Stability: Verify timeout, retry, and fallback paths under long queues.
- Observability: Connect to general logging services and monitoring alerts, setting thresholds for KV Cache levels and queue duration.
- Elasticity strategy: Combine the container platform’s elastic scaling with object storage session archiving to reduce the cost of long-task failures.
6. Conclusion
Evaluating a large-scale MoE model for launch is essentially a three-way alignment of “resource tier + task profile + scheduling strategy.” By viewing activated parameters and weight loading separately, context capability and the default window separately, and scheduling parameters and online user counts separately, you can avoid most resource misjudgments during the launch phase. If an enterprise wants to run a deployment validation on Baidu AI Cloud, it can build a tiered serving and load testing system based on general capabilities such as a container platform, monitoring and alerting, and object storage, driving launch decisions with data rather than parameter guesses.
