Live data from Hacker News

But what is a GPT? Visual intro to Transformers [video]

youtube.com

11–20 of 56 posts

Re: But what is a GPT? Visual intro to Transformers [video]

#11
post #3

I can't think of anyone better to teach attention mechanism to the masses. This is a dream come true

Incredible. This 3B1B series was started 6 years ago and keeps going today with chapter 5. If you haven't seen the first few chapters, I cannot recommend enough.

Would you be able to compare them to Andrew Ng's course?

Re: But what is a GPT? Visual intro to Transformers [video]

#12
post #3

Earlier quoted context omitted.

Incredible. This 3B1B series was started 6 years ago and keeps going today with chapter 5. If you haven't seen the first few chapters, I cannot recommend enough.

Would you be able to compare them to Andrew Ng's course?

They're not really comparable - if you're wondering if you should do one or the other, you should do both.

Re: But what is a GPT? Visual intro to Transformers [video]

#14
post #6

Earlier quoted context omitted.

Something like this does exist, production systems rarely use greedy search but have more holistic search algorithms. An example is Beam Search: https://www.width.ai/post/what-is-beam-search Essentially we keep a window of probabilities of predicted tokens to improve the final quality of output.

Thanks, that's exactly what I was looking for! Any idea if it's possible to use beam search on local models like mistral? It sounds like the choice of beam search vs say top-p or top-k should be in the software and not embedded, right?

This is actually a great question for which I found an interesting attempt: https://andys.page/posts/llm_sampling_strategies/

(No affiliation)

Re: But what is a GPT? Visual intro to Transformers [video]

#15
post #3

Earlier quoted context omitted.

Incredible. This 3B1B series was started 6 years ago and keeps going today with chapter 5. If you haven't seen the first few chapters, I cannot recommend enough.

Would you be able to compare them to Andrew Ng's course?

The way you compare a technical drawing of a steam engine to The Fighting Temeraire oil painting.

Re: But what is a GPT? Visual intro to Transformers [video]

#17

I've just started this video, but already have a question if anyone's familiar with GPT workings - I thought that these models chose the next word based on what's most likely. But if they choose based on "one of the likely" words, could (in general) that not lead to a situation where the list of predictions for the next word are much less likely? Running possibilities of "two words together", then, would be more bene…

The temperature setting is used to select how rare of a next token is possible. If set to 0 the. The top of the likely list is chosen, if set greater than 0 then some lower probability tokens may be chosen.

It is the part of softmax layer, but not all the time.

Re: But what is a GPT? Visual intro to Transformers [video]

#18
post #6

Earlier quoted context omitted.

Something like this does exist, production systems rarely use greedy search but have more holistic search algorithms. An example is Beam Search: https://www.width.ai/post/what-is-beam-search Essentially we keep a window of probabilities of predicted tokens to improve the final quality of output.

Thanks, that's exactly what I was looking for! Any idea if it's possible to use beam search on local models like mistral? It sounds like the choice of beam search vs say top-p or top-k should be in the software and not embedded, right?

If you use HuggingFace models, then a few simpler decoding algorithms are already implemented for `generate` method of all supported models.

Here is a blog post that describes it: https://huggingface.co/blog/how-to-generate.

I will warn you though that beam search is typically what you do NOT want. Beam search approximately optimizes for the "highest likely sequence at the token level." This is rarely what you need in practice with open-ended generations (e.g. a question-answering chat bot). In practice, you need "highest likely semantic sequence," which is much harder problem.

Of course, various approximations for semantic alignment are currently in the literature, but still a wide open problem.

Re: But what is a GPT? Visual intro to Transformers [video]

#19

If you liked that, Andrej karpathy has a few interesting videos on his channels explaining Neural Networks and their inner workings which are aimed at people who know how to program.

As a reasonably experienced programmer that has watched Andrej's videos the one thing I would recommend is that they not be used as a starting point to learn neural networks but as a reinforcement or enhancement method once you know the fundamentals.

I was ignorant enough to try and jump straight in to his videos and despite him recommending I watch his preceeding videos I incorrectly assumed I could figure it out as I went. There is verbiage in there that you simply must know to get the most out of it. After giving up, going away and filling in the gaps though some other learnings, I went back and his videos become (understandably) massively more valueable for me.

I would strongly recommend anyone else wanting to learn neural networks that they learn from my mistake.

Re: But what is a GPT? Visual intro to Transformers [video]

#20

I've just started this video, but already have a question if anyone's familiar with GPT workings - I thought that these models chose the next word based on what's most likely. But if they choose based on "one of the likely" words, could (in general) that not lead to a situation where the list of predictions for the next word are much less likely? Running possibilities of "two words together", then, would be more bene…

There's a whole bunch of different normalization and sampling techniques that you can perform that can alter the quality or expressiveness of the model, e.g. https://docs.sillytavern.app/usage/common-settings/#sampler-...
Post reply on HN