Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is pretty stupid because the equation for self attention is pretty trivial to the point where it makes sense to just go straight into the math and not play pretend games.

softmax(QK^T/sqrt(dk))V

Q=W_QX K=W_KX V=W_VX

X is a matrix where every column is the embedding of a token.

K and V matrices need to be cached.

Also, you need to calculate all of it, for every layer, even if you just want a single token of output. The tokens after the first token can reuse the K, V embedding matrices and don't have to recalculate everything for on scratch. Causal attention is the concept of masking the calculation so you only have to look at past tokens.

My critique boils down to this: Transformers are too simple to simplify them. You can only lose information if you do that.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: