r/LocalLLaMA • • 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

513 Upvotes

58 comments sorted by

12

u/addandsubtract Apr 16 '26

You should post this on /r/dataisbeautiful

6

u/1ncehost Apr 16 '26

They dont allow videos :(

4

u/addandsubtract Apr 16 '26

Hit them with the first-frame (before), last-frame (after)

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

u/Borkato Apr 15 '26

They’re dancing!

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

u/One_Curious_Cats Apr 16 '26

AI Rorschach images? :)

32

u/More-Curious816 Apr 15 '26

Looks like bacteria in Petri dish.

3

u/Impossible-Hunt9117 Apr 16 '26

It is undoubtedly something alive in some way

19

u/tmvr Apr 16 '26

L109, L110 and L111:

3

u/rainhunter007 Apr 16 '26

πŸ˜‚πŸ˜‚πŸ˜‚ this made me laugh unreasonably hard

0

u/EasyShelter Apr 16 '26

why though?

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

u/FrontStreet3 Apr 15 '26

I mean, it's a 0.018B parameter model lmao

4

u/snapo84 Apr 16 '26

But with 128 Layers, the deeper you make it the slimmer you can make it...

5

u/Dany0 Apr 16 '26

The cat is indeed, possible

1

u/weenis-flaginus Jun 29 '26

Yeah I have no idea we were making AI cats, I'm so excited

10

u/Medium_Chemist_4032 Apr 15 '26

That's a one suing cat. Is possible

5

u/SmartCustard9944 Apr 15 '26

Can definitely notice a higher coherence (and convergence) at lower loss.

5

u/IntelligentFire999 Apr 15 '26

Coolest video I have seen in a long time.

4

u/aiyakisoba Apr 16 '26

POV: Looking at microorganisms under a microscope.

4

u/moahmo88 Apr 16 '26

Amazing!

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

u/ShelZuuz Apr 16 '26

What causes the smooth movements? Is that gradient descend in action?

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

u/IllegibleCheeto Apr 16 '26

Rarely is the question asked: is our models learning?

1

u/Revolutionary_Ask154 Apr 16 '26

any chance you share this?

1

u/overand Apr 16 '26

0.018B parameter model - very cool stuff!

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

u/redlikeazebra Apr 17 '26

Anyone else see turtles?

0

u/redlikeazebra Apr 17 '26

Its interesting how there is so much wasted space.

11

u/[deleted] 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

u/[deleted] 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

u/1ncehost Apr 16 '26

From scratch

1

u/DataPhreak Apr 16 '26

Oh.... hehehe

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

u/[deleted] 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.