Skip to content

Tools / LLM GPU calculator / gpt-oss-20b

gpt-oss-20b VRAM requirements

GPU memory for the weights and KV cache at FP16, FP8 and 4-bit, and how many GPUs that takes. Figures from the model's config.json.

Short answer

gpt-oss-20b needs about 47 GB of GPU memory at FP16/BF16, 23 GB at FP8 and 13 GB at 4-bit to serve one user at an 8K-token context. Its 20.9B parameters take 41.8 GB at 16-bit, and that conversation adds 0.2 GB of KV cache. It is a mixture-of-experts model: 3.6B parameters are active per token, but all 20.9B must be in GPU memory. On NVIDIA H100 80 GB GPUs that is 1 GPU at FP16 or FP8; for a desktop, at 4-bit it fits a single 24 GB GeForce RTX 4090.

Updated . KV cache at FP16, plus 10% headroom for activations and the runtime.

GPU memory by precision

WeightsWeight memory1 user, 8K context32 users, 8K context1 user, 128K context
FP16/BF1641.8 GB47 GB54 GB50 GB
FP820.9 GB23 GB30 GB27 GB
4-bit (INT4)11.5 GB13 GB20 GB16 GB

Required memory = (weights + KV cache) ÷ 0.9. An FP8 KV cache halves the cache share; set it in the calculator.

How many GPUs for one user at 8K context

GPUMemoryFP16/BF16FP84-bit (INT4)
Data center · tensor parallel
NVIDIA L40S48 GB1 GPU1 GPU1 GPU
NVIDIA RTX PRO 6000 Blackwell Server Edition96 GB1 GPU1 GPU1 GPU
NVIDIA H100 SXM80 GB1 GPU1 GPU1 GPU
NVIDIA H100 NVL94 GB1 GPU1 GPU1 GPU
NVIDIA H200141 GB1 GPU1 GPU1 GPU
NVIDIA B200180 GB1 GPU1 GPU1 GPU
NVIDIA B300288 GB1 GPU1 GPU1 GPU
AMD Instinct MI300X192 GB1 GPU1 GPU1 GPU
AMD Instinct MI355X288 GB1 GPU1 GPU1 GPU
Workstation & consumer · layer split
NVIDIA RTX PRO 6000 Blackwell Workstation Edition96 GB1 card1 card1 card
NVIDIA GeForce RTX 309024 GB2 cards1 card1 card
NVIDIA GeForce RTX 409024 GB2 cards1 card1 card
NVIDIA GeForce RTX 509032 GB2 cards1 card1 card
Apple Mac Studio M3 Ultra / M5 Ultra96 GB (72 usable)1 Mac1 Mac1 Mac
Apple Mac Studio M3 Ultra / M5 Ultra256 GB (192 usable)1 Mac1 Mac1 Mac
Apple Mac Studio M5 Ultra512 GB (384 usable)1 Mac1 Mac1 Mac

Data center GPUs are counted at a tensor-parallel size (TP) that divides the model’s attention heads, within one 8-GPU server. Workstation and consumer cards are counted for a layer split, which works with any number of cards. Mac Studio counts about 75% of unified memory as usable by the GPU. Capacity only: speed depends on memory bandwidth and the serving stack.

Memory is step one. Throughput, latency, power and the network decide the real build.

Size my actual workload

gpt-oss-20b architecture

Parameters
20.9B total, 3.6B active per token (mixture of experts)
Layers with a KV cache
24
Attention heads / KV heads
64 / 8
Head dimension
64
Attention
12 sliding-window layers (128 tokens) + 12 global
Maximum context
131,072 tokens
KV cache per token (FP16)
2 × 12 global layers × 8 KV heads × 64 head dim × 2 bytes = 24,576 bytes (0.02 MB) per token, plus 2,048 bytes per token in each of the 12 sliding-window layers, for at most 128 tokens

Source: openai/gpt-oss-20b config.json on Hugging Face. Parameter counts are the Hub’s count of the repo’s safetensors files, or the model card’s figure.

Questions about gpt-oss-20b

How much VRAM does gpt-oss-20b need?

About 47 GB at FP16/BF16, 23 GB at FP8 and 13 GB at 4-bit, for one user at an 8K-token context. That is 41.8 GB, 20.9 GB or 11.5 GB of weights, plus 0.2 GB of KV cache, plus 10% headroom for activations and the runtime. Serving 32 users at 8K each takes 54 GB at FP16 or 30 GB at FP8, because every conversation keeps its own KV cache.

How many H100 GPUs does gpt-oss-20b need?

At FP16/BF16 it takes 1 GPU, for one user at 8K or for 32 users. At FP8, 1 GPU, for one user at 8K or for 32 users. One user at FP8 takes 1 GPU on H200 (141 GB) and 1 GPU on B200 (180 GB).

Can gpt-oss-20b run on an RTX 4090 or RTX 5090?

At 4-bit it needs about 13 GB for one user at 8K: a single RTX 4090 (24 GB) or a single RTX 5090 (32 GB). At FP8 (23 GB) it takes a single RTX 4090 (24 GB) or a single RTX 5090 (32 GB).

Can gpt-oss-20b run on a Mac Studio?

macOS lets the GPU use about 75% of unified memory by default: about 72 GB of a 96 GB, 192 GB of a 256 GB and 384 GB of a 512 GB Mac Studio. At 4-bit gpt-oss-20b needs 13 GB for one user at 8K, so it fits one 96 GB Mac Studio; at FP8 (23 GB) it fits one 96 GB Mac Studio.

How large is gpt-oss-20b's KV cache?

12 of its 24 layers use a sliding window and cache at most 128 tokens; only the other 12 keep the whole context. At FP16 that is 2 × 12 global layers × 8 KV heads × 64 head dim × 2 bytes = 24,576 bytes (0.02 MB) per token, plus 2,048 bytes per token in each of the 12 sliding-window layers, for at most 128 tokens. An 8K-token conversation holds 0.2 GB at FP16, and a 128K-token one holds 3.2 GB.

Does gpt-oss-20b need memory for all its experts?

Yes. gpt-oss-20b is a mixture-of-experts model with 20.9B parameters, of which about 3.6B are active for each token. Any token can be routed to any expert, so all of them must be in GPU memory: memory follows total parameters, speed follows active ones.

What is gpt-oss-20b's maximum context length?

131,072 tokens, according to its Hugging Face configuration. One user at that full length holds 3.2 GB of KV cache at FP16, for 27 GB in total with FP8 weights, or 25 GB with an FP8 KV cache as well.

Other models

Not listed? The LLM GPU calculator sizes any Hugging Face model from its ID, link or config.json.

Need to deploy private AI?

We design it, validate it, source it, deploy it and help run it.

Get my 48-hour blueprint

Give us your workload, users, budget and timeline. Within 48 hours we'll give you a validated cloud/on-prem architecture, BOM, expected costs and sourcing options.