Skip to content
Updated minutes ago
ReleasedJuly 23, 2024Verified 3d ago · huggingface.co
Meta

Llama 3.1 405B

Meta · dense · 405B parameters · 131,072 context

Quality
81.0

Parameters

405B

Context Window

128K tokens

Architecture

Dense

Best GPU

B200 NVL (pair)

Cheapest API

$1.00/M

Quality Score

81/100

Intelligence Brief

Llama 3.1 405B is a 405B parameter DENSE model from Meta, featuring Grouped Query Attention (GQA) with 126 layers and 16,384 hidden dimensions. With a 131,072 token context window, it supports tools, structured output, code, math, multilingual. On standardized benchmarks, it achieves MMLU 88.6, HumanEval 61, GSM8K 96.8. The most cost-effective API deployment is via openrouter at $1.00/M output tokens. For self-hosted inference, B200 NVL (pair) delivers optimal throughput at $19929/month.

Provider pricing

3 providers · canonical: together
Provider Input $/M Output $/M Notes
openrouter$1.00$1.00cheapest input · cheapest output
fireworks$3.00$3.00
togethercanonical$3.50$3.50

Prices update via the nightly pricing cron + admin approvals at /admin/ingest-queue. The leaderboard's Input/Output cells show the canonical rate above; this table shows the full spread.

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

TypeDENSE
Total Parameters405B
Active Parameters405B
Layers126
Hidden Dimension16,384
Attention Heads128
KV Heads8
Head Dimension128
Vocab Size128,256

Memory Requirements

BF16 Weights

810.0 GB

FP8 Weights

405.0 GB

INT4 Weights

202.5 GB

KV-Cache per Token516096 bytes
Activation Estimate5.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

Llama 3.1 405B 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

FP8 · 2 GPUs · tensorrt-llm

88/100

score

Throughput

280.0 tok/s

Latency (ITL)

3.6ms

Est. TTFT

1ms

Cost/Month

$19929

Cost/M Tokens

$27.08

Use this config →
H20optimal

FP8 · 8 GPUs · tensorrt-llm

85/100

score

Throughput

280.0 tok/s

Latency (ITL)

3.6ms

Est. TTFT

1ms

Cost/Month

$7516

Cost/M Tokens

$10.21

Use this config →
B200 SXMoptimal

FP8 · 4 GPUs · tensorrt-llm

83/100

score

Throughput

280.0 tok/s

Latency (ITL)

3.6ms

Est. TTFT

1ms

Cost/Month

$17044

Cost/M Tokens

$23.16

Use this config →

Deployment Options

API

API Deployment

openrouter

$1.00/M

output tokens

Self-Hosted

Single GPU

Requires multi-GPU setup (405 GB VRAM needed)

Scale

Multi-GPU

B200 NVL (pair) x2

280.0 tok/s

TP· $19929/mo

API Pricing Comparison

ProviderInput $/MOutput $/MBadges
openrouter$1.00$1.00
Cheapest
fireworks$3.00$3.00
together$3.50$3.50

Cost Analysis

ProviderInput $/MOutput $/M~Monthly Cost
openrouterBest Value$1.00$1.00$10
fireworks$3.00$3.00$30
together$3.50$3.50$35

Cost per 1,000 Requests

Short (500 tok)

$0.70

via openrouter

Medium (2K tok)

$2.80

via openrouter

Long (8K tok)

$10.00

via openrouter

Performance Estimates

Throughput by GPU

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

VRAM Breakdown (B200 NVL (pair), FP8)

Weights
Act
Weights 202.5 GBKV-Cache 4.2 GBActivations 40.0 GBOverhead 10.1 GB

Precision Impact

bf16

405.0 GB

weights/GPU

fp8

202.5 GB

weights/GPU

~280.0 tok/s

int4

101.3 GB

weights/GPU

Quality Benchmarks

Above Average
88th percentile across all models
MMLU
88.6
Above Average (84th pctile)
HumanEval
61.0
Average (70th pctile)
GSM8K
96.8
Top 10% (90th pctile)
MT-Bench
88.0
Bottom 25% (0th pctile)

Capabilities

Features

Tool Use Vision Code Math Reasoning Multilingual Structured Output

Supported Frameworks

vllmsglangtgitensorrt-llm

Supported Precisions

BF16 (default)FP8INT4

Where to Deploy Llama 3.1 405B

Similar Models

Llama 4 Maverick

400B params · moe

Quality: 84

from $0.60/M

Larger context, CheaperCompare →

Claude Opus 4.5

400B params · moe

Quality: 90

from $25.00/M

Larger context, Higher quality, More expensiveCompare →
Larger context, Lower qualityCompare →
Larger context, Lower quality, More expensiveCompare →
Smaller context, Lower qualityCompare →

Frequently Asked Questions

How much VRAM does Llama 3.1 405B need for inference?

Llama 3.1 405B requires approximately 810.0 GB of VRAM at BF16 precision, 405.0 GB at FP8, or 202.5 GB at INT4 quantization. Additional VRAM is needed for KV-cache (516096 bytes per token) and activations (~5.00 GB).

What is the best GPU for Llama 3.1 405B?

The top recommended GPU for Llama 3.1 405B is the B200 NVL (pair) (x2) using FP8 precision. It achieves approximately 280.0 tokens/sec at an estimated cost of $19929/month ($27.08/M tokens). Score: 88/100.

How much does Llama 3.1 405B inference cost?

Llama 3.1 405B API inference starts from $1.00/M input tokens and $1.00/M output tokens. Self-hosted inference costs depend on your GPU configuration — use our ROI calculator for a detailed breakdown.