Transformers Explained: Attention, Math and How LLMs Really Work
Easy Explain
0:00 / 0:00
Transformers Explained: Attention, Math and How LLMs Really Work
58 просмотров · 5 дн. назад
Easy Explain
57 подписчиков
58 просмотров · 5 дн. назад
Every modern language model is built from one idea: attention. In this episode we build a transformer from the ground up, with real numbers and visuals.
We cover tokenization, embeddings, positional encoding, queries, keys and values, a full derivation of scaled dot-product attention including why we divide by the square root of d_k, multi-head attention, residual connections, layer norm, feedforward layers, causal masks, encoder versus decoder models, next-token training, fine-tuning, LoRA, inference cost, and the real limits of large language models.
This is episode 29 of 30 in the Machine Learning from Zero to Advanced series. Next up: reinforcement learning, advanced topics, MLOps and capstone projects.
0:00 Intro
0:54 Tokens and Embeddings
2:37 Positional Encoding
3:32 Queries, Keys and Values
4:56 Deriving Scaled Attention
7:58 Multi-Head and the Block
10:12 Masks and Architectures
11:11 Training Language Models
12:59 Fine-Tuning and LoRA
14:29 Inference and Limits
16:12 Recap and Next Episode
#Transformers #LLM #Attention #MachineLearning #DeepLearning