Attention computation
Change parameters and inspect the actual computation behind attention computation.
| The | cat | sat | |
|---|---|---|---|
| The | 0.401 | 0.198 | 0.401 |
| cat | 0.198 | 0.401 | 0.401 |
| sat | 0.248 | 0.248 | 0.503 |
1Selected row sum
0.802Output component 1
0.599Output component 2
Toy Q=K=V=[[1,0],[0,1],[1,1]]. Compute softmax(QKᵀ/√2/temperature)V. There is no causal mask and no pretrained language model.
Predict the effect of changing a parameter before inspecting the output. Identify the responsible term in the formula and explain how the teaching model differs from a real application.