Skip to content
StackDecode
LLM Library
Dense decoderClosed (API only)Architecture animation

GPT-4

A closed, multimodal model; its architecture has never been officially disclosed.

At a glance

Made by
OpenAI
Released
2023
Type
Dense decoder
Access
Closed (API only)
Parameters
Not published
Active per token
Not published
Context window
8k to 128k tokens (by version)
Attention
Not published

How it works

OpenAI did not publish GPT-4's size or design. Outside reports suggest a mixture of experts, but this is unconfirmed, so it is shown here as a standard stack for illustration only.

Architecture, step by step

This lab has not published the architecture, so this is a generic stack shown for illustration only.

× N layersText inTokenizerEmbedding + positionNormCausal self-attentionAdd (residual)NormFeed-forward (MLP)Add (residual)Final normLM head (vocabulary scores)Softmax, then sample next token

Raw text enters the system, for example "The cat sat on the".

stage:
1/12
part:
Text in
1/12

The green dot is one token travelling through the model. The boxed section repeats for every layer.

What stands out

  • Accepts text and images
  • Strong exams and coding results
  • Architecture not disclosed

Keep in mind

Treat any numbers you see online as rumours.

Related models