LSTM is dead. Long Live Transformers!
Seattle Applied Deep Learning4 HN recommenders · recommended in 4 months, 2020-2023
540K views · 6 years ago · lecture · evergreen
Leo Dirac explains how transformer models have replaced LSTMs in NLP. He gives background from bag of words through RNNs and LSTMs, then a technical deep dive into multi-headed self-attention and positional encoding, with sample code.
Recommended as a clear explanation of why RNNs fall short and how transformers solve it.
27:14Transformers, the tech behind LLMs | Deep Learning Chapter 5
3Blue1Brown
11.6M views • 2 years ago
20:39AI Language Models & Transformers - Computerphile
Computerphile
354K views • 7 years ago
26:10Attention in transformers, step-by-step | Deep Learning Chapter 6
3Blue1Brown
4.8M views • 2 years ago
1:56:20Let's build GPT: from scratch, in code, spelled out.
Andrej Karpathy
8.2M views • 3 years ago
8:25Large Language Models from scratch
Graphics in 5 Minutes
375K views • 4 years ago
3:31:24Deep Dive into LLMs like ChatGPT
Andrej Karpathy
10.2M views • 1 year ago
27:07Attention Is All You Need
Yannic Kilcher
814K views • 8 years ago
39:43Do we need Attention? - Linear RNNs and State Space Models (SSMs) for NLP
Sasha Rush
35K views • 3 years ago
1:22:38CS480/680 Lecture 19: Attention and Transformer Networks
Pascal Poupart
374K views • 7 years ago
42:40State of GPT | BRK216HFS
Microsoft Developer
785K views • 3 years ago
2:13:35Let's build the GPT Tokenizer
Andrej Karpathy
1.3M views • 2 years ago
1:31:13A Hackers' Guide to Language Models
Jeremy Howard
580K views • 3 years ago
37:20But how do AI images and videos actually work? | Guest video by Welch Labs
3Blue1Brown
2.2M views • 1 year ago
59:48[1hr Talk] Intro to Large Language Models
Andrej Karpathy
4.3M views • 2 years ago
1:07:09Richard Sutton – Father of RL thinks LLMs are a dead end
Dwarkesh Patel
804K views • 1 year ago
25:57GPT3: An Even Bigger Language Model - Computerphile
Computerphile
446K views • 6 years ago
57:21An Observation on Generalization
Simons Institute for the Theory of Computing
210K views • 3 years ago
1:57:45The spelled-out intro to language modeling: building makemore
Andrej Karpathy
1.3M views • 4 years ago
1:11:41Lecture 1 | Natural Language Processing with Deep Learning
Stanford University School of Engineering
820K views • 9 years ago
9:05Speech Recognition Breakthrough for the Spoken, Translated Word
Microsoft Research
1M views • 14 years ago
5 comments from Hacker News
I don't think you really want a 5yo's version, because that's "computers can be smart". But for an SDE1-level explanation I made this video which has gotten tons of compliments and keeps people watching year after year: ▶ this video It's in the context of NLP, which is where transformers started of course.
I'm not sure I understand it well enough to say but watching a video on it [0] I think there were a few key points: * "Attention is all you need" introduced positional encoding which allows you to keep context of the word, allowing for more complex translation (and thus generative/chatgpt like tasks?) because words now have context relative to each other. Contrast this with "bag of words" models that only tells you whether the word is present or not. * I don't quite understand why but transformers (which "AiaYN" introduced) can be made fully parallel, compared with the RNN/LSTM networks which has to be serial per token. Fully parallel allows for GPU optimization, which means you can take advantage of Moore's law for training. I'm always a bit suspicious when people claim a breakthrough of this sort. There's no doubt that better algorithms give better results but how much is due to just faster computers, cheaper compute, memory, etc. [0] ▶ this video
The attention mechanism started as a simple trick to not use recurrent neural networks. Read the intro in the original paper "Attention is all you need paper" ( link ) This video explains the drawbacks to RNNs and how transformers solve that: ▶ this video Andrej Karpathy explains attention here: link He explains how attention is seen as a communication network: link
Yannic Kilcher is great but this video worked better for me: "LSTM is dead. Long live transformers!" (Leo Dirac): ▶ this video
I've just recently been on a journey to understand transformers in and out, here are the resources I've found managed to drill it into my head: 1. Chapters 7, 9, 10 link This was really useful to really build up to the concepts of attention (although the actual attention section is still brief). 2. link This was great for visualization and understanding that attention wasn't exclusively for transformers and actually was for RNNs first. 3. link Getting to understand how transformers actually work visually. 4. ▶ this video This lecture by Leo Dirac was extremely helpful to finish off with, not only because it actually includes some pseudocode but it also revisits some key topics and covers why transformers are needed. One of the big confusion points for me was that the concept of ATTENTION and SELF-ATTENTION are not the same thing. Hope this helps.