Build your own GPT from Scratch thumbnail 1
Build your own GPT from Scratch thumbnail 2
Build your own GPT from Scratch

Build your own GPT from Scratch

An intensive, hands-on journey into the architecture of Large Language Models, where you will code a GPT model from the ground up.

View course on Vizuara
InstructorVizuara Expert Faculty
FormatLive Zoom + Discord Community
Sessions10 Modules
AudienceAI Enthusiasts, Data Scientists, Engineers
Course Description

This course provides a deep dive into the mechanics of Large Language Models (LLMs). By moving beyond high-level APIs, you will implement core components of the transformer architecture, including tokenization, attention mechanisms, and layer normalization.

Through a blend of theoretical lectures and practical coding sessions in Google Colab, you will build a functional GPT model, gaining the skills to pre-train and fine-tune models for real-world applications.

Learning Outcomes

By the end of this course, you will be able to:

Prerequisites
Course Sessions
Module
01

Foundations of LLMs

Introduction to the landscape of LLMs, scaling laws, and emergent properties.

Setting the stage for deep learning architectures.

Core Topics

  • Introduction to LLMs
  • Scaling Laws
  • Pre-training vs Fine-tuning

Resources

Lecture VideoSlides
Module
02

Tokenization Strategies

Exploring how models process text, from word-based tokenization to Byte Pair Encoding (BPE).

Practical implementation of text processing pipelines.

Core Topics

  • Word-based Tokenization
  • BPE Implementation
  • Data Preprocessing

Resources & Assignments

Lecture VideoColabAssignment
Module
03

Data Pipelines & Embeddings

Creating input-target pairs and understanding the role of token embeddings.

Preparing data for the training loop.

Core Topics

  • Input-Target Pairs
  • Token Embeddings
  • Positional Encodings

Resources

Lecture VideoColab
Module
04

Attention Mechanisms

Deep dive into the mathematics and implementation of self-attention and causal attention.

The heart of the transformer architecture.

Core Topics

  • Self-Attention
  • Causal Attention
  • Multi-Head Attention

Resources

Lecture VideoColabSlides
Module
05

Building the Architecture

Assembling the GPT model components including layer normalization and feed-forward networks.

Connecting the building blocks into a cohesive model.

Core Topics

  • Layer Normalization
  • Feed-Forward Networks
  • Shortcut Connections

Resources

Lecture VideoColab
Module
06

Training & Optimization

Implementing loss functions and executing the full pre-training process.

Finalizing the model and understanding training dynamics.

Core Topics

  • Loss Functions
  • Training Loops
  • Model Evaluation

Resources

Lecture VideoColabProject
Assessments

Mid-Term Assignment

A deep-dive project focused on implementing and analyzing tokenization strategies.

Final GPT Project

The assembly and training of a functional GPT model from scratch using the components developed throughout the course.