archdb

LLM architectures and pretraining recipes, with sources.

gpt-oss-120b

OpenAI · reasoning checkpoint

Only the post-trained reasoning checkpoint is public; MoE weights were quantized to MXFP4 during post-training.

Open in the comparison table Hugging Face ↗ Paper ↗

KV calculations use one sequence at 131,072 tokens and 16-bit cache elements. They include bounded sliding-window caches. This is retained cache payload, not peak prefill memory. The comparison table also offers sourced mixed-precision layouts, including quantization scales.

Release

Released

2025-08-05

Source: paper · PDF p.1 title block
August 5, 2025

Weights published on Hugging Face the same day.

Date the weights (or, if earlier, the technical report) were first made public, YYYY-MM-DD, as dated by the publisher. A Hugging Face repository creation date is used only when no dated publisher page exists, with a note.

License

apache-2.0

Source: model-card · README.md YAML front matter
license: apache-2.0

License of the released weights as declared by the publisher (model card metadata or license file), e.g. apache-2.0, mit, or the name of a custom license.

Input modalities

text

Source: paper · §1 Introduction
these text-only models are compatible with our Responses API

Input modalities of the released checkpoint as the publisher states them, from: text, image, video, audio, joined with ' + ' in that order ("text", "text + image + video").

Parameters

Total params

116.8B parameters

Source: paper · PDF p.4 §2, Table 1
Total Parameters 116.83B 20.91B

Total parameter count as reported by the publisher. See params.note for whether embeddings, MTP heads or vision towers are included.

Active params

5.13B parameters

Source: paper · PDF p.4 §2, Table 1
Active Parameters 5.13B 3.61B

Parameters used per token in the forward pass, as reported by the publisher.

Active non-embedding (stated)

4.55B parameters

Inferred from the source; see the explanation below.

Source: paper · PDF p.4 §2, Table 1 caption
Unembedding parameters are counted towards active, but not embeddings.

5.13B − 201,088 × 2,880 (unembedding, counted as active; input embedding not counted) = ~4.55B.

Active parameters excluding the input embedding and the output head (unembedding). Stated by the publisher, or computed from params.active by subtracting vocab × d_model for each of the embedding and output head that params.active is stated to include (basis inferred, note with the arithmetic). Not disclosed when the scope of params.active is not stated.

Counted total params

116.8B parameters

Calculated: embedding + output head + all experts + other weights, openai/gpt-oss-120b@b5c939d safetensors headers; reproduces stated total (backbone) and active (with output head)

Parameters of the text backbone counted from the released checkpoint's safetensors headers (embedding, output head, all experts and other weights; excluding MTP modules, vision/audio towers and n-gram lookup tables). Shown only when the counts reproduce the publisher's stated total and active parameters within 5% under some scope.

Counted embedding + head

1.158B parameters

Calculated: input embedding + output head, openai/gpt-oss-120b@b5c939d safetensors headers

Input embedding plus output head (once if tied), counted from the checkpoint.

Non-emb. params (counted)

115.7B parameters

Calculated: dense + routed backbone weights; excludes input embedding, output head, lookup tables, MTP and other modalities, openai/gpt-oss-120b@b5c939d safetensors headers; reproduces stated total (backbone) and active (with output head)

Language backbone weights excluding input embeddings, output head, lookup/Engram tables, MTP modules and vision/audio towers. Equals params.counted_total minus params.counted_embedding. Same validation as params.counted_total.

Largest layer (counted)

3.213B parameters

Calculated: max(sum of dense and routed weights sharing a full layers.<index> tensor path), all experts included, openai/gpt-oss-120b@b5c939d safetensors headers

Largest group of language-backbone weights sharing a full layers.<index> tensor path, including every routed expert. Excludes lookup/Engram tables, embeddings, output head, MTP and other modalities. Hybrid checkpoints may store mixers and FFNs as separate layers. All-gather volume also depends on wrapping, sharding and dtype.

Active non-emb. (counted)

4.554B parameters

Calculated: non-expert weights + routed experts × 4/128, excluding embedding and output head, openai/gpt-oss-120b@b5c939d safetensors headers; reproduces stated total (backbone) and active (with output head)

Active parameters per token excluding the input embedding and output head, counted from the checkpoint as all non-expert weights plus routed-expert weights × top_k / experts. Same validation as params.counted_total.

Counting scope

Unembedding counted as active, input embedding not; 1.16B embed + unembed.

Source: paper · PDF p.4 §2, Table 1 caption
Unembedding parameters are counted towards active, but not embeddings.

What the publisher's counts include or exclude (MTP modules, embeddings, vision encoder, n-gram tables).

Embedding params

1.16B parameters

Source: paper · PDF p.4 §2, Table 1
Embed + Unembed 1.16B 1.16B

Parameters in input embedding and output head, as reported.

Shape

Layers

36

Source: config · /num_hidden_layers

Number of transformer blocks in the main backbone (attention or token mixer plus FFN), excluding MTP modules.

d_model

2,880

Source: config · /hidden_size

Residual stream width.

Vocab

201,088

Source: config · /vocab_size

Embedding table rows (vocab_size in config, may include padding).

Tied embeddings

No

Source: config · /tie_word_embeddings

Input embedding and output head share weights.

Tokenizer

o200k_harmony: BPE extending o200k (GPT-4o, o4-mini) with harmony chat-format tokens

Source: paper · PDF p.5 §2.3 Tokenizer
This is a Byte Pair Encoding (BPE) which extends the o200k tokenizer used for other OpenAI models such as GPT-4o and OpenAI o4-mini

Tokenizer type and lineage as described by the publisher (e.g. byte-level BPE shared with an earlier model).

d_model / layers

80

Calculated: d_model / layers

Width-to-depth ratio, d_model divided by the number of blocks.

Attention

Token mixers

GQA, SWA

Source: paper · PDF p.4 §2.2 Attention
Following GPT-3, attention blocks alternate between banded window and fully dense patterns [10][11], where the bandwidth is 128 tokens.

Token-mixing layer types in the backbone, e.g. GQA, MLA, SWA, Gated DeltaNet, Mamba-2, DSA (DeepSeek sparse attention).

Layer layout

1 SWA : 1 global

Inferred from the source; see the explanation below.

Source: config · config.json; /layer_types
"layer_types": [ "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention", "sliding_attention", "full_attention" ]

Config /layer_types alternates strictly, starting with a sliding-window layer. Ordered 36-layer backbone from /layer_types; auxiliary modules are excluded.

Token-mixer order, summarized as a pattern or layer positions. The fact's optional sequence lists each mixer in order; a ratio alone does not establish the order. Auxiliary prediction modules and standalone FFNs are excluded.

Global-attention layers

18

Source: config · /layer_types | count full_attention

Layers whose KV cache grows with full context (dense or sparse global attention, MLA). Excludes sliding-window and linear/recurrent layers.

SWA : global

1

Calculated: attn.local_layers / attn.global_layers

attn.local_layers divided by attn.global_layers, the sliding-window to global interleave ratio (5 for '5 SWA : 1 global').

Sliding-window layers

18

Source: config · /layer_types | count sliding_attention

Layers with a fixed attention window.

Query heads

64

Source: config · /num_attention_heads

Query heads in the global-attention layers.

KV heads

8

Source: config · /num_key_value_heads

Key/value heads in the global-attention layers. Not applicable to MLA, whose cache is a shared latent.

Heads × head dim

4,096

Calculated: heads × head_dim

attn.heads × attn.head_dim, the query projection width of global layers.

Q heads / KV head

8

Calculated: heads / kv_heads

attn.heads divided by attn.kv_heads in global layers.

QK head dim

64

Source: config · /head_dim

Query/key dimension per head in global-attention layers (for MLA, nope + rope dims).

Window

128 tokens

Source: config · /sliding_window

Sliding-window size of the local layers.

SWA KV heads

8

Source: config · /num_key_value_heads

Same attribute as the full-attention layers (GptOssAttention.__init__).

KV heads in sliding-window layers (stated even when equal to attn.kv_heads).

SWA query heads

64

Source: config · /num_attention_heads

GptOssAttention reads the same head counts, head_dim and rotary embedding for both layer types; only sliding_window differs.

Query heads in sliding-window layers (stated even when equal to attn.heads).

SWA QK head dim

64

Source: config · /head_dim

Same attribute as the full-attention layers (GptOssAttention.__init__).

Query/key head dimension in sliding-window layers. Value head dimensions may differ; see attn.local_v_head_dim.

Positional encoding

RoPE

Source: paper · PDF p.4 §2.2 Attention
We apply rotary position embeddings [14] and extend the context length of dense layers to 131,072 tokens using YaRN [15].

Positional scheme in global layers: RoPE, partial RoPE, NoPE, or mixed per layer type.

RoPE base

150,000

Source: config · /rope_theta

RoPE base frequency of the global layers at release.

SWA RoPE base

150,000

Source: config · /rope_theta

GptOssModel builds one rotary embedding shared by both layer types.

RoPE base frequency of the sliding-window layers (stated even when equal to attn.rope_theta).

QK norm

No

Source: code · modeling_gpt_oss.py; GptOssAttention.forward
query_states = self.q_proj(hidden_states).view(hidden_shape).transpose(1, 2)

Queries and keys go from projection straight to RoPE; no norm module.

Queries and keys are normalized per head before the dot product.

Attention sinks

learned per-head sink logit in the softmax denominator, all layers

Source: paper · PDF p.4 §2.2 Attention
Each attention head has a learned bias in the denominator of the softmax, similar to off-by-one attention and attention sinks

Learned sink logits or sink bias in the softmax, with the layer types that use them.

QKV bias

Yes

Source: config · /attention_bias

Query/key/value projections have bias terms.

Feed-forward

Activation

SwiGLU

Source: paper · PDF p.4 §2.2 Mixture-of-Experts
The MoE blocks use the gated SwiGLU [9] activation function

FFN activation (SwiGLU, GeGLU, ...).

Activation clamp

gate clamped to ≤7, up clamped to [-7, 7]; output (up + 1) · gate · σ(1.702 · gate); all MoE layers

Source: code · modeling_gpt_oss.py; GptOssExperts._apply_gate
up = up.clamp(min=-self.limit, max=self.limit)

Limit 7.0 from config /swiglu_limit, α 1.702 from GptOssConfig default; the card calls this clamping plus a residual connection (footnote 1).

Clamping of GLU gate / up activations (e.g. SwiGLU limit 7), with the layers it applies to.

FFN bias

Yes

Source: code · modeling_gpt_oss.py; GptOssExperts.__init__
self.gate_up_proj_bias = nn.Parameter(torch.empty(self.num_experts, 2 * self.intermediate_size))

FFN projections have bias terms.

Mixture of experts

Routed experts

128

Source: config · /num_local_experts

Routed experts per MoE layer.

Experts per token

4

Source: config · /num_experts_per_tok

Routed experts selected per token.

Shared experts

0

Source: code · modeling_gpt_oss.py; GptOssMLP.__init__
self.router = GptOssTopKRouter(config) self.experts = GptOssExperts(config)

The MoE block has only a router and routed experts.

Always-on experts per MoE layer.

Expert dim

2,880

Source: config · /intermediate_size

Intermediate width of one routed expert.

Leading dense layers

0

Source: code · modeling_gpt_oss.py; GptOssDecoderLayer.__init__
self.mlp = GptOssMLP(config)

Every decoder layer uses the MoE block.

Number of initial blocks that use a dense FFN instead of MoE.

Router score

softmax (over the top-k selected logits)

Source: paper · PDF p.4 §2.2 Mixture-of-Experts
weight the output of each expert by the softmax of the router projection over only the selected experts.

Router is a linear layer with bias (GptOssTopKRouter).

Gating function over expert logits (softmax, sigmoid).

Load balancing

Not disclosed

Load-balancing method, with coefficients where disclosed.

Renormalize top-k

Yes

Source: paper · PDF p.4 §2.2 Mixture-of-Experts
weight the output of each expert by the softmax of the router projection over only the selected experts.

Softmax after top-k, so selected weights sum to 1.

Selected expert weights are renormalized to sum to 1.

Expert dim / d_model

1

Calculated: moe.expert_dim / d_model

moe.expert_dim divided by shape.d_model.

Sparsity (experts / top-k)

32

Calculated: experts / top_k

Routed experts divided by experts selected per token.

Active / total

0.04391

Calculated: params.active / params.total

params.active divided by params.total.

Multi-token prediction

MTP depth

Not disclosed

Additional future tokens predicted during pretraining (0 when the model was trained without MTP).

Normalization and stability

Norm

RMSNorm

Source: paper · PDF p.4 §2.2
applying root mean square normalization [6] on the activations before each attention and MoE block.

Normalization layer type in the blocks.

Norm placement

pre

Source: paper · PDF p.4 §2.2
Similar to GPT-2 we use Pre-LN placement

Pre-norm, post-norm, or sandwich (pre and post).

Norm epsilon

1e-05

Source: config · /rms_norm_eps

Epsilon of the block normalization layers.

Context length

Pretraining context

Not disclosed

Sequence length of the main pretraining stage.

Trained context

Not disclosed

Longest sequence length trained on after context extension.

Advertised context

131.1K tokens

Source: paper · PDF p.4 §2.2 Attention
extend the context length of dense layers to 131,072 tokens using YaRN [15].

Equals config max_position_embeddings.

Longest context the publisher says the model supports, possibly beyond trained length via RoPE scaling.

Extension method

YaRN on the dense layers to 131,072

Source: paper · PDF p.4 §2.2 Attention
extend the context length of dense layers to 131,072 tokens using YaRN [15].

Config rope_scaling: rope_type yarn, factor 32, original_max_position_embeddings 4096, beta_fast 32, beta_slow 1; HF code applies it to both layer types.

How context was extended (stages, RoPE base change, YaRN factor).

Pretraining recipe

Pretraining tokens

Not disclosed

Tokens seen in pretraining including annealing and context extension, as reported.

Optimizer

Not disclosed

Optimizer used for the bulk of parameters.

Peak LR

Not disclosed

Peak learning rate of the main pretraining stage.

Final LR

Not disclosed

Learning rate at the end of the decay.

LR schedule

Not disclosed

Learning-rate schedule shape with phase boundaries.

Warmup

Not disclosed

Warmup length in steps or tokens.

Batch size

Not disclosed

Global batch size, including any batch-size ramp: sequences × sequence length (token total), or the token total alone when only that is stated.

Weight decay

Not disclosed

Decoupled weight decay coefficient.

Adam betas

Not disclosed

(beta1, beta2) of the Adam-family optimizer or its AdamW fallback.

Grad clip

Not disclosed

Global gradient-norm clipping threshold.

Training precision

Not disclosed

Matmul precision of pretraining (BF16, FP8 recipe, NVFP4 recipe) with the scaling granularity where disclosed. Never inferred from the released checkpoint dtype.

Data mix

text-only, trillions of tokens; STEM, coding, general knowledge; CBRN-filtered with GPT-4o pretraining filters

Source: paper · PDF p.5 §2.4 Pretraining
We train the models on a text-only dataset with trillions of tokens, with a focus on STEM, coding, and general knowledge.

Next sentence: harmful content filtered by reusing the CBRN pre-training filters from GPT-4o.

Pretraining data composition as disclosed (domain shares, synthetic fraction, repetition).

Data cutoff

June 2024

Source: paper · PDF p.5 §2.4 Pretraining
Our model has a knowledge cutoff of June 2024.

Pretraining data cutoff date.

Hardware

NVIDIA H100

Source: paper · PDF p.5 §2.4 Pretraining
The gpt-oss models trained on NVIDIA H100 GPUs using the PyTorch framework

Accelerators used for pretraining, count and duration where stated.

Accelerators

H100

Source: paper · PDF p.5 §2.4 Pretraining
The gpt-oss models trained on NVIDIA H100 GPUs using the PyTorch framework

Accelerator count and type for the main pretraining run, as the count with thousands separators and the chip's short name ("2,048 H800", "2,048 GH200"). A stated range or bound stays as stated ("2,048–4,096 GH200").

Compute

2.1M H100-hours

Source: paper · PDF p.5 §2.4 Pretraining
The training run for gpt-oss-120b required 2.1 million H100-hours to complete

Stated under §2.4 Pretraining as "the training run"; whether post-training is included is not stated.

Pretraining compute as stated (GPU-hours or FLOPs).

KV cache

KV bytes / token

36,900 bytes

Calculated: kv.bytes_at_context / 131072 tokens; uniform BF16, payload only; quantization overhead excluded. Global KV: 18 × (1024 × 16/8) B/entry; SWA KV: 18 × (1024 × 16/8) B/entry

Retained KV cache divided by context length, including bounded SWA caches and indexer keys. Exports use uniform BF16 at 131,072 tokens. The website can select uniform payload precision (no quantization overhead) or sourced component formats (including scales and documented padding). This is cache payload, not peak prefill memory or persistent prefix storage.

Global KV bytes / token

36,864 bytes

Calculated: 36864 B / 1 tokens (Global KV); uniform BF16, payload only; quantization overhead excluded. Global KV: 18 × (1024 × 16/8) B/entry; SWA KV: 18 × (1024 × 16/8) B/entry

Long-context global KV bytes per token, including indexer keys; excludes bounded SWA caches. Compression rates and cross-layer cache reuse are included. Exports use uniform BF16; the website's storage selector also applies here. This is the field to compare with global-KV figures in reports, using the matching storage recipe.

KV bytes / token / B active

7,193 bytes

Calculated: kv.bytes_per_token (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. Global KV: 18 × (1024 × 16/8) B/entry; SWA KV: 18 × (1024 × 16/8) B/entry

kv.bytes_per_token divided by active parameters in billions (131,072 tokens in exports).

KV at context / B active

942,798,596 bytes

Calculated: kv.bytes_at_context (131072 tokens) / (params.active / 1e9); uniform BF16, payload only; quantization overhead excluded. Global KV: 18 × (1024 × 16/8) B/entry; SWA KV: 18 × (1024 × 16/8) B/entry

kv.bytes_at_context divided by active parameters in billions (131,072 tokens in exports).

KV at context

4,836,556,800 bytes

Calculated: 36864 B × 131072 (Global KV) + 36864 B × min(131072, 128) (SWA KV); uniform BF16, payload only; quantization overhead excluded. Global KV: 18 × (1024 × 16/8) B/entry; SWA KV: 18 × (1024 × 16/8) B/entry

Retained KV cache for one sequence at the selected context, including SWA windows and indexer keys. Exports use uniform BF16 at 131,072 tokens. Excludes recurrent state, compressor tail state, draft/MTP caches, temporary prefill tensors, allocator metadata and persistent prefix snapshots. Does not estimate peak prefill or total serving memory.

Evaluations

AA Intelligence Index

12

Source: leaderboard · Artificial Analysis model page /models/gpt-oss-120b, Wayback snapshot 2026-10-19
gpt-oss-120b (High) scores 12 on the Artificial Analysis Intelligence Index

Variant: gpt-oss-120b (High). Index v4.3.2.

Artificial Analysis Intelligence Index v4.3.2 of the post-trained model, from a dated Wayback snapshot of its Artificial Analysis page. The note names the variant (reasoning setting).

All models · Link to this model