Comparisons / LLaMA-3 Block vs Mixtral MoE Block
LLaMA-3 Block vs Mixtral MoE Block
A dense feed-forward against a mixture of experts, at the block level.
Mixtral MoE Block has 749M more parameters than LLaMA-3 Block: 1 layer added, 2 removed, 2 changed.
LLaMA-3 Block
- Layers
- 8
- Parameters
- 703M
- Input
- 1 × 2048
- Output
- 1 × 2048 × 4096
- Forward-passes
- yes
- Est. train cost
- $14.27
Mixtral MoE Block
- Layers
- 7
- Parameters
- 1.5B
- Input
- 1 × 4096 × 4096
- Output
- 1 × 4096 × 4096
- Forward-passes
- yes
- Est. train cost
- $63.07
The deltas
Every number is Mixtral MoE Block relative to LLaMA-3 Block.
Which GPUs each one fits
Each side is measured at its own declared input (1 × 2048 against 1 × 4096 × 4096). Both columns are right about their own model; the difference between them is not a fact about the designs.
| GPU | LLaMA-3 Block | Mixtral MoE Block |
|---|---|---|
| T4 16GB | fits | no |
| A100 40GB | fits | fits |
| H100 80GB | fits | fits |
Layer by layer
Aligned in topological order. 6 of 11 rows are the same layer with the same parameters.
Hide all 11 rows
| LLaMA-3 Block | Mixtral MoE Block | ||||||
|---|---|---|---|---|---|---|---|
| Layer | Params | Output | Layer | Params | Output | ||
| 1 | changed shape | tokens Input | 1 × 2048 | hidden_states Input | 1 × 4096 × 4096 | ||
| 2 | changed maxSeqLen | rope Rope | rotary_emb Rope | ||||
| 3 | removed | embed Embedding | 525M | 1 × 2048 × 4096 | — | ||
| 4–7 | same | 4 unchanged layers | |||||
| 8 | removed | swiglu_ffn Swiglu | 135M | 1 × 2048 × 4096 | — | ||
| 9 | added | — | block_sparse_moe Moe Layer | 1.4B | 1 × 4096 × 4096 | ||
| 10 | same | residual_2 Add | 1 × 2048 × 4096 | moe_residual Add | 1 × 4096 × 4096 | ||
| 11 | same | hidden_state Output | 1 × 2048 × 4096 | hidden_out Output | 1 × 4096 × 4096 | ||
What this is not
- The two are priced at different declared inputs (1 × 2048 against 1 × 4096 × 4096), so memory, cost and GPU fit are each right about their own model and are not a comparison between them. The layer and parameter deltas are unaffected.
- Parameter counts are derived from the graph, not read from a checkpoint. They are exact for a graph that is fully specified and approximate for one that is not.
- Cost and GPU fit are estimates from the graph under one set of assumptions, not measurements of a run.
Take it further
Open either graph in the editor, change it, and check it again: LLaMA-3 Block · Mixtral MoE Block
Compare any two models of your own, including anything on Hugging Face: the comparison tool.
Machine-readable: this page as markdown ·
the pair index ·
POST https://www.neurarch.com/api/v1/plan for a graph of your own.