TextDense6.74B params4K max context

Llama 2 7B VRAM Requirements: How Many GPUs & What It Costs

Llama 2 7B needs 13.5 GB of VRAM for its weights at FP16 — 15.6 GB once a KV cache is loaded. Below is the full breakdown: which GPUs fit, how many you need, what it serves, and what it costs per million tokens. Every figure comes from tokcalc's open-source capacity model.

Weights (FP16)
13.5 GB
15.6 GB with KV cache
Fits on 1 GPU?
Yes
L40S 48GB or larger
Cheapest config
$0.0186
8× RTX 3080 10GB / 1M tokens
Fastest config
39347
tok/s on 2× Cerebras CS-3 (WSE-3)
VRAM requirement by quantization
Weight footprint = params × bytes per param. The “with KV cache” column adds one request at 4K context.
QuantizationWeightsWith KV cacheSmallest single GPU
FP16recommended13.5 GB15.6 GBT4 16GB (16 GB)
FP8 (E4M3)6.7 GB8.9 GBRTX 3080 10GB (10 GB)
AWQ 4-bit3.7 GB5.9 GBRTX 3080 10GB (10 GB)
Which GPU should you use?
Reference workload: 8K context, 8 concurrent users, continuous batching, FP16. Ranked by fitting first, then by tokens per dollar-hour.
GPUGPUsTotal VRAMDecode tok/sAggregate tok/sCost / 1M tokens
RTX 3080 10GB8×80 GB249.223923$0.0186
RTX 4080 16GB4×64 GB117.55642$0.0591
RTX 3090 24GB2×48 GB76.731841$0.0754
RTX 5090 32GB2×64 GB146.93526$0.0788
T4 16GB4×64 GB52.462518$0.0882
RTX A4000 16GB4×64 GB73.453526$0.0945
RTX 4090 24GB2×48 GB82.631983$0.1121
V100 SXM2 32GB2×64 GB73.781771$0.1569
A100 40GB SXM42×80 GB127.13049$0.1640
A10G 24GB2×48 GB49.181180$0.1694
AMD MI300X 192GB1×192 GB255.63067$0.2264
TPU v6e Trillium (32GB)2×64 GB67.141611$0.2758

RTX 3080 10GB has no NVLink, so 8-way tensor parallelism runs over PCIe. tokcalc applies a flat 0.85× multi-GPU efficiency factor for this, which is realistic for NVLink-equipped datacenter cards but optimistic for PCIe scale-out — treat the throughput and cost figures for this configuration as an upper bound, and measure before committing.

How concurrency changes with context length
On 8× RTX 3080 10GB at FP16. KV cache scales linearly with context, so long contexts cut the number of users you can serve from the same GPUs.
ContextConcurrent usersKV per requestFits?
4K302.15 GB✓ fits
8K154.29 GB✓ fits
33K317.18 GB✓ fits
66K134.36 GB✓ fits
131K068.72 GB✗ does not fit
Frequently asked questions

Can Llama 2 7B run on a single GPU?

Yes. At FP16 the model needs 15.6 GB of VRAM, so it fits on a single L40S 48GB or anything with more VRAM. At full FP16 it needs 15.6 GB, which fits on one T4 16GB or larger.

How many GPUs does Llama 2 7B need?

At FP16 with 8,192-token context and 8 concurrent users, the cheapest configuration that fits is 8× RTX 3080 10GB (80 GB total VRAM). $0.0186 per 1M output tokens.

How fast can Llama 2 7B be served?

On 2× Cerebras CS-3 (WSE-3) at FP16, the aggregate throughput is 39347 tokens/sec with continuous batching. That hardware has no published rental price, so its cost per million tokens is not comparable.

How much VRAM does Llama 2 7B need?

Weights alone: 13.5 GB at FP16, 13.5 GB at FP16. Add KV cache for your context length and concurrency — every concurrent request at 8,192 tokens costs extra VRAM, so budget headroom above the weight figure.

Is it cheaper to self-host Llama 2 7B than to call an API?

At 8× RTX 3080 10GB the marginal cost is $0.0186 per 1M output tokens, before you add idle capacity, ops staff, or egress. That is typically cheaper than frontier API pricing at sustained volume, but API calls win when your load is bursty or too small to keep a GPU busy. The Build vs Buy tab on tokcalc prices this against a specific provider for you.

Try Llama 2 7B with your own context and concurrency

The calculator uses the exact same formulas as this page — change the workload and watch every number update.

Open in calculator
Model architecture
The numbers behind the KV-cache and throughput math.
Total parameters6.74B
Active parameters per token6.74B
ArchitectureDense
Attention layoutFull attention (GQA)
Transformer layers32
Hidden dimension4096
Attention heads32 query / 32 KV (GQA)
Head dimension128
Vocabulary size32,000
Max context (catalog)4K
KV cache per token @ 8K512.0 KB

Every layer caches keys and values for the whole context, so the KV cache grows linearly with conversation length.