With query and key dimension , form the score matrix , apply the softmax function row by row, and multiply by the values . If query and key coordinates have independent unit variance, their dot product has variance ; division by keeps that score scale of order one. Optional additive masks exclude forbidden keys before the softmax function.
Articles by others on the same topic
There are currently no matching articles.