gpt-oss 120B: how much VRAM does it need?
gpt-oss 120B has 116.83B parameters in 36 layers. It uses grouped-query attention: 64 query heads share 8 key-value heads, so its KV cache is 8× smaller than full multi-head attention would need. It is a Mixture-of-Experts model with about 5.10B of its 116.83B parameters active per token: memory has to hold all of them, while each token passes through only the active share. It takes up to 131,072 tokens of context; one user at that length needs 4.65 GiB of KV cache at FP16 on top of the weights.
217.6 GiB of weights, 437 MiB of KV cache and 2.04 GiB of vLLM's overhead. At INT4 the same workload needs 63.24 GiB.
- 36 layers
- hidden 2880
- 64/8 heads
- head_dim 64
- 128k max context
- MoE
gpt-oss 120B memory by precision and context
| Precision | 8k context | 32k context | 128k context |
|---|---|---|---|
| BF16 | 220.1 GiBKV cache 437 MiB | 220.9 GiBKV cache 1.27 GiB | 224.3 GiBKV cache 4.65 GiB |
| FP8 | 112.4 GiBKV cache 437 MiB | 113.2 GiBKV cache 1.27 GiB | 116.6 GiBKV cache 4.65 GiB |
| INT4 | 63.24 GiBKV cache 437 MiB | 64.08 GiBKV cache 1.27 GiB | 67.46 GiBKV cache 4.65 GiB |
One user, FP16 KV cache and vLLM's overhead on one GPU at its defaults for a card under 70 GB. Quantizing shrinks the weights, not the KV cache, so the saving narrows as the context grows.
Which single GPUs hold it
- BF16 (220.1 GiB): AMD MI325X, B300 (Blackwell Ultra) 270GB, AMD MI355X, Apple M3 Ultra (512GB)
- FP8 (112.4 GiB): H200 141GB, Apple M2 Ultra, B200 180GB, AMD MI300X
- INT4 (63.24 GiB): A100 80GB, H100 SXM 80GB, H100 PCIe 80GB, H100 NVL 94GB
At 8k context for one user, the smallest cards first. A discrete card is budgeted at vLLM's default 92% of its memory, a unified-memory device at the share its GPU can address, and each carries vLLM's overhead at its own defaults.
How many users fit
| GPU | BF16 | FP8 | INT4 |
|---|---|---|---|
| RTX 4090 | does not fit | does not fit | does not fit |
| RTX 5090 | does not fit | does not fit | does not fit |
| RTX 6000 Ada | does not fit | does not fit | does not fit |
| H100 SXM 80GB | does not fit | does not fit | 15 |
| RTX PRO 6000 Blackwell | does not fit | does not fit | 32 |
| AMD Ryzen AI Max+ 395 (128GB) | does not fit | does not fit | 29 |
| H200 141GB | does not fit | 27 | 114 |
| B200 180GB | does not fit | 88 | 166 |
Users at 8k context each, on one card. ✗: the weights leave no room for even one.
Fine-tuning gpt-oss 120B
| Method | Memory | Smallest GPU |
|---|---|---|
| Full fine-tune | 1742.3 GiB | several GPUs, sharded |
| LoRA (rank 16, attention) | 219.1 GiB | AMD MI325X |
| QLoRA (rank 16, attention) | 57.68 GiB | AMD MI210 |
Sequence length 2,048, batch size 1, gradient checkpointing on, Adam. Full fine-tuning keeps 16 bytes per parameter before activations; QLoRA stores the frozen base in 4-bit NF4.
Where the numbers come from
Weights are parameters × bytes per parameter. The KV cache is 2 × layers × key-value heads × head dimension × bytes × context × users. For gpt-oss 120B that is 72.0 KiB per token at FP16. 18 of its 36 layers attend over a sliding window of the last 128 tokens and hold no more than that, so past it each further token adds 36.0 KiB, the other 18 layers' share. These are capacity-planning figures: the serving engine — vLLM, TGI, llama.cpp — and its paged-attention efficiency still move the real number.
More on KV cache size and on GQA, MQA and MLA.
Work with gpt-oss 120B
- Size it for your workload
- Fine-tuning memory
- vLLM parameters
- Model anatomy
- Its config.json, explained
- What its files say about serving it