Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Ultimate Guide to Training Llama and ChatGPT 2025
Rating: 4.4 out of 5(11 ratings)
98 students

Ultimate Guide to Training Llama and ChatGPT 2025

Step-by-step guide to creating a Llama AI. Dive deep into machine learning, harness Jax and optimize on TPU
Last updated 4/2025
English
English [Auto],

What you'll learn

  • Code ChatGPT from Scratch
  • Learn to use Jax and TPUs on Google Colab
  • Script a real Transformer GPT model
  • Learn the basics of GPT architecture using Jax
  • Learn the basics of machine learning training in Jax

Course content

1 section8 lectures38m total length
  • Introduction1:01

    Code ChatGPT from scratch in Jax on TPUs and Google Colab, building transformer layers, attention, MLPs, input and output embedding tables, and a full forward pass.

  • GPT Overview5:53

    Explore how a GPT-style transformer processes token sequences with input embeddings, positional encodings, dropout, multi-head attention with QKV and causal masking, residuals, and an MLP to predict the next token.

  • Setup6:26

    Set up a google colab notebook with tpus and define a jax-based transformer model with vocab 1000, seq length 128, batch 32, hidden 256, 8 heads, and 6 layers.

  • Model Construction6:20

    Build input data and embeddings for a GPT-style model using random token indices. Implement an MLP with up projection, ReLU activation, and down projection to learn non-linear representations.

  • Attention Mechanism8:50

    Build and apply a self-attention mechanism by computing query, key, and value projections, applying a causal lower triangular mask, and producing the transformer output.

  • Transformer Block4:08

    Explore a transformer block architecture by applying layer norms, residual connections with attention and MLP, building a full transformer model from embeddings to softmax output.

  • Forward Pass4:34

    Initialize random transformer parameters and build six layers with attention and an mlp, using shared weights, then compile the forward pass with JAX to map batch sequence to vocab.

  • Final Thoughts1:35

    Add a layer norm to normalize inputs before softmax, preventing zeros and unstable outputs, yielding a vocabulary probability distribution for each position when coding ChatGPT in Jax on a TPU.

Requirements

  • A basic knowledge of Python and machine learning is expected. A Google Colab account is also required.

Description

Dive deep into the world of machine learning and artificial intelligence by coding your own Llama3/ChatGPT model from scratch. This comprehensive course is designed for enthusiasts eager to understand the intricacies of Generative Pre-trained Transformers (GPT) and leverage the power of Google's Tensor Processing Units (TPUs) through hands-on learning. Using Jax for numerical computing, you will embark on a journey through the fundamentals of GPT models, culminating in the creation of your own AI capable of understanding and generating human-like text.

What You Will Learn

  • The Fundamentals of GPT/LLaam3: Unravel the theory behind Generative Pre-trained Transformers and why they're revolutionizing natural language processing.

  • Hands-on Jax: Master Jax, Google's high-performance numerical computing library, to efficiently manipulate and process large datasets.

  • TPU Mastery: Leverage Google Colab and TPUs to supercharge your model training, enjoying the benefits of this cutting-edge hardware without the overhead costs.

  • Model Building: Step-by-step guidance on coding your transformer model, from initial architecture to final optimization.

  • Real-World Applications: Explore the potential of your ChatGPT model, including chat applications, content creation, and more.

Who This Course Is For

  • AI Enthusiasts: Whether you're a hobbyist or a professional looking to deepen your understanding of AI, this course is designed to provide a solid foundation in GPT and machine learning.

  • Developers and Engineers: Software developers and engineers interested in expanding their skills into AI and machine learning will find this course invaluable.

  • Students and Educators: Ideal for students of computer science and related fields looking to get hands-on experience with cutting-edge AI technologies.

Course Features

  • Comprehensive Video Lectures: Detailed explanations and walkthroughs that guide you through each concept and phase of building your GPT model.

  • Hands-On Projects: Apply what you learn with real-world projects and exercises, fully supported by Google Colab's collaborative environment.

  • Direct Access to Instructors: Get your questions answered with direct access to your instructors through Udemy’s Q&A section.

  • Lifetime Access & Updates: Enroll once and get lifetime access to course materials, including all future updates.

Embark on this exciting journey to build your own ChatGPT model, harnessing the power of Jax and TPUs. Unlock the door to understanding and creating AI that can mimic human language, opening up endless possibilities for innovation and creativity.

Who this course is for:

  • This course is for anyone looking to understand how ChatGPT and other GPT models work.