FitMyGPU

Will It Fit?

Estimate text inference VRAM across Transformers and vLLM with a compact, explainable breakdown.

Model pages and release notes are included here too.

27B dense • 8,192 context • 16 KV heads

vLLM estimates use the selected GPU memory utilization. Transformers stays a fixed 4K single-request baseline.

Does not fit on selected GPU

Gemma 2 27B · vLLM · Official BF16 checkpoint

Required GPU VRAM (0.9 budget)

68.1 GB

Core estimate: 61.3 GB. Against RTX 4090 24GB, this leaves 42.4 GB of deficit.

At 4,096 tokens, the estimated max concurrency is 0 concurrent requests.

Quick read

Selected GPU

RTX 4090 24GB

Runtime

vLLM

Load dtype

FP16

GPU utilization

0.9

GPU count

1

KV cache dtype

BF16

Context length

4,096

Current concurrency

1

Max concurrency @ context

0

Class

Consumer

Bandwidth

1,008 GB/s

Nominal VRAM

24 GB

Core estimate

61.3 GB

Required GPU VRAM (0.9 budget)

68.1 GB

Deficit

42.4 GB

GPU compare

What fits this setup

GPUStatusHeadroomMax conc.
GB200 NVL72 GPU 186GBFits131.6 GB63
B200 180GBFits125.2 GB59
H200 141GBFits83.3 GB40
RTX PRO 6000 96GBFits35.0 GB17
A100 80GBFits17.8 GB9
H100 80GBFits17.8 GB9
L40 48GBOOM-16.6 GB0
A100 40GBOOM-25.2 GB0
RTX 5090 32GBOOM-33.8 GB0
RTX 3090 24GBOOM-42.4 GB0
RTX 4090 24GBOOM-42.4 GB0

Breakdown

Where the memory goes

Weights

27B resident parameters at 2.00 bytes each. Calibrated from the official checkpoint profile.

54.0 GB

KV cache

Concurrency 1, context 4,096, 46 KV-bearing layers, 16 KV heads, BF16 cache storage.

1.7 GB

Runtime / safety overhead

Conservative buffer for allocator fragmentation, kernels, and runtime scratch space.

5.6 GB

Weights = parameter count × bytes per parameter.

KV cache grows with context length, KV-bearing layers, concurrent requests, and the selected KV cache dtype.

Show the substituted formulas

Weights

parameter count × bytes per weight

27B × 2.00 = 54.0 GB

Google's official Gemma 2 27B Instruct release is exported in bfloat16.

KV cache

batch × effective KV tokens across attention layers × 2 × KV heads × head dim × bytes per KV element

1 × 188,416 × 2 × 16 × 144 × 2 = 1.7 GB

Longer context, deeper models, and larger batches all expand the cache linearly. BF16 controls the bytes per stored KV element.

Overhead

max(1.5 GB, 10% of weights + KV cache + linear state)

max(1.5 GB, 10% of 55.7 GB) = 5.6 GB

This leaves room for runtime buffers instead of claiming an unrealistically exact fit.

Model

Selected model

Gemma 2 27B

27B dense • 8,192 context • 16 KV heads

About model

Total params

27B

Active params

Dense model

Layers

46

Hidden size

4,608

Attention heads

32

KV heads

16

KV-bearing layers

46