Large Language Models from scratch
Graphics in 5 Minutes3 HN recommenders · 2023–2024
375K views · explainer · evergreen · Uploaded 2022-07-17
A short cartoon explaining how language models like ChatGPT work, from autocomplete and conditional probabilities to neural networks, gradient descent and backpropagation. It shows how networks act as universal function approximators.
HN recommends it as a quick, non-dumbed-down way to get up to speed on how LLMs are built.
2:25:52The spelled-out intro to neural networks and backpropagation: building micrograd
Andrej Karpathy
18:40But what is a neural network? | Deep learning chapter 1
3Blue1Brown
1:30:28AlphaGo - The Movie | Full award-winning documentary
Google DeepMind
27:14Transformers, the tech behind LLMs | Deep Learning Chapter 5
3Blue1Brown
51:22USENIX Security '18-Q: Why Do Keynote Speakers Keep Suggesting That Improving Security Is Possible?
USENIX
1:08:40Lecture 1 | Machine Learning (Stanford)
Stanford
5:58MarI/O - Machine Learning for Video Games
SethBling
3:31:24Deep Dive into LLMs like ChatGPT
Andrej Karpathy
5 comments from Hacker News
> What is so unserious, disingenuous, and illegitimate about the “system”? Some examples (I could write indefinitely): [LINK] (section "Bank Error In Our Favor" is particularly offensive, to me) [LINK] (this sort of thing (which is fairly common) is offensive to me, as is our culture's complacency towards it) How it is (in part) perpetuated, in my estimation: - I’m sure whatever the system is it isn’t perfect. But here I am using the “system” and living my life. [rationalization] - I see so many strange comments on the internet that sound like “red-pilled” nonsense. [training-based heuristic pattern matching to ~bad/dumb/wrong] - Could it be better and is there room for improvement? Absolutely. But living in parallel red pill reality is an absolutely unhelpful endeavor . [training-based heuristic pattern matching to ~bad/dumb/wrong + cultural normalization of hallucination of reality (in this case: the future)] - After-all, you use the real system to have a life and so does everyone else. Might as well face that fact and truly engage with flesh and blood in the meat space rather than whatever or whoever is on red pill virtual land. [Stay within the Overton Window of ideas and behaviors one has been trained on] > Where would you rather be and what is your improvement on the “system”? a) How about something like "The contents of the tin (upon substantial, fine-grained inspection) matches what's on the label"? b) we shall see, maybe > If you have a good personal value propositio
If anyone is looking for a quick overview of how LLMs are built, I highly recommend this video by Steve Seitz: [VIDEO] . It does an excellent job of taking you from 0 to a decent understanding without dumbing down the content or abusing analogies.
Consider the following frame/time from the video: [VIDEO] At this point in time in the video, we see the following 3 things: 1) Fourier Series 2) Taylor Series 3) Neural Network The remainder of the video goes on to show how Neural Networks can approximate functions -- much like the Fourier Series and Taylor Series can... Now, I don't hold an advanced Ph.D. degree in Math, and prior to watching this video, I had never made the connection between Fourier Series, Taylor Series, and Neural Networks... I knew about each of those independently -- but prior to watching the video, I never made the connection that they can be used to approximate one another. And that's the one of the key words -- approximate . The other key word is Identity -- as in Mathematical Identity ... That's because IF two Mathematical Objects (functions, algorithms, call them what-you-will) are approximately equal -- then there should be a set of conditions (i.e., "If and only if...", etc.), a set of rigorously defined mathematical constraints which, if those conditions/constraints are met, then the two Mathematical Objects are exactly precisely equivalent -- under those rigorously defined conditions/constraints.... In other words, under those rigorously defined conditions/constraints -- one Mathematical Object could be substituted for another -- with no loss of precision or result. In other words, under those rigorously defined conditions/constraints -- those two completely apparently different Mathematical
Not sure I can give an ELI5 explanation, but for me this the closest to what you are after in two short videos on the topic. At least they helped me get up to speed fast. Hope they will do the same for you ;-) Large Language Models from scratch [VIDEO] Large Language Models: Part 2 [LINK]
(Note: I am a different Human than the one you are replying to - apologies for interjecting.) > "Physically preventable" is a moving target. So are rockets and artillery shells, but check this out: [LINK] Humans can be very clever and generous ($60,000 USD per interceptor missile, hoo baby!! Is "democracy" not the greatest thing ever!!!???) when they set their minds to something. Unfortunately, delusion, untruthfulness, deceit, misdirection, etc are also somethings , and apparently very desirable somethings, seemingly irresistible to some. > The more resources are invested in preventing currently preventable deaths, the more farther away the target moves, because more and more causes of death become preventable. Something seems off here - when you say "farther away", what is the unit of measure? To make sense (if you can pardon the colloquialism) of this argument, I think it would help if you gave a quantitative example to prove that your fact is actually factual. My intuition is that you may be conflating [1] physical death (concrete) with causes of death (abstract). > So, this is a false argument. A problem for you - some of us know of this phenomenon: [LINK] ... and not just abstractly . There is a very interesting tangential conversation related to this seemingly [1] minor distinction - perhaps some day (some) Humans will have such conversations. I suspect this ("this 'is' [1] a false argument") may be another one of those not actually factual facts. [LINK] > There's no p