We secured a $400M debt facility with Upper90 to scale inference compute.Read
mixture of expertsmoedense modelsmixtralllamainferencebenchmarksarchitecture

MoE vs Dense at Equal Compute: Mixtral 8x7B vs Llama 70B

General Compute·

Mixtral 8x7B and Llama 70B are often compared as if they're peers. Both landed around the same time, both targeted the "large open-source model" tier, and both ended up in the same conversations. But they make fundamentally different trade-offs. Mixtral activates roughly 13 billion parameters per token while keeping 47 billion in memory. Llama 70B activates all 70 billion parameters per token and needs all 70 billion in memory.

That difference in active parameter count drives almost everything about how the two models behave at inference time: compute cost, throughput, latency, hardware requirements, and where each lands on the quality curve for a given FLOPs budget.

What "equal compute" actually means here

When comparing MoE and dense models, "equal compute" has two possible meanings and they point in different directions.

Total parameters (memory footprint): Mixtral 8x7B has ~46.7B total parameters, Llama 70B has ~70B. Different.

Active parameters per token (FLOPs per forward pass): Mixtral activates ~12.9B per token, Llama 70B activates ~70B. Also different, by roughly 5x.

The comparison that matters for inference cost is active parameters per token, because that is what determines GPU compute per generated token. Total parameters affect memory footprint, which drives hardware selection, but not per-token latency on a given piece of hardware.

The equal-compute baseline for Mixtral 8x7B is a ~13B dense model, not a 70B dense model. That framing -- Mixtral 8x7B versus a 13B dense model -- is where MoE's quality efficiency becomes visible. The comparison to Llama 70B is a different question: what quality difference are you getting for a 5x increase in per-token FLOPs?

Mixtral 8x7B: the parameter breakdown

Mixtral 8x7B has 32 transformer layers. Each layer contains attention plus a mixture-of-experts FFN block. The attention uses grouped-query attention (GQA) with 32 query heads and 8 key-value heads, at hidden dimension 4096.

The MoE block has 8 experts per layer. Each expert is a standard FFN with intermediate dimension 14336: up projection (4096 to 14336), a gate projection (also 4096 to 14336), and down projection (14336 to 4096). That works out to roughly 176M parameters per expert. A router picks the top-2 experts per token per layer.

Active parameters per token:

  • Attention layers: Q/K/V/O projections across 32 layers, with GQA. Total roughly 1.3B parameters, all active on every token.
  • Active FFN: 2 experts out of 8 per layer, times 32 layers. Roughly 11.3B parameters active.
  • Total active: approximately 12.6-12.9B parameters per token.

Total parameters:

  • 8 experts times 176M times 32 layers = approximately 45B FFN parameters.
  • Plus attention (1.3B) and embeddings/norms (~0.4B).
  • Total: approximately 46.7B parameters.

The other 6 experts per layer -- roughly 33B parameters -- sit in GPU memory every forward pass but contribute zero FLOPs for a token that doesn't route to them.

Quality at 13B active FLOPs

The fundamental question about MoE efficiency is: does the quality from 46.7B total parameters (with 12.9B active) beat what you'd get from a dense model with 12.9B parameters, running at the same per-token compute cost?

The answer is yes, by a wide margin.

On MMLU, Mixtral 8x7B scores around 70.6%. Llama 2 13B scores roughly 55%. Llama 3 8B reaches about 66%. Mixtral 8x7B, spending the same compute per token as these models, benchmarks 4-15 percentage points higher depending on the comparison.

On code generation (HumanEval pass@1), Mixtral 8x7B reaches around 40% while Llama 2 13B sits near 18%. On math reasoning (GSM8K), Mixtral 8x7B is around 74% versus Llama 2 13B's 28%.

The quality gap is consistent across task types. It comes from the fact that 47B total parameters give the model more representational capacity, even when only 13B are active per token. The routing mechanism directs each token to specialists that have learned the relevant patterns. A token involving French text might route to different experts than a token in a Python code block, and both sets of experts have had more total training signal to develop their specializations because there are more of them.

Quality compared to Llama 70B

At the Llama 2 generation, Mixtral 8x7B was roughly competitive with Llama 2 70B on several benchmarks, and outperformed it on a few. That made it an attractive option: similar quality at roughly 3x the inference speed.

With Llama 3 and 3.1, the picture changed. Llama 3.1 70B scores around 82-83% on MMLU, about 12 percentage points above Mixtral 8x7B. On MATH benchmarks, the gap is larger. On code reasoning tasks, Llama 3.1 70B is considerably stronger. The improvement reflects a year of progress in training data quality, instruction tuning, and alignment.

So the honest version of the comparison is: at 13B active FLOPs, Mixtral 8x7B outperforms any similarly-priced dense model by a large margin. But Llama 3.1 70B, spending 5x the FLOPs per token, is noticeably better, and that quality gap matters for tasks requiring strong reasoning.

MoE closes roughly half the quality gap between a 13B dense model and a 70B dense model, at the same per-token compute cost. That is a meaningful gain. It does not close the full gap.

Inference speed

Since Mixtral 8x7B computes roughly 5x fewer FLOPs per token than Llama 70B, it is substantially faster at decode.

Approximate throughput on a single A100 80GB node, FP16, batch size 1:

| Model | Decode speed (tokens/sec) | |---|---| | Mixtral 8x7B FP16 | ~85-100 | | Llama 2 70B FP16 | ~25-35 | | Llama 3.1 70B FP16 | ~30-40 |

At larger batch sizes the ratio shifts somewhat -- Llama 70B's compute becomes more efficient as the matmuls grow larger and amortize the memory reads better -- but Mixtral 8x7B typically maintains a 2-3x throughput advantage.

For latency-sensitive applications (voice agents, real-time coding assistants, interactive chat), this speed difference is material. Reaching 80 tokens/sec with Mixtral 8x7B on a single A100 is straightforward. Getting there with Llama 70B requires more hardware.

Memory requirements

Memory behavior is more nuanced than compute. Mixtral 8x7B at FP16 requires approximately 93GB of GPU memory for weights. Llama 70B requires approximately 140GB. Mixtral is smaller, but not by the 5x ratio that the active-FLOPs comparison implies.

The reason: all eight experts have to be resident in GPU memory, even though only two are active per token. There is no way to page out the inactive experts without paying load latency on every token that routes to them -- which would happen constantly and unpredictably.

Both models require multi-GPU deployments at FP16. Mixtral 8x7B fits on 2x A100 80GB with room for context. Llama 70B typically needs 2x A100 80GB tightly packed or 3x A100s for comfortable context lengths and batch sizes.

Quantization helps both roughly proportionally. Mixtral 8x7B in INT4 fits on a single 48GB GPU. Llama 3.1 70B in INT4 fits on 1x 80GB A100 or 2x 40GB A100s.

Where MoE wins

When you have a fixed compute budget and want the best quality per FLOP. Mixtral 8x7B extracts substantially better quality than any dense model running at the same per-token compute cost. If you have hardware that sustains a certain FLOPs/s throughput and want to maximize quality, MoE uses that compute more efficiently.

When your quality target is in the 65-72% MMLU range. For this tier, Mixtral 8x7B is fast and well-supported. The routing specialization helps particularly with multilingual tasks, where Mixtral 8x7B beats comparably-sized dense models more than on English-only evaluations.

When latency matters and you can accept Mixtral-tier quality. If your application needs 60-80 tokens/second and can work with the quality that Mixtral 8x7B provides, it is hard to beat from a hardware efficiency standpoint.

When throughput is the primary metric. At large batch sizes, Mixtral 8x7B's lower per-token compute makes it significantly more tokens-per-dollar than a 70B dense model, even accounting for the memory overhead.

Where dense wins

When you need Llama 3.1 70B-class quality. There is currently no MoE model that matches Llama 3.1 70B's quality at 13B active FLOPs. Closing the gap requires more total parameters (and thus more memory), more sophisticated routing, or both. If the quality difference matters for your task -- and for complex reasoning, coding, or instruction following it usually does -- dense 70B is the cleaner path.

When serving at very small batch sizes (1-2 concurrent requests). MoE routing adds per-token overhead beyond the matmul itself: the router runs, the top-k selection happens, the tokens get dispatched to selected expert weights. For large batches this overhead amortizes. For single-request serving, it is a real fixed cost that slightly increases latency compared to an equivalently-sized dense model.

When deployment simplicity matters. Dense models shard cleanly with tensor parallelism. MoE models benefit from expert parallelism for large-scale deployments, which requires more infrastructure setup and tuning. For a team spinning up a new serving stack, dense is simpler to reason about and operate.

When quantizing aggressively to INT4 or lower. MoE models have some experts that see fewer tokens during calibration, which slightly degrades INT4 quantization quality compared to dense models where all parameters are uniformly active. The difference is small but measurable on precision-sensitive tasks.

The quality-to-FLOPs curve

For rough planning, here is approximately where the models sit on the quality-per-FLOP curve (MMLU used as a proxy):

| Model | Active params/token | MMLU (approx) | |---|---|---| | Llama 2 13B | 13B | ~55% | | Llama 3 8B | 8B | ~66% | | Mixtral 8x7B | ~13B | ~71% | | Llama 2 70B | 70B | ~69% | | Llama 3.1 70B | 70B | ~83% |

Mixtral 8x7B's quality sits above Llama 2 70B despite activating 5x fewer parameters per token. That is a real result, not cherry-picked. Against Llama 3.1 70B, Mixtral trails by roughly 12 points on MMLU and more on harder reasoning tasks.

The more apples-to-apples comparison for current MoE architecture is Llama 4 Maverick (a 400B MoE with ~17B active parameters) against Llama 4 Scout (17B dense) and Llama 4 Behemoth (dense 405B). Maverick outperforms Scout despite having the same active FLOPs, and gets closer to Behemoth quality, which illustrates that the MoE efficiency gains hold across generations.

Practical summary

Mixtral 8x7B and Llama 70B are not equal-compute models. They differ by roughly 5x in per-token FLOPs, which is most of what explains the throughput difference.

The relevant framing for choosing between them:

For compute cost (tokens/second, cost/token), compare MoE active parameters to dense parameters.

For quality, compare benchmark scores directly.

For memory, compare total parameters (since all MoE experts must be resident).

Mixtral 8x7B delivers about 5x better throughput than Llama 70B while accepting a ~12-point quality penalty on MMLU and larger gaps on harder benchmarks. Whether that trade-off is right depends on whether the quality difference matters for the specific task.

If you want to measure this difference directly against your workload, General Compute runs both Mixtral 8x7B and Llama 3.1 70B on the same infrastructure. The throughput difference is visible in the token generation numbers, and you can run your eval prompts through both to measure the quality gap for your specific use case. The API is OpenAI-compatible, so switching between models is a one-line change. Start at generalcompute.com.

ModeHumanAgent