ResearchAudio

LLM infrastructure / 7B versus 13B

The model size sets the floor. The cache decides the fit.

Compare 7B and 13B weight memory at INT4, INT8, and FP16, then include architecture, 32K cached context, runtime headroom, and actually usable GPU memory.

Open the editable 13B model →

Raw weight floors

The arithmetic is exact. The deployment is not.

7B
INT4 3.26 · INT8 6.52 · FP16 13.04 GiB

13B
INT4 6.05 · INT8 12.11 · FP16 24.21 GiB

KV cache
2 × layers × KV heads × head dim × tokens × bytes

Planning target
(weights + explicit KV cache) × 1.20 headroom

Illustrative 32K GQA profiles

Hold the cache policy constant. Change the weights.

The 7B examples use 32 layers and the 13B examples use 40 layers. Both use eight KV heads, 128 dimensions per head, one full 32,768-token sequence, 16-bit KV cache, 20% runtime headroom, and 90% usable VRAM. Replace those inputs with the exact model configuration and workload.

The architecture trap

GQA and MHA can change the answer before concurrency starts.

Both comparisons keep model size, INT4 weights, 32K context, 16-bit cache, and 20% headroom constant. Only the number of KV heads changes.

Swipe the matrix horizontally →

ProfileGQA exampleMHA exampleDifference
7B · 32 layers8 KV heads · 4 GiB cache
8.71 GiB target
32 KV heads · 16 GiB cache
23.11 GiB target
+14.40 GiB
13B · 40 layers8 KV heads · 5 GiB cache
13.26 GiB target
40 KV heads · 25 GiB cache
37.26 GiB target
+24.00 GiB

These are architecture examples, not universal 7B or 13B specifications. Read num_hidden_layers, num_key_value_heads, and head dimension from the exact configuration before reserving a GPU.

Do not collapse the decision

Fit is not speed.
Capacity does not prove useful latency or tokens per second.

Context is allocated memory.
A longer or fuller cache can erase the saving from quantized weights.

Concurrency repeats cache.
Every fully allocated sequence multiplies the KV-cache budget.

Build the exact plan

Use the checkpoint and workload, not the label.

Enter the exact parameter count or checkpoint size, then copy the layer count, KV heads, and head dimension from the model configuration. Set cached context and concurrent sequences from the serving target—not the advertised maximum context window.

Open the LLM GPU memory calculator → Check common 8 GB to 141 GB GPU profiles → Start with your VRAM and find the largest model tier → Calculate GQA, MHA, context, and concurrency directly → Compare the 70B deployment boundary → Check the Hugging Face model memory estimator → Review current Transformers KV-cache strategies →

How much VRAM does a 7B LLM need?

The raw floor is 3.26 GiB at INT4, 6.52 GiB at INT8, or 13.04 GiB at FP16. This page's one-sequence 32K GQA examples plan for 8.71, 12.62, and 20.45 GiB after cache and headroom.

How much VRAM does a 13B LLM need?

The raw floor is 6.05 GiB at INT4, 12.11 GiB at INT8, or 24.21 GiB at FP16. This page's one-sequence 32K GQA examples plan for 13.26, 20.53, and 35.06 GiB after cache and headroom.

Can a 7B model run on an 8 GB GPU?

The INT4 weights can fit mathematically, but this page's full 32K GQA profile does not fit in 7.2 GiB of usable capacity. A shorter cache, leaner runtime, lower cache precision, or CPU offload can change the result.

Why can two 13B models need different amounts of VRAM?

Parameter count fixes only the weight floor. In the examples above, changing from eight GQA KV heads to forty MHA KV heads raises the 32K cache from 5 to 25 GiB before concurrency.

Infrastructure without the benchmark theatre

Get the next model deployment teardown.

ResearchAudio turns model releases, hardware claims, and serving constraints into practical decisions for engineers and builders.