The Bill for Eight Heads

AttentionHard+30 XP+30

The Bill for Eight Heads

A multi-head self-attention layer is built to this specification:

quantityvalue
width of each token vector coming in288288288
number of heads888
width of each head's query, key and value242424
bias termsnone anywhere

Every head is a complete attention mechanism with its own three projection matrices — no matrix is shared between heads. Each of those matrices turns a 288288288-dimensional token vector into a 242424-dimensional one.

The eight heads run in parallel and their outputs are concatenated. That concatenation is then passed through one final learned matrix, which maps it back to a 288288288-dimensional vector so the layer's output matches its input.

Note that the head width of 242424 is a deliberate choice by this layer's designer, not something to be derived.

How many learned parameters does the whole layer contain?

Give the exact whole number (every entry of every matrix counts as one parameter).

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.