Hacker News new | ask | show | jobs
by nialv7 12 days ago
looped transform is such a simple and straightforward idea. a couple of years ago i was thinking about RNN, transformer, the residual flow, and other stuff. and the idea of "why don't we just repeat some of the blocks?" just naturally popped into my head. and i am by no means an machine learning expert. advanced ideas like the gated deltanet etc. fly right over my head.

so this is how transformers work: there is a residual flow which you can think as a flow of information, from the input of the network to the output of the network. each transformer block does pattern matching on information from upstream, adds new information to it and pass it on to the downstream. you can conceptualize this as the network building information from lower level to the higher level: tokens become words, words become phrases, then sentences, then abstract ideas, etc. but the thing is what "level" some information is on quickly becomes muddy. word/phrase/sentence is pretty clear cut, but abstract ideas are not. because transformer goes in a straight line from input to output, this means there will be a lot of duplicate in the middle of the network. and there are a lot of evidences of this, for example, when you quantize a LLM, the middle of the network can usually take way more quantization without much impact on the network's performance.

the solution comes out of the problem quite straightforwardly, since there are duplicates, let's just repeat them.