What the √dk actually does

Left: the spread of raw dot products q·k for random unit-variance vectors. Right: the softmax over 8 keys and how much gradient can get through it.

dk = 64
std of scores
1.00
max softmax weight
0.35
‖∂softmax/∂scores‖F
0.40