gpt-oss-120b and gpt-oss-20b architecture
OpenAI’s gpt-oss models are open-weight mixture-of-experts language models under the Apache 2.0 license. The model card lists gpt-oss-120b at 117B parameters with 5.1B active per token, and gpt-oss-20b at 21B with 3.6B active. Both have a 131,072-token context and configurable reasoning effort (low, medium, high).
In config.json, the 120b has 36 layers and 128 experts; the 20b has 24 layers and 32 experts. Both route each token to 4 experts, use a hidden size of 2,880, 64 query heads, 8 key-value heads and a head dimension of 64. Layers alternate between full attention and sliding-window attention over the last 128 tokens.
The card says the models must be used with OpenAI’s harmony response format. Transformers and the major servers apply it through the chat template, but a raw generate call does not.
| Property | gpt-oss-120b | gpt-oss-20b |
|---|---|---|
| Total / active parameters | 116.8B / 5.1B | 20.9B / 3.6B |
| Layers | 36 | 24 |
| Experts (active per token) | 128 (4) | 32 (4) |
| Query / KV heads, head dim | 64 / 8, 64 | 64 / 8, 64 |
| Attention pattern | Full and 128-token sliding window, alternating | Same |
| Context length | 131,072 tokens | 131,072 tokens |
| Checkpoint size | 65.2 GB | 13.8 GB |
| License | Apache 2.0 | Apache 2.0 |
References: gpt-oss-120b model card · gpt-oss-20b model card · gpt-oss-120b config.json · gpt-oss-20b config.json
What MXFP4 does to the memory bill
MXFP4 is a 4-bit microscaling floating-point format. OpenAI post-trained the models with the mixture-of-experts weights in MXFP4, and the card says all evaluations used that same quantization. The config leaves attention, the router, embeddings and the output head unquantized. That is why 116.8B parameters fit in a 65.2 GB checkpoint rather than the 234 GB BF16 would need.
This makes gpt-oss different from most models in this series: the 4-bit build is the reference build, not a lossy shortcut. There is no official FP8 or BF16 release; the FP8 and BF16 rows below are what the same parameters would cost if you dequantized them, which matters mainly for fine-tuning.
References: gpt-oss-120b model card · gpt-oss-120b config.json
VRAM table: weights plus KV cache
Only the full-attention layers keep keys and values for the whole context. Each layer stores 2 × 8 KV heads × 64 × 2 bytes = 2,048 bytes per token in BF16. With 18 full layers, gpt-oss-120b needs 36,864 bytes per token; with 12, the 20b needs 24,576. The sliding layers hold at most 128 tokens each, under 5 MB per sequence. vLLM’s hybrid KV cache manager names gpt-oss as a sliding-window model and frees blocks that fall outside the window.
The table assumes 32 concurrent requests at 16,384 tokens: 524,288 cached tokens. That is 19.3 GB of BF16 cache for the 120b and 12.9 GB for the 20b; an FP8 cache halves both. Run other mixes in the VRAM calculator.
| Model and precision | Weights | KV cache (524,288 tokens, BF16) | Total before overhead |
|---|---|---|---|
| 120b, MXFP4 (official) | 65.2 GB | 19.3 GB | ≈85 GB |
| 120b, FP8 (dequantized, no official build) | ≈117 GB | 19.3 GB | ≈136 GB |
| 120b, BF16 (dequantized) | ≈234 GB | 19.3 GB | ≈253 GB |
| 20b, MXFP4 (official) | 13.8 GB | 12.9 GB | ≈27 GB |
| 20b, FP8 (dequantized) | ≈21 GB | 12.9 GB | ≈34 GB |
| 20b, BF16 (dequantized) | ≈42 GB | 12.9 GB | ≈55 GB |
References: gpt-oss-120b config.json · gpt-oss-20b config.json · vLLM design: Hybrid KV cache manager · vLLM quantized KV cache
Which GPUs run gpt-oss, and how many
The card says gpt-oss-120b fits a single 80 GB GPU such as an H100, and gpt-oss-20b runs within 16 GB. At the 32-user scenario the 120b total (≈85 GB) is over 80 GB, so on one H100 you either lower concurrency or context, or use an FP8 cache. vLLM’s recipe notes that default settings on one H100 can run out of memory and suggests --gpu-memory-utilization 0.95 --max-num-batched-tokens 1024.
The vLLM recipe lists H100, H200 and B200 as supported, and A100 through a Triton attention backend and Marlin MXFP4 kernels. It says Ada Lovelace and RTX 5090 support was still in progress when it was written, so on L40S, RTX 4090 and RTX 5090 check current vLLM release notes or use Ollama. Rows marked "arithmetic" are our sums, not tested setups.
| Model | Setup | Fit | Basis |
|---|---|---|---|
| 120b | 1× H100 or A100 80 GB | Fits; modest concurrency | Model card, vLLM recipe |
| 120b | 1× H200 141 GB / 1× B200 180 GB | Comfortable, large cache | vLLM recipe (TP 1 for best throughput per GPU) |
| 120b | 2× H100 (TP 2) | Lower latency per user | vLLM recipe |
| 120b | 1× RTX PRO 6000 96 GB | Fits with cache headroom | Arithmetic; check runtime support |
| 120b | 2× L40S 48 GB | Fits across two cards | Arithmetic; Ollama or llama.cpp |
| 20b | 1× RTX 4090 24 GB / RTX 5090 32 GB | Fits; a few users | Model card (16 GB), Ollama |
| 20b | 1× L40S or any 80 GB GPU | Many concurrent users | Arithmetic |
References: gpt-oss-120b model card · gpt-oss-20b model card · vLLM recipes: GPT-OSS · NVIDIA H100 specifications · NVIDIA H200 specifications · NVIDIA DGX B200 specifications · NVIDIA A100 specifications · NVIDIA L40S specifications · NVIDIA RTX PRO 6000 Blackwell specifications · NVIDIA GeForce RTX 4090 specifications · NVIDIA GeForce RTX 5090 specifications
How to serve gpt-oss with vLLM, SGLang and Ollama
With vLLM: vllm serve openai/gpt-oss-120b, or openai/gpt-oss-20b. The recipe’s guidance for Hopper and Blackwell is tensor parallel size 1 for the best throughput per GPU and 2, 4 or 8 for lower per-user latency; on A100 it shows --tensor-parallel-size 2 and 4. Its evaluation example on 8× H100 adds --max-model-len 131072 --max-num-seqs 128 --gpu-memory-utilization 0.85. Deploy vLLM on a cloud GPU covers ports and Docker.
SGLang lists both models among its supported generative models and launches them with python -m sglang.launch_server --model-path openai/gpt-oss-120b. For a single machine, the card gives ollama pull gpt-oss:120b and ollama run gpt-oss:120b; Ollama lists the 120b at 65 GB and the 20b at 14 GB. The repositories are not gated, so no Hugging Face token is needed.
References: vLLM recipes: GPT-OSS · vLLM documentation: vllm serve CLI arguments · SGLang supported generative models · gpt-oss-120b model card · Ollama library: gpt-oss tags
Illustrative cost per hour and per million tokens
These are illustrative figures, not quotes or measurements. They assume $2.50 per GPU-hour for an H100, $3.50 for an H200 and $0.50 for an RTX 4090. See GPU prices for current NeuraMesh rates.
Cost per million tokens is hourly cost divided by tokens per hour, times one million. With 5.1B or 3.6B active parameters, gpt-oss does little compute per token, but reasoning modes also generate more tokens per answer. Measure with vllm bench serve at your chosen reasoning effort and count cost per completed answer, not only per token.
| Setup (assumed rate) | Cost per hour | Per 1M tokens at 1,000 tok/s | At 5,000 tok/s |
|---|---|---|---|
| 120b on 1× H100 ($2.50/hour) | $2.50 | $0.69 | $0.14 |
| 120b on 1× H200 ($3.50/hour) | $3.50 | $0.97 | $0.19 |
| 20b on 1× RTX 4090 ($0.50/hour) | $0.50 | $0.14 | $0.03 |
References: vLLM serving benchmark options · gpt-oss-120b model card
Fine-tuning memory for gpt-oss
The model card says gpt-oss-120b can be fine-tuned on a single H100 node and gpt-oss-20b on consumer hardware. For comparison, Hugging Face’s memory guide puts full fine-tuning with AdamW at about 18 bytes per parameter before activations: about 2.1 TB for the 120b and 376 GB for the 20b. That gap is why parameter-efficient methods are the normal route.
With LoRA, the base stays frozen and only adapters train. Keeping the 120b in a dequantized BF16 form costs about 234 GB, which fits an 8× H100 node with room for activations. For the 20b, a BF16 base of about 42 GB fits one 80 GB GPU. Plan the budget with LoRA fine-tuning cost.
References: gpt-oss-120b model card · Hugging Face Transformers: GPU memory usage in training · Hugging Face PEFT: LoRA
gpt-oss GPU requirements checklist
Start with the 20b on one 24 or 32 GB card for development. Move to the 120b on one H100 for modest traffic, or an H200 or B200 for more concurrent requests. Keep MXFP4 weights, set --max-model-len to your need, and check runtime support before using Ada or RTX Blackwell cards.
NeuraMesh rents H100, H200, B200 and RTX GPUs by the hour. Choose a GPU, plan, count, hours and region on rent GPUs or start at H100 rental. You receive a confirmed quotation, typically within one business day, and nothing is charged until you approve.
NeuraMesh prices for these GPUs
| GPU | Memory | Data center | Value |
|---|---|---|---|
| RTX 4090 | 24 GB | $0.46 | $0.40 |
| L40S | 48 GB | $1.26 | $0.54 |
| A100 | 80 GB | $1.56 | $0.98 |
| H100 | 80 GB | $2.88 | $2.00 |
Every order is confirmed in a quotation before you pay. See all GPU prices.
Questions readers ask
Can gpt-oss-120b run on a single H100?
Yes. OpenAI’s model card says it fits a single 80 GB GPU such as an H100, thanks to MXFP4 expert weights in a 65 GB checkpoint. Keep context and concurrency modest, and follow vLLM’s memory settings for one H100.
What GPU do I need for gpt-oss-20b?
The card says gpt-oss-20b runs within 16 GB of memory. An RTX 4090 or RTX 5090 handles it for a few users; an L40S or 80 GB GPU serves many more. Ollama lists the build at 14 GB.
What are the gpt-oss GPU requirements on an A100?
vLLM’s recipe says gpt-oss-120b fits one 80 GB A100, using a Triton attention backend and Marlin MXFP4 kernels. It also shows tensor parallel sizes of 2 and 4 on A100 for higher throughput.
Is gpt-oss licensed for commercial use?
Yes. Both models are released under the Apache 2.0 license, which permits commercial use and modification.
Do I need to quantize gpt-oss myself?
No. The official checkpoints already store the expert weights in MXFP4, and OpenAI evaluated the models in that format. Most users should run them as shipped.
Sources and editorial notes
- gpt-oss-120b model card
- gpt-oss-20b model card
- gpt-oss-120b config.json
- gpt-oss-20b config.json
- vLLM design: Hybrid KV cache manager
- vLLM quantized KV cache
- vLLM recipes: GPT-OSS
- NVIDIA H100 specifications
- NVIDIA H200 specifications
- NVIDIA DGX B200 specifications
- NVIDIA A100 specifications
- NVIDIA L40S specifications
- NVIDIA RTX PRO 6000 Blackwell specifications
- NVIDIA GeForce RTX 4090 specifications
- NVIDIA GeForce RTX 5090 specifications
- vLLM documentation: vllm serve CLI arguments
- SGLang supported generative models
- Ollama library: gpt-oss tags
- vLLM serving benchmark options
- Hugging Face Transformers: GPU memory usage in training
- Hugging Face PEFT: LoRA
Primary documentation reviewed November 24, 2026. Provider descriptions reflect published documentation. Recommendations are our analysis; worked figures are illustrative unless explicitly stated otherwise. No independent provider benchmark or uptime ranking is claimed.
Need this GPU? Rent it from NeuraMesh: choose a GPU and plan, get a confirmed quotation, and pay only when you approve. See pricing.


