Attention Is All You Need
medium 40 minThe 2017 paper that introduced the Transformer.
Numbers that decide
Work out a number when the answer changes what you build.
Work it out
Numbers worth having ready
| Question | Answer |
|---|---|
| Base model shape | 6 + 6 layers, d_model 512, 8 heads of 64, d_ff 2048, 65M parameters |
| Big model | d_model 1024, 16 heads, d_ff 4096, 213M parameters |
| Training | Base 12 h, big 3.5 days, 8 P100 GPUs |
| Results | 28.4 BLEU En-De, 41.8 En-Fr (Table 2) |
| KV bytes per token | 2 × layers × kv heads × head dim × bytes |
| Scores per head per layer | n²: 1,000 tokens give 1 million |
KV cache for a batch