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.

21B total • 3.6B active • 128,000 context • 8 KV heads

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

Fits on selected GPU

GPT-OSS 20B · vLLM · Mixed MXFP4 + BF16 checkpoint

Required GPU VRAM (0.9 budget)

17.1 GB

Core estimate: 15.3 GB. Against RTX 4090 24GB, this leaves 8.7 GB of headroom.

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

Quick read

Selected GPU

RTX 4090 24GB

Runtime

vLLM

Load dtype

BF16

GPU utilization

0.9

GPU count

1

KV cache dtype

BF16

Context length

4,096

Current concurrency

1

Max concurrency @ context

70

Class

Consumer

Bandwidth

1,008 GB/s

Nominal VRAM

24 GB

Core estimate

15.3 GB

Required GPU VRAM (0.9 budget)

17.1 GB

Headroom

8.7 GB

GPU compare

What fits this setup

GPUStatusHeadroomMax conc.
GB200 NVL72 GPU 186GBFits182.7 GB1,441
B200 180GBFits176.2 GB1,390
H200 141GBFits134.3 GB1,060
RTX PRO 6000 96GBFits86.0 GB680
A100 80GBFits68.8 GB544
H100 80GBFits68.8 GB544
L40 48GBFits34.5 GB273
A100 40GBFits25.9 GB206
RTX 5090 32GBFits17.3 GB138
RTX 3090 24GBFits8.7 GB70
RTX 4090 24GBFits8.7 GB70

Breakdown

Where the memory goes

Weights

21B resident parameters at 0.65 bytes each. Calibrated from the official checkpoint profile.

13.7 GB

KV cache

Concurrency 1, context 4,096, 12 dense layers @ 4,096 tokens + 12 sliding-window layers @ 128 tokens, 8 KV heads, BF16 cache storage.

0.1 GB

Runtime / safety overhead

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

1.5 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

21B × 0.65 = 13.7 GB

OpenAI's GPT-OSS model card lists a 12.8 GiB checkpoint for gpt-oss-20b. The estimator uses that published mixed MXFP4 + BF16 resident checkpoint size directly.

KV cache

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

1 × 50,688 × 2 × 8 × 64 × 2 = 0.1 GB

Dense attention layers keep the full 4,096-token cache, while sliding-window layers only keep 128 tokens. 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 13.8 GB) = 1.5 GB

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

Model

Selected model

GPT-OSS 20B

21B total • 3.6B active • 128,000 context • 8 KV heads

About model

Total params

21B

Active params

3.6B

Layers

24

Hidden size

2,880

Attention heads

64

KV heads

8

KV-bearing layers

24