Hacker News new | ask | show | jobs
by cmrdporcupine 15 days ago
Goes a couple or three times through the same weights in a middle layer of the model. Nemotron's Dory pioneered this I think. Seems to give better results with smaller models.

Not sure the impact on kvcache though.

1 comments

I believe someone found out (DIY style) that looping a couple of layers (found through trial and error) in ordinary LLM's yielded some benefits quite a while ago. it was a surprise as there was no looping during training.

then there was a fully looped model (forget the name) where all the layers were looped (which is an obvious mistake as it's known LLM's have token processing and reasoning stages) and showed some decent results.

and now the concept worked itself into the mainstream.

Yes, the DIY “LLM neurosurgery”: https://dnhkng.github.io/posts/rys/

The Show HN of someone applying this recently, through layer duplication: https://news.ycombinator.com/item?id=47431671

There’s definitely closely related works in research, but it’s not the only example that I think blew up thanks to DIYers.

For example, stretching LLM context window through stretching RoPE was discovered by /u/kaiokendev on the original Llama in 2023, and then improved by various members, including YaRN (from EleutherAI and Nous Research), whose paper acknowledges r/localllama users.

Hi, I'm the blogger who did the RYS work.

Yep, the goal of that research was to figure out why Goliath worked, and is it could be exploited to make more intelligent models. It wasn't trial and error, but a brute-force combinatorial search, with cheap proxy tests.

I think it could be taken a lot further, but needs a lot more compute (which I don't have). The work was done on 2 relatively cheap-at-the-time 4090s back in 2024.

No job offers from the AI labs that now use the idea though. I did get an invite to joins the MATS program, so I'll be flying over from Germany to Berkeley next year :)

There's a lot of interesting work around this going back a little while. It's spiritually inline with the thinking around RNNs, which date back further. The Universal Transformer (2018) is the first research paper I'm familiar with that really pushed the idea as applied to transformer models, but I'm sure there are others (as is the case with everything in deep learning, someone tried it 8 years before you using different nomenclature).

If you're curious, it's a very cool paper! https://arxiv.org/html/1807.03819v1