MoE LLM Cost Accounting: How Active Parameters, KV Cache, and Quantization Actually Drive the Bill
This article walks through a practical cost model for sparse Mixture-of-Experts (MoE) LLMs, using a recently discussed open-source model with roughly 220B total parameters and about 11.3B active parameters per token as a running example. It shows why a single metric (active parameters) cannot predict cost, how the decode stage and KV cache volume set memory-bandwidth and concurrency limits, how to estimate KV cache with one unified formula, how quantization overhead (including scale factors) must be counted, and how to validate choices with task-level A/B testing on your own workload. You will get a cost formula (C_task = T_in × P_in + T_out × P_out), a KV cache calculator, concrete sizing examples, quantization tier comparisons, and a pre-launch checklist. The examples illustrate architectural patterns only and are not tied to any specific commercial model; always verify against the official release page, config.json, or license file.
The Core Point: Task Cost Is a Product, Not a Single Price
A recently discussed open-source MoE model has roughly 220B total parameters and about 11.3B active parameters per token. That combination raises three questions almost every time: how do you estimate MoE VRAM, how do you choose a quantization tier, and how do you size the KV cache for long context? None of them can be answered by looking at the active parameter count alone.
Sparse MoE decouples two things that are usually conflated: model capacity and per-token compute. Total parameters determine knowledge capacity. Active parameters per token determine compute overhead. What actually determines your bill is the total cost of the task, not any single component metric.
The examples in this article are used only to explain architectural patterns and are not tied to any specific commercial model. If you need verifiable configuration, check the official release page, config.json, or the license file.
Decompose the cost
Task cost breaks down as:
C_task = T_in × P_in + T_out × P_out
- Per-token cost
Pis driven jointly by active parameters and KV cache. - Token count
Tis driven by token efficiency.
The three factors answer different questions:
| Factor | What it determines |
|---|---|
| Active parameters | How heavy the compute is |
| KV cache | Whether it fits in VRAM, and how much concurrency you get |
| Token efficiency | How many turns it takes, and whether you have to redo work |
The bottleneck depends on the workload
- Short input, short output: bottleneck is compute and latency; dominant factor is active parameters.
- Long documents or code repository understanding: bottleneck is VRAM capacity; dominant factor is KV cache size.
- Multi-turn agentic coding: bottleneck is token efficiency and context reuse; dominant factor is task token count.
- Multimodal visual understanding: add vision encoding, image tokens, and the vision projection file on top.
The practical consequence: a model with more active parameters is not necessarily more expensive.
In the example, ~11.3B active versus ~6.7B active is about a 1.7× ratio. Compared against roughly 4.87B of pure-text compute, it is about 2.3×. You cannot describe this generically as “double” or “twice” — the measurement basis has to be stated explicitly, and the two numbers must be measured on the same basis.
Decode Is the Bottleneck: Active Parameters Do Not Decide Cost Alone
LLM inference usually has two phases:
- Prefill processes all input tokens at once and can be parallelized. It is compute-bound.
- Decode generates tokens one at a time. Every step reads the model weights. Compute density is low, so it is memory-bandwidth-bound.
During decode, the weight read per token is roughly:
bytes_read_per_token ≈ active_params × bits_per_weight
With 11.3B active parameters and 8-bit weights, each generated token requires reading about 11.3GB of data. On an accelerator with roughly 8TB/s of bandwidth, the theoretical ceiling is about 700 tokens per second. That ceiling does not yet account for attention, expert routing, sampling, and framework overhead.
Why small KV matters more than “fewer parameters”
The larger the KV cache, the more historical context must be read for every generated token. When two models have comparable active compute, halving the KV cache visibly reduces data movement in the decode phase.
That is the real value of a small-KV design: it is not just “fewer parameters.” It reduces memory-bandwidth contention and improves long-context decode efficiency.
Long context also carries a quadratic cost
Without sparse attention, attention compute and memory traffic grow roughly with the square of sequence length. Going from 8K to 256K is about a 32× increase in length, which can amplify attention overhead by roughly 1000×. Meanwhile, the KV cache grows linearly, and contexts beyond 64K consume VRAM quickly.
Models with larger KV may trigger truncation, summarization, or sliding windows earlier. Once information is lost, later turns may produce wrong answers and require rework — and the cost gets amplified further.
Architecture View: Trade-offs Between Two Sparse MoE Designs
In common sparse MoE architectures, example model A and example model B can stand in for two design routes.
Both may use 12 layers of sparse attention, 512 routed experts, 4 residual streams, an n-gram lookup table that can stay resident in host memory, and support for fairly long context.
The real difference is in the activation mix
If example model B’s 6.7B active parameters include about 1.83B for the output head, its pure-text compute is about 4.87B — a “light activation” route. Per-token compute is small and short-context interaction is faster, but the effective compute carried per token is limited.
Example model A’s ~11.3B active parameters are closer to a “medium activation” route. It trades more active compute for stronger per-token reasoning, which on tasks like long-horizon coding may reduce errors and retries.
Where knowledge is stored is also an architectural choice
| Storage location | Capacity cost | VRAM / memory | Access latency |
|---|---|---|---|
| Dense parameters | High | Occupies VRAM | Low |
| Host-resident lookup table | Low | Occupies host RAM | Higher (crosses the bus) |
| Active parameters | Medium | Uses GPU compute | Low |
The small-KV logic chain
The argument for a small-KV design can be written as a chain: medium active parameters raise per-token capability and reduce the number of tokens a long task needs; fewer layers and a smaller KV lower per-token data movement and increase concurrency at the same VRAM budget, which pushes unit price down.
One caveat: at 12 layers versus a common 80-layer model, the KV advantage is typically several-fold — not the exaggerated order-of-magnitude difference that sometimes gets claimed.
Estimating MoE VRAM: One Unified KV Cache Formula
KV cache usage can be written as:
KV_bytes ≈ 2 × L × H_kv × d_head × b × S × C
2accounts for the K and V copiesL= number of layersH_kv= number of KV headsd_head= per-head dimensionb= bytes per value (2 for BF16, 1 for FP8)S= sequence lengthC= concurrency
With 12 layers, 8 KV heads, head dimension 128, and BF16 storage, each token costs about 48KB of KV.
| Context length | KV per request |
|---|---|
| 8K | ~384MB |
| 262K | ~12GB |
| 1M | ~48GB |
With 80GB per card and 40GB taken by the main weights, a 262K context supports roughly 3 concurrent requests. If the KV is compressed to about 6.7GB, concurrency rises to roughly 5 requests — about 67% more throughput.
These numbers are illustrative. Real values should be taken from config.json: layer count, KV head count, head dimension, and quantization scheme.
If the architecture uses low-rank KV compression, replace “head count × head dimension” in the formula with the compression dimension. In that case, fewer layers and a smaller compression dimension stack their benefits, but dequantization adds compute overhead.
Choosing MoE Quantization: Account for the Scale Factors
An FP8 release does not mean every parameter is squeezed to 8 bits. The lookup tables may still be stored in BF16, because they are dominated by random access, and the latency and precision loss from low-bit dequantization can cancel out the compression benefit.
What actually lands on the GPU — the main body — needs to be counted separately: weights, quantization scale factors, and runtime buffers.
Scale factor overhead must be included
If every 128 weights share one FP32 scale, each parameter carries an extra 4 ÷ 128 = 0.03125 bytes. For roughly 160B parameters, that is about 5GB of scale overhead — not 0.5GB.
Under strict calculation, average storage is about 1.03125 bytes per parameter.
If a release package lists 156.9B non-lookup parameters and a 160.3GB main body, the average works out to about 1.02 bytes per parameter. That suggests the actual implementation may use tighter grouping, merged storage, or scale compression. Still, theoretical estimates should be checked against 0.03125 bytes per parameter.
Version selection reference
| Version | Size | Typical use |
|---|---|---|
| Instruction-tuned BF16 | ~440.5GB | Evaluation and further fine-tuning |
| FP8 | ~287.1GB | Production inference (check both the VRAM and host-memory ledger) |
| Base model | ~219.41B params (excluding the ~0.846B draft head) | Secondary development |
| GGUF IQ2_AH | ~135.0GB (de-tabled body ~71.6GB) | Extreme VRAM limits — precision must be tested |
| GGUF Q3_K | ~155.4GB | Trade-off between precision and size |
| GGUF Q4_K_M | ~168.4GB (de-tabled body ~105.0GB) | Local multi-GPU deployment |
| SPARK-4Bit and similar | — | Specific hardware targets |
“It fits” is not a selection criterion
Measure three metrics on your target task set: precision loss, throughput, and time to first token.
- For local, private deployment where precision is sensitive, validate Q4_K_M first.
- For cloud on-demand use, a managed service is usually the simpler choice — but pay attention to rate limits, authentication, logging, monitoring, and how cache billing works.
Multimodal inference also needs the vision projection file, roughly 1.04GB. Image tokens consume context budget, so you cannot estimate purely on text tokens.
From Benchmark Scores to Real Workloads
Leaderboards are a reference point, not a substitute for validating against your own business. Common pitfalls:
- Evaluation distribution does not match business distribution.
- Some benchmarks are near saturation, so small score gaps can be wiped out by tool-calling errors.
- Different quantization precision, speculative decoding, and context settings produce results that are not measured on the same basis.
High call volume does not mean good cost-performance either — long-context and multimodal features naturally produce more tokens.
Use shadow traffic for A/B testing
Build a regression set of 100–500 real tasks; if the decision is sensitive, expand to 500–1000. Fix the same set of inputs, run both models with identical sampling parameters, and record:
- Input tokens and output tokens
- Latency
- Tool-call turns
- First-attempt success rate
- Retry count
- Cache hits
Bill each task separately for input, cache hits, and output.
Localize the difference
Determine whether the gap comes from a longer first response or from more rework turns; from retries triggered by KV truncation, or from errors introduced by context compression.
Cache hits are easy to overlook
Long-context and multi-turn agentic workloads usually share a system prompt, a code repository, or a knowledge base prefix. On mainstream services, the cached-prefix portion of input may be billed at a rate far below normal input. Cache hit rate can be defined as cached-read tokens divided by total input tokens. During evaluation, confirm that your KV representation, prefix consistency requirements, and the platform’s cache implementation are compatible.
Before going live, also check
- Ecosystem support window for the architecture.
- Speculative decoding acceptance rate.
- Host memory bandwidth.
- Multimodal budget.
New architectures are often not fully supported by inference frameworks at launch. Whether to enable speculative decoding depends on the real acceptance rate — a low draft hit rate adds verification overhead instead of removing work. Host-resident lookup tables are sensitive to host memory capacity and bandwidth; on low-bandwidth machines, performance may get worse rather than better.
Pre-Launch Checklist
- Architecture: Does the active parameter mix include the output head? What is the pure-text compute?
- VRAM: Where do the main body and the lookup tables live? Has the KV been recomputed from layer count, KV head count, head dimension, bytes per value, sequence length, and concurrency?
- Memory: Can host memory capacity and bandwidth support per-token lookup?
- Multimodal: How does image resolution map to tokens? Are vision encoding and the vision projection included in the budget?
- Quantization: What are the precision loss, throughput, and time-to-first-token for Q4, FP8, IQ2, and other tiers on your task set?
- Framework: Does your target inference framework support it? If not merged yet, is there an alternative branch?
- Cost: Do you account for cache hits, output tokens, retries, and failed re-runs?
- License: Is commercial use, redistribution, or training derivative models permitted?
Closing: Why More Active Parameters Can Cost Less
The answer is not in any single parameter — it is in the total ledger.
For short-input, short-output workloads, a light-activation model has the advantage. But for long context and multi-turn coding, a small KV cache relieves decode bandwidth pressure, and stronger per-token capability reduces rework. Combined, these can lower total task cost.
Look less at individual leaderboard positions and more at task-level cost formulas, and run verifiable comparisons on your own business data. Architectural decisions should treat three things as first-class concerns: where knowledge lives, where compute is spent, and how context is reused.
