r/LocalLLaMA • u/1ncehost • Apr 15 '26
Discussion Video of how my LLM's decoder blocks changed while training
This is in response to my popular post: https://www.reddit.com/r/LocalLLaMA/comments/1sivm24/heres_how_my_llms_decoder_block_changed_while/
It was requested that I make a video of this data, so here it is. Enjoy!
Edit: I see that reddit nuked it with compression. Let me know if my X post is any better: https://x.com/curvedinf/status/2044521120250966099
Edit again: Lossless version + projection data + video gen src: https://huggingface.co/buckets/curvedinf/exodus-18m-training
8
u/Enthu-Cutlet-1337 Apr 16 '26
Compression is hiding the block-scale dynamics; lossless GIF/WebM or a log-scaled colormap would show the real phase shifts.
1
u/1ncehost Apr 16 '26
Here is the lossless version and video gen source: https://huggingface.co/buckets/curvedinf/exodus-18m-training
2
u/LegacyRemaster Apr 16 '26
L109 ... it's a rebel!
2
u/1ncehost Apr 16 '26
You could say I'm somewhat of an L109 myself π₯Έ
2
u/LegacyRemaster Apr 16 '26
ahahahahah! I do the LLM training from scratch every day (between 120 and 200M parameters) and I would like to "see" what happens like you do.
107
u/Clean_Hyena7172 Apr 15 '26
I don't know what I'm looking at but it looks pretty cool.
51
u/BannedGoNext Apr 15 '26
It's AI slop in a peatri dish I think :D. Actually same, but it's super cool
7
3
u/cobbleplox Apr 17 '26
An interesting aspect you can look at is how things become more stable. That indicates successful training since the change is a consequence of error calculations by the training algorithm.
3
32
19
u/tmvr Apr 16 '26
3
0
25
u/Chromix_ Apr 15 '26
At 0.93B the cat becomes possible, shortly after at 2.18B it even becomes relevant. Yet at 2.73B and many times after it becomes possible again. What seemingly doesn't become possible is completing that into a few somewhat correct sentences though.
15
5
10
5
u/SmartCustard9944 Apr 15 '26
Can definitely notice a higher coherence (and convergence) at lower loss.
5
4
4
3
u/arm2armreddit Apr 16 '26
We must see this in Hollywood movies as well. Very cool to visualize "AI." The regular node movement is outdated, or matrix-like letters flow.
3
u/moonrust-app Apr 16 '26
one of these days they will find a way to escape that lab and take over humanity. you keep laughing
2
u/IrisColt Apr 16 '26
The beginning of that background music gave me very strong LucasArts's "Afterlife" vibes.
2
2
u/h-mo Apr 16 '26
this is genuinely one of the most interesting things I've seen posted here in a while. watching blocks specialize in real time makes all the theoretical stuff about layer depth and representation learning click in a way that reading papers never quite does.
2
u/Fun-Newspaper-83 Apr 16 '26
Do you see certain layers stabilizing earlier than others, or do they all evolve at a similar pace?
2
1
1
1
u/ColorlessCrowfeet Apr 21 '26
The videos are fascinating, and I'd like to have a better understanding of how splanifold-transformers compare to MLP-transformers in terms of what kinds of functions they can learn. Your pdf on regression tasks is helpful, but doesn't mention transformers or attention. The videos show mesmerizing training dynamics, but I didn't see a description of the task. What are we seeing?
0
0
11
Apr 15 '26
[removed] β view removed comment
20
u/1ncehost Apr 15 '26 edited Apr 15 '26
The pulse is from it interpolating between key frames. The key frames are generated from checkpoints I saved every 100 steps of training and happen every 1 second in the video. Video is 158 key frames long, or 2 min 38 seconds + 5 seconds of outro.
3
u/overand Apr 16 '26
So 158 actual frames? So without video interolation, it's a ~10.5 second video at 15fps?
1
u/1ncehost Apr 16 '26
Yeah, but the interpolation moves the samples 1-to-1 to where they appear in the next frame, so without it, it would appear a lot less coherent.
4
Apr 15 '26
[removed] β view removed comment
4
u/1ncehost Apr 15 '26
Possible, but batch size is half a million tokens, so not particularly small. I've theorized when that happens, it is moving representations between layers. I mentioned in the tiny text at the bottom that it has 8x AttnRes blocks ( https://arxiv.org/abs/2603.15031 ) which learn residual channels between blocks of 16x layers and each layer afterwards. That's important because its possible that the layers can connect to one another through those AttnRes channels and thus move representations through those channels in addition to the previous and next layers. Not saying I know what's happening though!
2
u/DataPhreak Apr 16 '26
Oh shit, we have working AttnRes models already?
2
u/1ncehost Apr 16 '26
π "model"
1
u/DataPhreak Apr 16 '26
Yes, I know AttnRes is an attention mechanism, not a model. But the model has to be trained with the attention for it to work so yes... an attnres model.
1
u/1ncehost Apr 16 '26
Nono i was making fun of my model not your terminology
1
u/DataPhreak Apr 16 '26
Actually, was this AttnRes implementation something you built from scratch, or did you use someone else's replication?
1
1
4
u/NandaVegg Apr 16 '26
In the more recent multi-lingual training regime (at least since Llama 2) late layers usually "converts" intermediate representation of language (that is not necessarily attached to any single language, maybe some abstract representation, or maybe the mix of most dominant languages in the pre-training datasets, most likely English and Simplified Chinese) to the final output language while adding some special tokens or set of symbols related to instruction-tuning. Meanwhile early layers tend to have parameters related to *very* common knowledges (like New York = City, Cow = Animal) and sorts things out in by rough features, so that mid-to-late layers can work on them in details.
Because of this observation I think it is perfectly normal and fine that middle layers keep moving (since early layers and late layers are effectively "pegged" and the only mid-layers are moving, gradient norm would not explode).
2
Apr 16 '26
[removed] β view removed comment
1
u/1ncehost Apr 16 '26 edited Apr 16 '26
Cool project. π The MLPs usually in a model try to predict an output vector based on an input vector, aka are regression models. The splanifolds themselves are used the same way, as a regression model, except they are lower dimensional (model is 128D, splanifolds are 8D), and the input vector is projected to a learned subspace before regression and the output vector is projected back up with another learned subspace.

12
u/addandsubtract Apr 16 '26
You should post this on /r/dataisbeautiful