Live data from Hacker News

Visualizing Attention, a Transformer's Heart [video]

3blue1brown.com

111–120 of 181 posts

Re: Visualizing Attention, a Transformer's Heart [video]

#111
Is there a reference which describes how the current architecture evolved? Perhaps from very simple core idea to the famous “all you need paper?”

Otherwise it feels like lots of machinery created out of nowhere. Lots of calculations and very little intuition.

Jeremy Howard made a comment on Twitter that he had seen various versions of this idea come up again and again - implying that this was a natural idea. I would love to see examples of where else this has come up so I can build an intuitive understanding.

Re: Visualizing Attention, a Transformer's Heart [video]

#112

Earlier quoted context omitted.

I don't know why you seem to have such a bone to pick with transformers but imo it's still interesting to learn about it, and reading your dismissively toned drivel of "just" and "simply" makes me tired. You're barking up the wrong tree man, what are you on about.

No issue with transformers -- the entire field of statistical learning, decision trees to NNs, do the same thing... there's no mystery here. No person with any formal training in mathematical finance, applied statistics, hard experimental sciences on complex domains... etc. would be taken in here. I'm trying my best to inform people who are interested in being informed, against an entire media ecosystem being played…

“There’s no mystery here”

Nobody’s claiming there’s ‘mystery’. Transformers are a well known, publicly documented architecture. This thread is about a video explaining exactly how they work - that they are a highly parallelizable approach that lends itself to scaling back propagation training.

“No person with … formal training … would be taken in here”

All of a sudden you’re accusing someone of perpetuating a fraud - I’m not sure who though. “Ad companies”?

Are you seriously claiming that there hasn’t been a qualitative improvement in the results of language generation tasks as a result of applying transformers in the large language model approach? Word frequencies turn out to be a powerful thing to model!

It’s ALL just hype, none of the work being done in the field has produced any value, and everyone should… use ‘statistical dashboards’ (whatever those are)?

Re: Visualizing Attention, a Transformer's Heart [video]

#114
post #110

Earlier quoted context omitted.

If the NN learns the game, that is itself an existence proof of the opposite, (by obvious information-theoretic arguments). Training is supervised, so you don't need bare sets of moves to encode the rules; you just need a way of subsetting the space into contrast classes of valid/invalid. It's a lie to say the "data" is the moves, the data is the full outcome space: ({legal moves}, {illegal moves}) where the moves ar…

> It's a lie to say the "data" is the moves, the data is the full outcome space: ({legal moves}, {illegal moves}) There is nothing about illegal moves provided to othellogpt as far as I'm aware. > Complete information about the game is provided to the NN. That is not true. Where is the information that there are two players provided? Or that there are two colours? Or how the colours change? Where is the information a…

How do you think the moves are represented?

All abstract games of this sort are just sequences of bit patterns, each pattern related to the full legal space by a conditional probability structure (or, equivalently, as set ratios).

Strip away all the NN b/s and anthropomorphic language and just represent it to yourself using bit sets.

Then ask: how hard is it to approximate the space from which these bit sets are drawn using arbitrarily deep conditional probability structures?

it's trivial

the problem the author sets up about causal structures in the world cannot be represented as a finite sample of bit set sequences -- and even if it could, that isnt the data being used

the author hasn't understood the basics of what the 'world model' problem even is

Re: Visualizing Attention, a Transformer's Heart [video]

#115
post #42

Here's a compelling visualization of the functioning of an LLM when processing a simple request: https://bbycroft.net/llm This complements the detailed description provided by 3blue1brown

When visualised this way, the scale of GPT-3 is insane. I can't imagine what 4 would like here.

IIRC, GPT-4 would actually be a bit _smaller_ to visualize than GPT3. Details are not public, but from the leaks GPT-4 (at least, some by-now old version of it) was a mixture of expert, with every model having around 110B parameters [1]. So, while the total number of parameters is bigger than GPT-3 (1800B vs. 175B), it is "just" 16 copies of a smaller (110B) parameters model. So if you wanted to visualize it in any meaningful way, the plot wouldn't grow bigger - or it would, if you included all different experts, but they are just copies of the same architecture with different parameters, which is not all that useful for visualization purposes.

[1] https://medium.com/@daniellefranca96/gpt4-all-details-leaked...

Re: Visualizing Attention, a Transformer's Heart [video]

#116

Earlier quoted context omitted.

Yes, it's really hard -- the innovation is aligning the really basic dot-product similarity mechanism to hardware. You can use basically any NN structure to do the same task, the issue is that they're untrainable because they arent parallizable. There is no innovation here in the sense of a brand new algorithm for modelling conditional probabilities -- the innovation is in adapting the algorithm for GPU training on t…

I don't know why you seem to have such a bone to pick with transformers but imo it's still interesting to learn about it, and reading your dismissively toned drivel of "just" and "simply" makes me tired. You're barking up the wrong tree man, what are you on about.

Somebody's judgment weights need to be updated to include emoji embeddings.

Re: Visualizing Attention, a Transformer's Heart [video]

#117
What I'm now wondering about is how intuition to connect completely separate ideas works in humans. I will have very strong intuition something is true, but very little way to show it directly. Of course my feedback on that may be biased, but it does seem some people have "better" intuition than others.

Re: Visualizing Attention, a Transformer's Heart [video]

#118
post #31

I have found the youtube videos by CodeEmporium to be simpler to follow https://www.youtube.com/watch?v=Nw_PJdmydZY Transformer is hard to describe with analogies, and TBF there is no good explanation why it works, so it may be better to just present the mechanism, "leaving the interpretation to the viewer". Also, it's simpler to describe dot products as vectors projecting on one another

The explanation is just that NNs are a stat fitting alg learning a conditional probability distribution, P(next_word|previous_words). Their weights are a model of this distribution. LLMs are a hardware innovation: they make it possible for GPUs to compute this at scale across TBs of data. Why does, 'mat' follow from 'the cat sat on the ...' because 'mat' is the most frequent word in the dataset; and the NN is a model…

> Why does, 'mat' follow from 'the cat sat on the ...'

You're confidently incorrect by oversimplifying all LLMs to a base model performing a completion from a trivial context of 5 words.

This is tantamount to a straw man. Not only do few people use untuned base models, it completely ignores in-context learning that allows the model to build complex semantic structures from the relationships learnt from its training data.

Unlike base models, instruct and chat fine-tuning teaches models to 'reason' (or rather, perform semantic calculations in abstract latent spaces) with their "conditional probability structure", as you call it, to varying extents. The model must learn to use its 'facts', understand semantics, and perform abstractions in order to follow arbitrary instructions.

You're also confabulating the training metric of "predicting tokens" with the mechanisms required to satisfy this metric for complex instructions. It's like saying "animals are just performing survival of the fittest". While technically correct, complex behaviours evolve to satisfy this 'survival' metric.

You could argue they're "just stitching together phrases", but then you would be varying degrees of wrong:

For one, this assumes phrases are compressed into semantically addressable units, which is already a form of abstraction ripe for allowing reasoning beyond 'stochastic parroting'.

For two, it's well known that the first layers perform basic structural analysis such as grammar, and later layers perform increasing levels of abstract processing.

For three, it shows a lack of understanding in how transformers perform semantic computation in-context from the relationships learnt by the feed-forward layers. If you're genuinely interested in understanding the computation model of transformers and how attention can perform semantic computation, take a look here: https://srush.github.io/raspy/

For a practical example of 'understanding' (to use the term loosely), give an instruct/chat tuned model the text of an article and ask it something like "What questions should this article answer, but doesn't?" This requires not just extracting phrases from a source, but understanding the context of the article on several levels, then reasoning about what the context is not asserting. Even comparatively simple 4x7B MoE models are able to do this effectively.

Re: Visualizing Attention, a Transformer's Heart [video]

#119

Is there a reference which describes how the current architecture evolved? Perhaps from very simple core idea to the famous “all you need paper?” Otherwise it feels like lots of machinery created out of nowhere. Lots of calculations and very little intuition. Jeremy Howard made a comment on Twitter that he had seen various versions of this idea come up again and again - implying that this was a natural idea. I would…

karpathy gave a good high-level history of the transformer architecture in this Stanford lecture https://youtu.be/XfpMkf4rD6E?si=MDICNzZ_Mq9uzRo9&t=618

Re: Visualizing Attention, a Transformer's Heart [video]

#120

Earlier quoted context omitted.

If learning in real life over 5-20 years shows the same result as a LLM being trained by billions of tokens, than yes it can be compared. And there are a lot of people out there who do not a lot of reasoning. After all optical illusions exist, our brain generalizes. The same thing happens with words like the riddle about the doctor operating on a child were we discover that the doctor is actually a female. And while…

I don't know what your motivation in comparison is; mine is science, ie., explanation. I'm not interested that your best friend emits the same words in the same order as an LLM; i'm more interested that he does so because he enjoys you company whereas the LLM does not. Engineer's overstep their mission when they assume that because you can substitute one thing for another, and sell a product in doing so, that this is…

My thinking is highly influenced by brain research.

We don't just talk about a LLM we talk about a neuronal network architecture.

There is a direct link to us (neural networks)

Post reply on HN