Build LLM from scratch [July 2026] thumbnail

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

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