Skip to content
Updated minutes ago
ReleasedJuly 9, 2025Verified 3d ago · openrouter.ai
xAI

Grok 4

xAI · moe · 400B parameters · 256,000 context

Quality
50.0

Parameters

400B

Context Window

250K tokens

Architecture

MoE

Best GPU

B200 NVL (pair)

Intelligence Brief

Grok 4 is a 400B parameter Mixture-of-Experts (16 experts, 2 active) model from xAI, featuring Grouped Query Attention (GQA) with 80 layers and 10,240 hidden dimensions. With a 256,000 token context window, it supports tools, vision, structured output, code, math, multilingual, reasoning. For self-hosted inference, B200 NVL (pair) delivers optimal throughput at $39858/month.

Recent changes

Loading…

Related models

5 suggestions

Picks: same family first, then same vendor within ±2× params, then top tag-overlap matches. Price shown is the cheapest Output $/M across providers — the row's page shows the canonical anchor.

Architecture Details

TypeMOE
Total Parameters400B
Active Parameters80B
Layers80
Hidden Dimension10,240
Attention Heads80
KV Heads10
Head Dimension128
Vocab Size200,000
Total Experts16
Active Experts2

Memory Requirements

BF16 Weights

800.0 GB

FP8 Weights

400.0 GB

INT4 Weights

200.0 GB

KV-Cache per Token204800 bytes
Activation Estimate4.00 GB

Fits on (multi-GPU with Tensor Parallelism)

Multi-GPU configurations use Tensor Parallelism (TP) to split model layers across GPUs. Requires NVLink or NVSwitch interconnect for optimal performance.

GPU Compatibility Matrix

Grok 4 is compatible with 2% of GPU configurations across 41 GPUs at 3 precision levels.

BF16 (Full)
FP8 (Half)
INT4 (Quarter)
Blackwell(7 GPUs)
B200 NVL (pair)360GB
B300288GB
B100 SXM192GB
GB200 NVL72 (per GPU)192GB
Hopper(7 GPUs)
H100 NVL 94GB (per GPU pair)188GB
H200 SXM141GB
H2096GB
GH20096GB
Ada Lovelace(11 GPUs)
L40S48GB
L4048GB
RTX 6000 Ada48GB
L2048GB
Ampere(16 GPUs)
A100 80GB SXM80GB
A100 80GB PCIe80GB
A1664GB
RTX A600048GB
Legend:No fitVery tightTightModerateGoodExcellent

GPU Recommendations

B200 NVL (pair)optimal

BF16 · 4 GPUs · tensorrt-llm

88/100

score

Throughput

280.0 tok/s

Latency (ITL)

3.6ms

Est. TTFT

1ms

Cost/Month

$39858

Cost/M Tokens

$54.17

Use this config →
B200 SXMoptimal

BF16 · 8 GPUs · tensorrt-llm

83/100

score

Throughput

280.0 tok/s

Latency (ITL)

3.6ms

Est. TTFT

1ms

Cost/Month

$34088

Cost/M Tokens

$46.33

Use this config →
B100 SXMoptimal

BF16 · 8 GPUs · tensorrt-llm

83/100

score

Throughput

280.0 tok/s

Latency (ITL)

3.6ms

Est. TTFT

1ms

Cost/Month

$34164

Cost/M Tokens

$46.43

Use this config →

Deployment Options

API

API Deployment

No API pricing available

Self-Hosted

Single GPU

Requires multi-GPU setup (400 GB VRAM needed)

Scale

Multi-GPU

B200 NVL (pair) x4

280.0 tok/s

TP· $39858/mo

API Pricing Comparison

No API pricing data available for this model.

Performance Estimates

Throughput by GPU

B200 NVL (pair)
280.0 tok/s
B200 SXM
280.0 tok/s
B100 SXM
280.0 tok/s

VRAM Breakdown (B200 NVL (pair), BF16)

Weights
Weights 200.0 GBKV-Cache 6.7 GBActivations 32.0 GBOverhead 10.0 GB

Capabilities

Features

Tool Use Vision Code Math Reasoning Multilingual Structured Output

Supported Frameworks

vllm

Supported Precisions

BF16 (default)

Where to Deploy Grok 4

Similar Models

Grok-2

314B params · moe

Quality: 78

from $10.00/M

Higher qualityCompare →

Grok-3

314B params · dense

Quality: 91

from $15.00/M

Higher qualityCompare →

Grok 4.3

500B params · moe

Quality: 50

from $2.50/M

Larger contextCompare →

Grok 3

600B params · moe

Quality: 90

from $15.00/M

Higher qualityCompare →

Llama 4 Maverick

400B params · moe

Quality: 84

from $0.60/M

Larger context, Higher qualityCompare →

Frequently Asked Questions

How much VRAM does Grok 4 need for inference?

Grok 4 requires approximately 800.0 GB of VRAM at BF16 precision, 400.0 GB at FP8, or 200.0 GB at INT4 quantization. Additional VRAM is needed for KV-cache (204800 bytes per token) and activations (~4.00 GB).

What is the best GPU for Grok 4?

The top recommended GPU for Grok 4 is the B200 NVL (pair) (x4) using BF16 precision. It achieves approximately 280.0 tokens/sec at an estimated cost of $39858/month ($54.17/M tokens). Score: 88/100.

How much does Grok 4 inference cost?

Grok 4 inference costs vary by provider and GPU setup. Use our calculator for detailed cost estimates across all providers.