PaLM 540B
Google · PaLM · closed weights
- MQA
- RoPE
- Parallel block
Facts and where they come from
| Released | 2022-04 | paperpaperarXiv v1, April 2022 |
|---|---|---|
| Licence | proprietary | labpaperweights not published |
| Total parameters | 540B | paperpaperTable 1: 540.35B parameters |
| Active parameters | not disclosed | not disclosed |
| Context length | 2K tokens | paperpaper§3: sequence length 2048 |
| Norm placement | parallel | codemodelling codePaLM paper §2: parallel layers |
| Norm type | LayerNorm | codemodelling codePaLM paper §2: parallel layers |
| QK-norm | no | codemodelling codeno q/k normalisation in the attention block |
| Positional encoding | RoPE | paperpaper§2: RoPE embeddings |
| Parallel attention and MLP | yes | codemodelling codePaLM paper §2: parallel layers |
Architecture, drawn from the data
MQA 48q/1kv. Each column is one layer: its token mixer above, its feed-forward block below. Paler columns reuse another layer’s keys and values.
Modelled costs
From the cost model, batch size 1. Totals the lab states are in the table above; differences come from rounding, from what a lab counts, or from parts the model does not describe (listed on the about page).
| Parameters (modelled) | 540B |
|---|---|
| Active per token (modelled) | 540B |
| Without embeddings and output head | 536B total, 536B active |
| KV cache per token, BF16 (layers that grow with context) | 118 KiB |
| KV cache + state at 2K tokens, BF16 | 236 MiB |
| Decode FLOPs per token at 4K context | 1.1 TFLOP |
| Prefill FLOPs for a 4K prompt | 4.44 PFLOP |
KV cache against context
Every architecture field
| Field | Value | Source |
|---|---|---|
| d_model | 18,432 | paperpaperTable 1: d_model 18432 |
| vocab | 256,000 | paperpaper§2: SentencePiece vocabulary with 256k tokens (256,000 assumed) |
| tied_embeddings | true | paperpaper§2: shared input-output embeddings |
| mixers.full.type | attn | codemodelling codeattention block |
| mixers.full.heads | 48 | paperpaperTable 1: 48 heads |
| mixers.full.kv_heads | 1 | paperpaper§2: multi-query attention (one key/value head) |
| mixers.full.head_dim | 256 | paperpaperTable 1 caption: head size always 256 |
| ffns.dense.type | dense | codemodelling codeMLP block |
| ffns.dense.d_ff | 73,728 | paperpaperTable 1 caption: d_ff always 4 x d_model |
| ffns.dense.gated | true | codemodelling codeMLP: gated (SwiGLU/GeGLU) |
| layout | 118× full/dense | paperpaperTable 1: layers 118 |
| norms_per_layer | 1 | codemodelling codeparallel block: one norm feeds attention and MLP |
Sources
- paper · PaLM: Scaling Language Modeling with Pathways
- modelling code · transformers 5.18.0 modelling code, or the model repository's own modelling file at the pinned revision