h\mathbf{h}

Activations

The numbers a model computes as it runs: every intermediate vector between the input and the output. Unlike weights, they change with every input.

Weights are what the model knows; activations are what it is thinking about this input. They are tensors too, usually of shape B×N×dmodelB \times N \times d_{\text{model}} between layers. Training keeps them in memory so backpropagation can use them, which is why a long sequence costs memory even when the model is small. Section 24.2 shows why activations are harder to quantize than weights.

Do not confuse this with an activation function such as GELU, the nonlinearity applied inside the feed-forward network.

Example

X∈RN×dmodel  →  block1  →  h(1)  →  block2  →  ⋯X \in \mathbb{R}^{N \times d_{\text{model}}} \;\to\; \text{block}_1 \;\to\; \mathbf{h}^{(1)} \;\to\; \text{block}_2 \;\to\; \cdots

Each block reads activations and writes new ones of the same shape.

Where the course uses it

Related terms