Falcon-7B
TII · Falcon · open weights
- MQA
- RoPE
- Parallel block
Facts and where they come from
| Released | 2023-05 | labmodel cardHF repository created 2023-04; paper Nov 2023 |
|---|---|---|
| Licence | apache-2.0 | config.jsonconfig.jsonREADME metadata: license |
| Total parameters | 7B | labmodel cardREADME: Falcon-7B is a 7B 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
MQA 71q/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) | 6.92B |
|---|---|
| Active per token (modelled) | 6.92B |
| Without embeddings and output head | 6.63B total, 6.63B active |
| Published weights (Hugging Face count) | 7.22B |
| KV cache per token, BF16 (layers that grow with context) | 8 KiB |
| KV cache + state at 128K tokens, BF16 | 1 GiB |
| Decode FLOPs per token at 4K context | 16.2 GFLOP |
| Prefill FLOPs for a 4K prompt | 59.2 TFLOP |
KV cache against context
Every architecture field
| Field | Value | Source |
|---|---|---|
| d_model | 4,544 | 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 | 71 | config.jsonconfig.jsonnum_attention_heads |
| mixers.full.kv_heads | 1 | codemodelling codemulti_query: true |
| mixers.full.head_dim | 64 | codemodelling codehidden_size / num_attention_heads |
| ffns.dense.type | dense | codemodelling codeMLP |
| ffns.dense.d_ff | 18,176 | codemodelling codemodeling_falcon.py: 4 * hidden_size |
| ffns.dense.gated | false | codemodelling codeGELU MLP |
| layout | 32× full/dense | config.jsonconfig.jsonnum_hidden_layers, n_layer |
| norms_per_layer | 1 | codemodelling codeparallel attention and MLP |
Sources
- config.json @ ec89142
- 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