Model comparison
Grok 2 vs Llama 3.1
- Input
- $2.00
- Output
- $10.00
- Context
- 131K
- Released
- 2024-08-20
- Input
- $2.75 / 1M tokens
- Output
- $6.50 / 1M tokens
- Context
- 128K
- Released
- 2024-07-23
Grok 2 scores higher on 4 of the 5 benchmarks both models report (the other leads on 1); Grok 2 is cheaper on input tokens ($2 vs $2.8 per 1M, 1.4×); Grok 2 has the larger context window (131K vs 128K).
Specs and pricing side by side
| Spec | Grok 2 | Llama 3.1 |
|---|---|---|
| Maker | xAI (Grok) | Meta |
| Released | 2024-08-20 | 2024-07-23 |
| Context window | 131K | 128K |
| Max output | not published | Provider-dependent (e.g. ~4K on some hosted… |
| Input price | $2.00 | $2.75 / 1M tokens |
| Output price | $10.00 | $6.50 / 1M tokens |
| Parameters | 270B total · 115B active (mixture-of-experts) | 8B, 70B, and 405B (dense) |
| License | Grok 2 Community License Agreement (source-available) | Llama 3.1 Community License (custom commercial) |
| Weights | Open weights | Open weightssame |
| Modalities | Text, Vision | Text |
| Knowledge cutoff | not published | December 2023 |
Benchmarks both models report
| Benchmark | Grok 2 | Llama 3.1 |
|---|---|---|
| MMLU | 87.5% | 87.3% |
| MMLU-Pro | 75.5% | 73.3% |
| GPQA | 56% | 50.7% |
| MATH | 76.1% | 73.8% |
| HumanEval | 88.4% | 89% |
Scores are as published by each maker or its cited source; harness, reasoning effort and date can differ between rows, so treat small gaps as ties. Sources are listed on each model page.
Which one should you pick?
Pick Grok 2 if…
- You care about MMLU, MMLU-Pro, GPQA (it scores higher on 4 shared benchmarks).
- Cost matters: input tokens cost 1.4× less ($2 vs $2.8 per 1M).
- You need the longer context (131K vs 128K).
- You need Vision input, which Llama 3.1 lacks.
- Your use case is: general-purpose chat and reasoning assistants (Grok on X).
Pick Llama 3.1 if…
- You care about HumanEval (it scores higher on 1 shared benchmark).
- Your use case is: self-hosted and on-prem deployments where data cannot leave the org's infrastructure.
FAQ
Which is better, Grok 2 or Llama 3.1?
Grok 2 scores higher on 4 of the 5 benchmarks both models report (the other leads on 1); Grok 2 is cheaper on input tokens ($2 vs $2.8 per 1M, 1.4×); Grok 2 has the larger context window (131K vs 128K). The better pick depends on whether you value benchmark scores, price per token, context length or openness for your workload.
How much cheaper is Grok 2?
Grok 2: $2.00 input, $10.00 output. Llama 3.1: $2.75 / 1M tokens input, $6.50 / 1M tokens output (list API prices as published by each maker).
What are the context windows of Grok 2 and Llama 3.1?
Grok 2 offers 131K; Llama 3.1 offers 128K with up to Provider-dependent (e.g. ~4K on some hosted endpoints); the 128K window is shared between input and output output.
Is Grok 2 newer than Llama 3.1?
Grok 2 was released 2024-08-20; Llama 3.1 was released 2024-07-23.
