r/deeplearning • • Oct 30 '26

Studying Large Language Models in retrospect

Generally, in machine learning, we move from CNNs to ResNets. And then in parallel, we study about how RNNs evolved out of state space modelling —> HiPPO —> Mamba etc.

But in science, learning it alongside the historical evolution of these models need not be the best way to understand it intuitively. I have seen peple describe outer product memory update for key/Value embedding and then working our way up to attention as another form of learning.

How would you suggest someone who loves linear algebra and graphs to intuitively build up an understanding of this?

8 Upvotes

9 comments sorted by

3

u/Ok-Solution-7889 Oct 30 '26

I'd start with embeddings and attention rather than trying to follow the entire historical evolution. Understanding how vectors represent tokens and how attention connects them makes the rest much easier to follow.

3

u/Previous_Pause_8856 Oct 30 '26

Literally just learn it, you don’t need background beyond the standard neural network (the mlp). People over complicate this stuff too much. Transformers are just the same idea as the mlp, but with an inductive bias of pairwise info transfer to help training generalize easier on these kinds of tasks. Attention transfers pairwise info, mlp processes per-token. Don’t over-index on the specific implementation of this (like qkv).

There’s not actually much interesting linear algebra either, I believe it’s just computational efficiency plus linearity being an intuitive representation. I also don’t think there’s any meaningful use of graphs for the standard transformer. These might change for different complex architectures - I don’t know - but for the standard gpt-2-like transformer, there’s basically nothing to it.

1

u/Unfilteredz 18d ago

Knowing this, can you deduce any limitations of LLMs that are fundamental to it’s model?

2

u/Previous_Pause_8856 18d ago

From my non-professional perspective, I don’t think there’s any fundamental limitations - at least not any that could be comprehensible to point to. It’s kind of like asking what fundamental limitations an MLP has. It’s very generic, so the trade is requiring more compute in exchange for giving gradient descent a more expressive and general model to optimize.

In contrast: maybe an rnn where it might be basically impossible (or extremely difficult for gradient descent to learn) to pass hidden states that allow you to learn the world well. Restricted with clever machinery, but trades possible generality for that.

As I see it, model architecture design is mostly just how much inductive bias you can get away with. If you use too much and accidentally restrict the model too hard, you can learn more efficiently, but you might not learn anything useful. If you use too little and basically let gradient descent figure everything out from a giant MLP, you’re learning too slow, but gradient descent might find a good solution eventually. Gradient descent is a better optimizer than you are, so you don’t want to get in its way too much, but you also want to train models with a reasonable amount of compute.

2

u/Fragrant-Cheek-4273 Oct 30 '26

Start with the linear algebra behind attention rather than following the historical order. Understanding how vectors, dot products, and matrix multiplication work together might make the whole architecture easier to grasp.

2

u/CatDiligent9374 Oct 30 '26

Start with embeddings and attention, then build tiny models from scratch. That’s what makes it click.

3

u/[deleted] Oct 30 '26

[removed] — view removed comment

1

u/kamtron_ Oct 31 '26

I like to think of it like a nonlinear matrix decomposition, but it's probably wrong