Falcon-40B
TII · Falcon · open weights
- GQA
- RoPE
- Parallel block
Facts and where they come from
| Released | 2023-05 | config.jsonconfig.jsonHugging Face repository creation date (api.createdAt) |
|---|---|---|
| Licence | apache-2.0 | config.jsonconfig.jsonREADME metadata: license |
| Total parameters | 40B | labmodel cardREADME: Falcon-40B is a 40B parameters causal decoder-only model |
| Active parameters | not disclosed | not disclosed |
| Context length | not disclosed | not disclosed |
| Norm placement | parallel | codemodelling coderepo modeling_falcon.py: parallel attention and MLP |
| Norm type | LayerNorm | codemodelling coderepo modeling_falcon.py: parallel attention and MLP |
| QK-norm | no | codemodelling codeno q/k normalisation in the attention block |
| Positional encoding | RoPE | codemodelling coderotary on the full head (default) |
| Parallel attention and MLP | yes | codemodelling coderepo modeling_falcon.py: parallel attention and MLP |
Architecture, drawn from the data
GQA 128q/8kv. 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) | 41.3B |
|---|---|
| Active per token (modelled) | 41.3B |
| Without embeddings and output head | 40.8B total, 40.8B active |
| Published weights (Hugging Face count) | 41.8B |
| KV cache per token, BF16 (layers that grow with context) | 120 KiB |
| KV cache + state at 128K tokens, BF16 | 15 GiB |
| Decode FLOPs per token at 4K context | 90.7 GFLOP |
| Prefill FLOPs for a 4K prompt | 350 TFLOP |
KV cache against context
Every architecture field
| Field | Value | Source |
|---|---|---|
| d_model | 8,192 | config.jsonconfig.jsonhidden_size |
| vocab | 65,024 | config.jsonconfig.jsonvocab_size |
| tied_embeddings | true | codemodelling codemodeling_falcon.py: lm_head tied to word_embeddings |
| mixers.full.type | attn | codemodelling codeattention |
| mixers.full.heads | 128 | config.jsonconfig.jsonnum_attention_heads |
| mixers.full.kv_heads | 8 | config.jsonconfig.jsonnum_kv_heads |
| mixers.full.head_dim | 64 | codemodelling codehidden_size / num_attention_heads |
| ffns.dense.type | dense | codemodelling codeMLP |
| ffns.dense.d_ff | 32,768 | codemodelling codemodeling_falcon.py: 4 * hidden_size |
| ffns.dense.gated | false | codemodelling codeGELU MLP |
| layout | 60× full/dense | config.jsonconfig.jsonnum_hidden_layers, n_layer |
| norms_per_layer | 1 | codemodelling codeparallel attention and MLP |
Sources
- config.json @ 05ab2ee
- model card
- arXiv 2311.16867
- modelling code · transformers 5.18.0 modelling code, or the model repository's own modelling file at the pinned revision