Build LLM from scratch [July 2026]
260 lessons45 topics194hself-paced
About this course
Build LLM from scratch [July 2026]
Course curriculum
45 topics • 260 lessons
194hCurrent Cohort (July 2026)14 topics
Course Introduction/Logistics/Office Hour Details/Zoom link4 items
- Hear from Dr. Sreedath Panat [Do not skip this]
- Readme for July 2026 Cohort [Do not skip this]
- LIVE Office Hours Schedule
- Office Hours Zoom Link
Kick-Off Meeting [July 31st 2026, 9 AM IST]5 items
- Joining Link
- Kick-off Session Video
- Miro Notes
- Readme
- Tentative Office Hour Schedule
Office Hour Zoom Link [ Sat 7.30 to 8.30 pm IST]1 items
- Office Hour Zoom Link
Week 1 - Introduction to LLMs4 items
- Lecture 1 Video Recording: Introduction to LLMs
- Lecture 1 - Colab Book : Next token prediction probability
- Lecture 2 Video Recording: Scaling laws and emergent properties
- Lecture 1-2 Lesson Notes
Week 2 - Pretraing + Finetuning 7 items
- Lecture 3 Video Recording: Pre-training, finetuning, Zero-Few shot learning
- Lesson 3 Lesson Notes
- Lecture 4 Video Recording (Tokenization intro, Building a Word based tokenizer)
- Lecture 4 Lesson Notes (Tokenization)
- Lecture 4 - Google Colab: Build a word based tokenizer
- Week - 2 - Office hour doubts
- Teaching Assignment 1: Explaining Large Language Models to a 15-Year-Oldassignment
Week 3 - BPE6 items
- Lesson 5: Byte Pair Encoding Introduction
- Lesson 5 Lecture Notes (Byte Pair Encoding)
- Lesson 6 Video Recording (BPE Coded from Scratch)
- Lesson 6 Google Colab Notebook
- Week - 3 - Office hour doubts
- Build LLM From Scratch | Office Hours | Week 3 | 23 Aug | 7.30pm-8.30pm IST [Saturdays]
Week 4 - Token Embedding 6 items
- Lecture 7 Video Recording (Create Input-Target Pairs)
- Lecture 7, 8 Lesson Notes (Input-Target Pairs, Token Embeddings)
- Lecture 8 Video Recording (Token Embeddings)
- Lecture 8 - Colab Token Embedding
- Mid-Term Take Home Assignment: Tokenization in Depthassignment
- Week - 4 - Office hour doubts
Week 5 - Positional Encoding 5 items
- Lecture 9 Video Recording (Positional Encoding, LLM Data Pipeline Summary)
- Lecture 9 Lesson Notes (Positional Encodings)
- Lecture 10 Video Recording (The need for an attention mechanism)
- Lecture 10 Lesson Notes (Need for an attention mechanism)
- Week - 5 - Office hour doubts
Week 6 - Self attention 6 items
- Lecture 11 Video Recording (Self attention calculation and mathematics)
- Lecture 11 Lesson Notes (Self attention calculation and mathematics)
- Lecture 12 Google Colab Notebook (Self Attention)
- Lecture 12 Video Recording (Self Attention Coding, Causal Attention)
- Lecture 12, 13, 14 Lesson Notes (Self Attention, Multi-head Attention)
- Week - 6 - Office hour doubts
Week 7 - Multi Head Attention5 items
- Lecture 13 Video Recording (Multi-head Attention Introduction)
- Lecture 14 Video Recording (Multi-Head Attention Coded from Scratch)
- Google Colab Notebook Self-Causal-Multi head attention
- Week - 7 - Office hour doubts
- Week 7 - Build LLM From Scratch office hours
Week 8 - Feed Forward NN 7 items
- Lesson 15 Video Recording (Layer Normalization Theory + Code)
- Lesson 15 Lecture Notes (Layer Norm Theory + Code)
- Lesson 15 : Colab - LLM Architecture
- Lesson 16 Video Recording (Feed Forward Neural Network + Shortcut Connections)
- Lesson 16 Lesson Notes (Feed Forward Neural Network + Shortcut Connections)
- Week - 8 - Office hour doubts
- Week 8 - Build LLM From Scratch office hours
Week 9 - GPT architecture 7 items
- Lecture 17 Video Recording (Assembling the GPT Architecture)
- Lecture 17 Lesson Notes (Assembling the GPT Architecture)
- Google Colab Notebook: Entire LLM Architecture
- Lecture 18 Lesson Notes (LLM Loss Functions Theory + Code)
- Lecture 18 Video Recording (LLM Loss Functions Theory + Code)
- Google Colab Notebook: LLM Loss Function
- Week - 9 - Office hour doubts
Week 10 - Training Large Language Models10 items
- Lecture 19 Video Recording (Entire LLM Pre-training)
- Lecture 19 Lesson Notes (Entire LLM Pre-training)
- Google Colab: Pre-train and entire LLM from scratch
- Research Assignment: Experiment with the LLM Architecture!assignment
- Lecture 20 - Build a production level SLM from scratch
- Lecture 20 - Lesson Notes - Build a production level SLM from Scratch
- Google Colab: Build Production Level SLM from Scratch
- Final Assignment: Build SLM from Scratchassignment
- Week - 10 - Office hour doubts
- Week 10 - Build LLM From Scratch office hours
Week 11 - Finetuning LLMs 7 items
- Lecture 21 Video Recording (Classification finetuned LLM)
- Lecture 21, 22 Lesson Notes (Classification finetuned LLM)
- Google Colab: Classification finetuned LLM
- Lecture 22 Video Recording (Instruction Fine-tuned LLM)
- Google Colab: Instruction Fine-tuned LLM
- Week - 11 - Office hour doubts
- Week 11 - Build LLM From Scratch office hours
Archive: Build LLM from scratch [Jan 2026]15 topics
Office hours Zoom link | 7.30pm-8.30pm IST [Saturdays]1 items
- Office Hours | 7.30pm-8.30pm IST [Saturdays]
Readme1 items
- Please read this first
Introduction: Lecture videos, office hour timings and other course details1 items
- Hear from Dr. Sreedath Panat
Kick-off meeting | Jan 31st, 9.30am IST LIVE2 items
- Meeting link
- Notes from the kick-off meeting
Week 1 - Introduction to LLMs6 items
- Lecture 1 Video Recording: Introduction to LLMs
- Lecture 1 - Colab Book : Next token prediction probability
- Lecture 2 Video Recording: Scaling laws and emergent properties
- Lecture 1-2 Lesson Notes
- Week - 1 - Office hour doubts
- Build LLM from Scratch | Office Hours | Week 1 | 7.30pm-8.30pm IST [Saturdays]
Week 2 - Pretraing + Finetuning9 items
- Lecture 3 Video Recording: Pre-training, finetuning, Zero-Few shot learning
- Lesson 3 Lesson Notes
- Lecture 4 Video Recording (Tokenization intro, Building a Word based tokenizer)
- Lecture 4 Lesson Notes (Tokenization)
- Lecture 4 - Google Colab: Build a word based tokenizer
- Week - 2 - Office hour doubts
- Teaching Assignment 1: Explaining Large Language Models to a 15-Year-Oldassignment
- Build LLM from Scratch | Office Hours | Week 2 | 7.30pm-8.30pm IST [Saturdays]
- Build LLM from Scratch | Office Hours | Week 2.1 | 7.30pm-8.30pm IST [Saturdays]
Week 3 - BPE6 items
- Lesson 5: Byte Pair Encoding Introduction
- Lesson 5 Lecture Notes (Byte Pair Encoding)
- Lesson 6 Video Recording (BPE Coded from Scratch)
- Lesson 6 Google Colab Notebook
- Week - 3 - Office hour doubts
- Build LLM from Scratch | Office Hours | Week 3 | 7.30pm-8.30pm IST [Saturdays]
Week 4 - Token Embedding7 items
- Lecture 7 Video Recording (Create Input-Target Pairs)
- Lecture 7, 8 Lesson Notes (Input-Target Pairs, Token Embeddings)
- Lecture 8 Video Recording (Token Embeddings)
- Lecture 8 - Colab Token Embedding
- Mid-Term Take Home Assignment: Tokenization in Depthassignment
- Week - 4 - Office hour doubts
- Build LLM from Scratch | Office Hours | Week 4 | 7.30pm-8.30pm IST [Saturdays]
Week 5 - Positional Encoding6 items
- Lecture 9 Video Recording (Positional Encoding, LLM Data Pipeline Summary)
- Lecture 9 Lesson Notes (Positional Encodings)
- Lecture 10 Video Recording (The need for an attention mechanism)
- Lecture 10 Lesson Notes (Need for an attention mechanism)
- Week - 5 - Office hour doubts
- Build LLM from Scratch | Week 5 | Office Hours | 7.30pm-8.30pm IST [Saturdays]
Week 6 - Self attention7 items
- Lecture 11 Video Recording (Self attention calculation and mathematics)
- Lecture 11 Lesson Notes (Self attention calculation and mathematics)
- Lecture 12 Google Colab Notebook (Self Attention)
- Lecture 12 Video Recording (Self Attention Coding, Causal Attention)
- Lecture 12, 13, 14 Lesson Notes (Self Attention, Multi-head Attention)
- Week - 6 - Office hour doubts
- Build LLM from Scratch | Week 6 | Office Hours | 7.30pm-8.30pm IST [Saturdays]
Week 7 - Multi Head Attention4 items
- Lecture 13 Video Recording (Multi-head Attention Introduction)
- Lecture 14 Video Recording (Multi-Head Attention Coded from Scratch)
- Google Colab Notebook Self-Causal-Multi head attention
- Week - 7 - Office hour doubts
Week 8 - Feed Forward NN7 items
- Lesson 15 Video Recording (Layer Normalization Theory + Code)
- Lesson 15 Lecture Notes (Layer Norm Theory + Code)
- Lesson 15 : Colab - LLM Architecture
- Lesson 16 Video Recording (Feed Forward Neural Network + Shortcut Connections)
- Lesson 16 Lesson Notes (Feed Forward Neural Network + Shortcut Connections)
- Week - 8 - Office hour doubts
- Build LLM from Scratch | Week 8 | Office Hours | 7.30pm-8.30pm IST [Saturdays]
Week 9 - GPT architecture8 items
- Lecture 17 Video Recording (Assembling the GPT Architecture)
- Lecture 17 Lesson Notes (Assembling the GPT Architecture)
- Google Colab Notebook: Entire LLM Architecture
- Lecture 18 Lesson Notes (LLM Loss Functions Theory + Code)
- Lecture 18 Video Recording (LLM Loss Functions Theory + Code)
- Google Colab Notebook: LLM Loss Function
- Week - 9 - Office hour doubts
- Build LLM from Scratch | Week 9 | Office Hours | 7.30pm-8.30pm IST [Saturdays]
Week 10 - Training Large Language Models10 items
- Lecture 19 Video Recording (Entire LLM Pre-training)
- Lecture 19 Lesson Notes (Entire LLM Pre-training)
- Google Colab: Pre-train and entire LLM from scratch
- Research Assignment: Experiment with the LLM Architecture!assignment
- Lecture 20 - Build a production level SLM from scratch
- Lecture 20 - Lesson Notes - Build a production level SLM from Scratch
- Google Colab: Build Production Level SLM from Scratch
- Final Assignment: Build SLM from Scratchassignment
- Week - 10 - Office hour doubts
- Build LLM from Scratch | Week - 10 | Office Hours | 7.30pm-8.30pm IST [Saturdays]
Week 11 - Finetuning LLMs7 items
- Lecture 21 Video Recording (Classification finetuned LLM)
- Lecture 21, 22 Lesson Notes (Classification finetuned LLM)
- Google Colab: Classification finetuned LLM
- Lecture 22 Video Recording (Instruction Fine-tuned LLM)
- Google Colab: Instruction Fine-tuned LLM
- Week - 11 - Office hour doubts
- Build LLM from Scratch | Week 11 | Office Hours | 7.30pm-8.30pm IST [Saturdays]
Archive: Build LLM from Scratch [July 2025 Cohort]16 topics
Introduction19 items
- Lecture 1 Video Recording: Introduction to LLMs
- Lecture 2 Video Recording: Scaling laws and emergent properties
- Lecture 1-2 Lesson Notes
- Lecture 3 Video Recording: Pre-training, finetuning, Zero-Few shot learning
- Lesson 3 Lesson Notes
- Lecture 4 Video Recording (Tokenization intro, Building a Word based tokenizer)
- Lecture 4 Lesson Notes (Tokenization)
- Google Colab: Build a word based tokenizer
- Lesson 5: Byte Pair Encoding Introduction
- Lesson 5 Lecture Notes (Byte Pair Encoding)
- Lesson 6 Video Recording (BPE Coded from Scratch)
- Lesson 6 Google Colab Notebook
- Lecture 7 Video Recording (Create Input-Target Pairs)
- Lecture 7, 8 Lesson Notes (Input-Target Pairs, Token Embeddings)
- Lecture 8 Video Recording (Token Embeddings)
- Mid-Term Take Home Assignment: Tokenization in Depth
- Lecture 9 Lesson Notes (Positional Encodings)
- Lecture 9 Video Recording (Positional Encoding, LLM Data Pipeline Summary)
- Zoom Link for all lectures (Sat-Sun, 8-9:30 am IST)
Language Model Architecture20 items
- Lecture 10 Video Recording (The need for an attention mechanism)
- Lecture 12 Video Recording (Self Attention Coding, Causal Attention)
- Lecture 12, 13, 14 Lesson Notes (Self Attention, Multi-head Attention)
- Lecture 12 Google Colab Notebook (Self Attention)
- Lecture 11 Lesson Notes (Self attention calculation and mathematics)
- Lecture 11 Video Recording (Self attention calculation and mathematics)
- Lecture 10 Lesson Notes (Need for an attention mechanism)
- Lecture 13 Video Recording (Multi-head Attention Introduction)
- Lecture 14 Video Recording (Multi-Head Attention Coded from Scratch)
- Google Colab Notebook Self-Causal-Multi head attention
- Lesson 15 Video Recording (Layer Normalization Theory + Code)
- Lecture 18 Video Recording (LLM Loss Functions Theory + Code)
- Lecture 18 Lesson Notes (LLM Loss Functions Theory + Code)
- Google Colab Notebook: Entire LLM Architecture
- Lecture 17 Lesson Notes (Assembling the GPT Architecture)
- Lecture 17 Video Recording (Assembling the GPT Architecture)
- Lesson 16 Lesson Notes (Feed Forward Neural Network + Shortcut Connections)
- Lesson 16 Video Recording (Feed Forward Neural Network + Shortcut Connections)
- Lesson 15 Lecture Notes (Layer Norm Theory + Code)
- Google Colab Notebook: LLM Loss Function
Training Large Language Models3 items
- Google Colab: Pre-train and entire LLM from scratch
- Lecture 19 Lesson Notes (Entire LLM Pre-training)
- Lecture 19 Video Recording (Entire LLM Pre-training)
Very Important: Course Details (start date, timings, readings etc)9 items
- Hear from the course instructor Dr. Raj Dandekar
- Why am I not able to access the lecture videos below?
- What if I have additional doubts? How can I get these doubts clarified?
- Get ready with these things soon
- Is attendance mandatory?
- Will there be assignments?
- What if I miss a lecture?
- Where will the lectures happen?
- Start date and timings
Build GPT from Scratch Midsemester Examination0 items
Finetuning LLMs5 items
- Lecture 24 Video Recording (Instruction Fine-tuned LLM)
- Google Colab: Instruction Fine-tuned LLM
- Google Colab: Classification finetuned LLM
- Lecture 23, 24 Lesson Notes (Classification finetuned LLM)
- Lecture 23 Video Recording (Classification finetuned LLM)
Build GPT from Scratch MidSem Makeup Exam (11 April)0 items
Build a Small Language Model (SLM) from Scratch3 items
- Google Colab: Build Production Level SLM from Scratch
- Lecture 20. 21, 22 (Build a production level SLM from scratch)
- Lecture 20, 21, 22 Lesson Notes (Build a production level SLM from Scratch)
ALL MATERIAL POSTED BELOW ARE FROM JAN 2025 COHORT - PROVIDED FOR YOUR REFERENCE0 items
Introduction17 items
- Lecture 1: Introduction to Course
- Lecture 2: Introduction to LLM: Next token prediction
- Colab Book : Next token prediction probability
- Lecture 1,2 - Notes
- Lecture 3 - Pretaining + Finetuning
- Lecture 4 - GPT for 5-6 year old kid, Tokenization
- Lecture 5 - Word Based Tokenization
- Lecture 5 - Colab Notebook - Word Based Tokenization
- Lecture 6 - Sub Word Based Tokenization BPE
- Lecture 7 - BPE from Scratch
- Lecture 5-6-7 Notes
- Lecture 7 - BPE from Scratch - Colab Notebook
- Lecture 8 - Input-Target Pair
- June 2025 - Build LLM from scratch - Lecture 9 - Token Embedding
- Lecture 10 - Position Embedding
- Lectures 8, 9, 10—Token and position embedding notes
- Lecture 10 - Till Input embedding - Colab Notebook
JULY 2025 COHORT - COURSE INFO1 items
- Course timings and links
Language Model Architecture15 items
- Lecture 11 - Attention Mechanism
- Lecture 12 - Self attention Query, Key, Value
- Lecture 13 - Self attention code, Causal attention
- Lecture 14 - Multi Head attention
- Lecture 15 - Multi Head attention code
- Lecture 11-15 - Self, Causal, Multi-Head Attention Notes
- Lecture 11-15 - Self, Causal, Multi-Head Attention Colab Notebook
- Lecture 16 - Layer Normalization
- Lecture 16-18 - Layer Normalization Notes
- Lecture 16 - Layer Normalization - Colab Notebook
- Lecture 17 - Feed forward NN, GeLU function
- Lecture 18 - Coding GPT Architecture
- Lecture 18 - Coding GPT Architecture - Colab Notebook
- Lecture 19 - Loss function
- Lecture 19 - Loss function - Colab Notebook
Build GPT from Scratch Midsemester Examination0 items
Training Large Language Models3 items
- Lecture 20 - Entire LLM Pre-training
- Lecture 20 - Entire LLM Pre-training - Notes
- Lecture 20 - Entire LLM Pre-training - Google Colab
Build a Small Language Model (SLM) from Scratch6 items
- Lecture 21 - Build SLM from scratch
- Lecture 21 - Build SLM from scratch - Notes
- Lecture 21 - Build SLM from scratch - Colab Notebook
- Lecture 22 - Control the randomness of LLM
- Lecture 22 - Control the randomness of LLM - Notes
- Lecture 22 - Control the randomness of LLM - Colab Notebook
Finetuning LLMs5 items
- Lecture 23 - Fine-tuning Classification
- Lecture 23 - Fine-tuning Classification - Notes
- Lecture 23 - Fine-tuning Classification - Colab Notebook
- Lecture 24 - Instruction Fine-tuning
- Lecture 24 - Instruction Fine-tuning - Colab Notebook
Frequently asked questions
Which section is most relevant for me if I am short on time and want to prepare fast before the current cohort starts?
The latest section, that is, Archive: Build LLM from scratch [Jan 2026], would be most relevant for you.



