An Interview Question from a Small Company: MiniMax M3 Model Deployment and Concurrency Estimation
The full problem is as follows:
MiniMax M3 is an MoE large language model with 428B total parameters, 23B activated parameters per token, 60 Transformer layers, native MSA sparse attention, native support for up to 1M context window, and KV Cache stored in BF16 precision by default. Inference reserves 10% of total VRAM for operator activation and framework system overhead.
Hardware conditions:
- GPU: 8 × NVIDIA A6000 Pro, 96GB VRAM per card, deployed with TP8 tensor parallelism;
- Network: Single node 400Gbps high-speed interconnect; VRAM is the performance bottleneck for this calculation, bandwidth does not participate in concurrency estimation.
Please answer the following questions:
- If all 428B weights are quantized to INT8, how much VRAM does the model occupy? Can the 8-card A6000 Pro cluster fully load all weights?
- For text-only inference with a 128K context window, calculate the approximate KV Cache VRAM per request under both standard dense attention and M3's native MSA sparse attention.
- Based on the above hardware, 128K context, and MSA sparse attention enabled, what is the theoretical maximum number of concurrent requests this cluster can support?
- If the context window expands from 128K to 1M, how does the per-request KV Cache usage and theoretical concurrency change? Calculate the concurrency reduction ratio and the corresponding estimated concurrency.
Full Answer Key
1. Known Conditions and Core Parameters
Given Conditions
- Model: MiniMax M3, MoE mixture-of-experts architecture, 428B total parameters, 23B activated parameters per token, 60 Transformer layers, native MSA sparse attention, KV Cache stored in BF16 precision
- Quantization: All weights quantized to INT8, 1 byte per parameter
- Hardware: 8 × NVIDIA A6000 Pro, 96GB VRAM per card, TP8 tensor parallelism
- System overhead: 10% of total VRAM reserved for system operations, operator activation, and framework scheduling
- Context baseline: 128K default, targeting 1M expansion
Supplementary Model Architecture Parameters (from official public configuration)
| Parameter | Value | Description |
|---|---|---|
| Hidden dimension (hidden_size) | 6144 | Transformer layer feature dimension |
| Number of attention query heads | 64 | Total Query attention heads |
| Number of KV heads (GQA) | 4 | Grouped query attention, only 4 Key/Value heads |
| Attention head dimension | 96 | Derived from 6144 ÷ 64 |
| BF16 bytes per element | 2 | Default KV Cache storage precision |
| INT8 bytes per element | 1 | Single parameter size after quantization |
Core Formulas
- Model weight VRAM = Total parameters × Bytes per parameter
- KV Cache VRAM per request = 2 (K matrix + V matrix) × Number of layers × Number of KV heads × Head dimension × Sequence length × Bytes per element
- Theoretical max concurrency = Available KV VRAM ÷ KV VRAM per request
Question 1: INT8 Weight VRAM Usage and 8-Card Feasibility
Calculation
- INT8 full weight VRAM usage
During MoE inference, all expert weights must reside in VRAM, so we calculate using the full 428B parameters:
Weight VRAM=428×109 parameters×1 Byte/parameter=428 GB
(Note: Industry standard decimal estimation, 1GB = 10⁹ bytes, consistent with hardware VRAM specifications; the error is within acceptable engineering tolerance.)
- Total available VRAM across 8 cards
96GB per card, total VRAM: 8×96=768 GB
After deducting 10% system overhead, effective available VRAM:
768×(1−10%)=691.2 GB
Conclusion
INT8 full weights occupy 428GB VRAM, which is less than the effective 691.2GB across 8 cards. 8 A6000 Pro cards can fully load the model, with 263.2GB remaining for KV Cache storage.
Notes
If we only considered the activated parameters per token (23B) in INT8, the usage would be only 23GB. However, MoE architecture requires loading all expert weights for sparse routing, so the full 428B parameter count must be used.
Question 2: KV Cache VRAM per Request at 128K Context (Two Scenarios)
MSA sparse attention primarily optimizes computational complexity and inference latency for long contexts; it does not change the total KV Cache storage. The core difference between the two scenarios lies in whether GQA grouped query optimization is adopted.
Scenario 1: Standard Dense Attention (Traditional MHA, No GQA)
Traditional dense Transformers use full multi-head attention, with the number of KV heads equal to the number of query heads (64), offering no storage optimization.
KV VRAM per token:
KV per token=2×60 layers×64 KV heads×96 head dim×2 bytes=1,474,560 bytes≈1.44 MB
Total KV VRAM at 128K context:
1.44 MB/token×128×103 token≈184.3 GB
Scenario 2: M3 Native Architecture (GQA + MSA Sparse Attention)
M3 uses a GQA grouped query architecture with only 4 KV heads, dramatically reducing KV Cache size. MSA handles computation acceleration while KV is still fully stored.
KV VRAM per token:
KV per token=2×60 layers×4 KV heads×96 head dim×2 bytes=92,160 bytes≈90 KB
Total KV VRAM at 128K context:
90 KB/token×128×103 token≈11.5 GB
Conclusion
- Standard dense MHA: ~184GB KV per request at 128K context — extreme VRAM pressure, a single card cannot serve a single long-context request
- M3 native GQA + MSA: ~11.5GB KV per request at 128K context — only 1/16 of the traditional architecture, the core foundation for long-context viability
Question 3: Theoretical Maximum Concurrency at 128K Context
Logic
After deducting model weight VRAM from total effective VRAM, the remaining space is entirely used for KV Cache storage. Dividing by per-request KV VRAM yields the theoretical maximum concurrency from the VRAM perspective.
Calculation
- Available VRAM for KV Cache = Effective total VRAM − Weight VRAM = 691.2−428=263.2 GB
- KV VRAM per request (M3 native, 128K) = 11.5 GB
- Theoretical max concurrency:
Concurrency=11.5263.2≈22.9
Conclusion
With MSA optimization enabled and 128K context, this cluster can theoretically support approximately 22~23 concurrent requests.
Notes
- This value is the VRAM-only limit, not accounting for computation latency, network overhead, scheduling losses, or traffic spikes. Production environments typically reserve 30%~50% safety margin, making actual usable concurrency around 11~15.
- With traditional dense MHA architecture, a single request's KV already exceeds single-card VRAM, making normal deployment impossible.
Question 4: Concurrency Changes When Context Expands to 1M
Core Principle
KV Cache VRAM is strictly linearly correlated with sequence length: if sequence length grows N times, per-request KV VRAM also grows N times. When total available KV VRAM is fixed, maximum concurrency shrinks to 1/N of the original.
Calculation
- Context length scaling factor: 128K1M=8×
- KV VRAM per request at 1M context: 11.5×8=92 GB
- Theoretical max concurrency at 1M:
Concurrency=92263.2≈2.9
- Concurrency reduction ratio: approximately 81 of the 128K scenario, an 87.5% reduction
Conclusion
- Per-request KV Cache VRAM increases by 8×, theoretical max concurrency drops to 1/8 of the original, approximately 2~3 concurrent requests.
- In production, the Prefill phase at 1M context takes significantly longer, making computation bottlenecks more prominent — actual usable concurrency will be lower than the theoretical value. MSA sparse attention can improve decoding speed by 15× or more, ensuring long-context inference viability, but does not change the VRAM-level concurrency ceiling.
Copyright
Copyright Ownership:Alan Zero
License under:Attribution 4.0 International (CC-BY-4.0)