# Codestral vs Llama 3.1-8B

> Codestral is the stronger model overall, scoring 30.1 to 22.8 on the Noometry Index. Llama 3.1-8B costs 7.8× less per token, which makes it the better buy when Codestral's lead doesn't matter for your workload.

- Canonical page: https://noometry.com/compare/codestral-vs-llama-3-1-8b
- Last updated: 2026-10-10
- Shared benchmarks: 4

## Summary

- They share 4 benchmarks with published results for both. Codestral scores higher in 2 categories and Llama 3.1-8B in 0 categories; 2 gaps are clear of the uncertainty.
- The widest gap is in coding, where Codestral leads 26.9 to 19.9.
- The biggest single-benchmark swing is BigCodeBench Complete: 52.5% for Codestral and 40.5% for Llama 3.1-8B.
- Llama 3.1-8B is cheaper at $0.05 / $0.08 per million input/output tokens, against $0.30 / $0.90 for Codestral.
- Codestral accepts more context: 256K tokens versus 128K.

## Snapshot

| | Codestral | Llama 3.1-8B |
|---|---|---|
| Provider | Mistral AI | Meta |
| Noometry Index | 30.1 | 22.8 |
| Rank | 287 | 347 |
| Context | 256K | 128K |
| Input $/M | $0.30 | $0.05 |
| Output $/M | $0.90 | $0.08 |
| Weights | Open | Open |

## Coding

- Codestral: 26.9 (#316)
- Llama 3.1-8B: 19.9 (#335)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| BigCodeBench Instruct | 41.8% | 32.8% |
| BigCodeBench Complete | 52.5% | 40.5% |
| HumanEval+ | 73.8% | 62.8% |
| MBPP+ | 61.9% | 55.6% |
| Aider Polyglot | 11.1% | — |
| SciCode | — | 13.2% |
| WeirdML | — | 1.7% |
| LMArena Coding | — | 1195 |
| ALE-Bench | 137.78 | — |

## Agentic & Tool Use

- Codestral: —
- Llama 3.1-8B: 22.3 (#123)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| Berkeley Function Calling Leaderboard | — | 25.8% |
| BALROG | — | 15.1% |

## Reasoning

- Codestral: 19.1 (#244)
- Llama 3.1-8B: 14.5 (#316)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| Kagi LLM Benchmark | 32.5% | — |
| CritPt | — | 0% |
| Chess Puzzles | — | 0% |
| LMArena Hard Prompts | — | 1175 |
| DTBench | — | 50.9% |
| LMCA | — | 5.4% |
| Epoch Capabilities Index | — | 116.48 |
| PIQA | — | 81.2% |

## Math

- Codestral: —
- Llama 3.1-8B: 9.5 (#311)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| OTIS Mock AIME 2024-2025 | — | 1.7% |
| Omni-MATH | — | 13.7% |
| LMArena Math | — | 1179 |
| MATH Level 5 | — | 22.9% |
| GSM8K | — | 82.4% |

## Knowledge

- Codestral: —
- Llama 3.1-8B: 8.0 (#302)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| GPQA Diamond | — | 27% |
| MMLU-Pro | — | 40.6% |
| GPQA (HELM) | — | 24.7% |
| LMArena Expert | — | 1144 |
| BoolQ | — | 82.8% |
| MMLU | — | 56.1% |

## Multilingual

- Codestral: —
- Llama 3.1-8B: 34.2 (#244)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| LMArena Non-English | — | 1148 |
| LMArena Chinese | — | 1151 |
| LMArena French | — | 1176 |
| LMArena German | — | 1144 |
| LMArena Japanese | — | 1061 |
| LMArena Korean | — | 1053 |
| LMArena Russian | — | 1158 |
| LMArena Spanish | — | 1169 |

## Instruction Following

- Codestral: —
- Llama 3.1-8B: 59.1 (#253)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| IFEval | — | 74.3% |
| LMArena Instruction Following | — | 1159 |

## Long Context

- Codestral: —
- Llama 3.1-8B: 35.8 (#233)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| LMArena Longer Query | — | 1182 |

## Writing & Preference

- Codestral: —
- Llama 3.1-8B: 29.9 (#285)

| Benchmark | Codestral | Llama 3.1-8B |
|---|---|---|
| LMArena Text | — | 1187 |
| LMArena Creative Writing | — | 1154 |
| EQ-Bench Creative Writing | — | 713 |
| WildBench | — | 68.7% |
| LMArena Multi-Turn | — | 1172 |

## FAQ

### Is Codestral better than Llama 3.1-8B?

Codestral is the stronger model overall, scoring 30.1 to 22.8 on the Noometry Index. Llama 3.1-8B costs 7.8× less per token, which makes it the better buy when Codestral's lead doesn't matter for your workload.

### Which is cheaper, Codestral or Llama 3.1-8B?

Llama 3.1-8B is cheaper. It lists at $0.05 per million input tokens and $0.08 per million output tokens; Codestral lists at $0.30 and $0.90.

### Is Codestral or Llama 3.1-8B better for coding?

Codestral scores higher on coding benchmarks: 26.9 versus 19.9 in the Noometry coding category.

### Which has the bigger context window?

Codestral does, with 256K tokens against 128K.

### How many benchmarks do Codestral and Llama 3.1-8B share?

4 benchmarks have published results for both models. Codestral has 7 scored results on Noometry and Llama 3.1-8B has 43.
