AI model comparison

Gemma 4 31B vs Llama 3.1 70B Instruct

Side by side comparison of Gemma 4 31B and Llama 3.1 70B Instruct on pricing, benchmark scores, context window, and more.

Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output.

Input / 1M
$0.20
Output / 1M
$0.40
Context
262K

Meta's latest class of model (Llama 3.1) launched with a variety of sizes & flavors. This 70B instruct-tuned version is optimized for high quality dialogue usecases.

Input / 1M
$0.72
Output / 1M
$0.72
Context
131K

Comparing image generators? Compare image models

At a glance

Quick verdict

How the two models stack up on the things people ask about most.

Lower price

google logo

Gemma 4 31B

3x cheaper for a typical chat

Higher intelligence score

meta logo

Llama 3.1 70B Instruct

6.6 vs 4.4 on Artificial Analysis

Larger context window

google logo

Gemma 4 31B

262K vs 131K tokens

Newer release

google logo

Gemma 4 31B

Released April 2, 2026

Benchmarks

Benchmark scores

Independent scores from Artificial Analysis. Higher is better.

Intelligence index

google logoGemma 4 31B4.4
meta logoLlama 3.1 70B Instruct6.6

Coding index

google logoGemma 4 31B43.4
meta logoLlama 3.1 70B InstructNot available

Agentic index

google logoGemma 4 31B4.2
meta logoLlama 3.1 70B InstructNot available

Pricing

Gemma 4 31B vs Llama 3.1 70B Instruct API pricing

Per-token API rates. Cheaper option highlighted.

Metricgoogle logoGemma 4 31Bmeta logoLlama 3.1 70B Instruct
Input tokensPer 1M tokens$0.20$0.72
Output tokensPer 1M tokens$0.40$0.72
Cached input (read)Per 1M tokensNot availableNot available
Cache writePer 1M tokensNot availableNot available

What it costs in practice

Estimated cost per 1,000 requests at standard rates. Coding and long-document figures also show the cost when the input is already cached.

Chat message

2K in, 500 out

google logoGemma 4 31B$0.60
meta logoLlama 3.1 70B Instruct$1.80

Coding task

30K in, 4K out

google logoGemma 4 31B$7.60
meta logoLlama 3.1 70B Instruct$24.48

Long document summary

150K in, 2K out

google logoGemma 4 31B$30.80
meta logoLlama 3.1 70B Instruct$109.44

Specs

Context window and capabilities

How much each model can read, how much it can write, and what it accepts as input.

Metricgoogle logoGemma 4 31Bmeta logoLlama 3.1 70B Instruct
Context window262K tokens131K tokens
Max output16K tokens8K tokens
Input typesImage, Text, VideoText
Output typesTextText
Reasoning effort levelsNot availableNot available
Default reasoning effortNot availableNot available
Release dateApril 2, 2026July 23, 2024

Features

Supported features

API features available for each model.

Metricgoogle logoGemma 4 31Bmeta logoLlama 3.1 70B Instruct
Tool callingSupportedSupported
Structured outputsSupportedNot supported
JSON modeSupportedNot supported
ReasoningSupportedNot supported
TemperatureSupportedSupported
Stop sequencesSupportedSupported
Deterministic seedSupportedNot supported
Verbosity controlNot supportedNot supported

Our take

Gemma 4 31B is 3x cheaper for a typical chat. Llama 3.1 70B Instruct scores higher on the Artificial Analysis Intelligence Index (6.6 vs 4.4). Gemma 4 31B has the larger context window (262K vs 131K tokens). The right pick depends on your workload, so the quickest way to settle it is to send the same prompt to both and compare.

FAQ

Frequently asked questions

Is Gemma 4 31B or Llama 3.1 70B Instruct cheaper?

Gemma 4 31B is cheaper for a typical chat (2K input tokens and 500 output tokens). Gemma 4 31B costs $0.20 per 1M input tokens and $0.40 per 1M output tokens, while Llama 3.1 70B Instruct costs $0.72 per 1M input tokens and $0.72 per 1M output tokens.

Which has a bigger context window, Gemma 4 31B or Llama 3.1 70B Instruct?

Gemma 4 31B supports up to 262K tokens of context, compared with 131K for Llama 3.1 70B Instruct.

Is Gemma 4 31B smarter than Llama 3.1 70B Instruct?

On the Artificial Analysis Intelligence Index, Gemma 4 31B scores 4.4 and Llama 3.1 70B Instruct scores 6.6, putting Llama 3.1 70B Instruct ahead. Benchmarks don't capture everything, so the best test is running your own prompts through both.

Can I use Gemma 4 31B and Llama 3.1 70B Instruct at the same time?

Yes. Shortcut Chat sends one prompt to multiple models at once, so you can see Gemma 4 31B and Llama 3.1 70B Instruct answer side by side and keep the better response.

google logometa logo

Why choose? Ask both.

Send one prompt to Gemma 4 31B and Llama 3.1 70B Instruct at the same time. Compare the answers side by side and keep the best one.