Back to directory

A deep understanding of AI large language model mechanisms

The code repository for a paid Udemy course on large language model internals, covering transformer architecture, tokenization, training, fine-tuning, inference and PyTorch implementations from scratch.

A deep understanding of AI large language model mechanisms

This repository holds all of the Python and PyTorch code for a Udemy course on the mechanics behind large language models such as those powering ChatGPT, Claude and Gemini. It includes lecture code organized by course section, code-challenge solutions with full explanations, custom PyTorch implementations of core LLM building blocks, and data preprocessing and visualization utilities.

The course itself covers transformer architecture and self-attention, tokenization and embeddings, training LLMs from scratch and fine-tuning pre-trained ones, decoding strategies, optimization and scaling laws, and evaluation metrics. The code in this repository is free; the associated Udemy course adds over 90 hours of video walkthroughs and mathematical derivations.

More in Tutorials

See all 478
  • BootLife

    github.com

    Conway's Game of Life implemented to run directly from a 512-byte x86 boot sector in assembly, using VGA memory itself as the simulation grid.

  • A technical blog post deriving the Y combinator as a composition of combinator birds in an array language, and examining how eager evaluation changes fixed-point recursion compared with the usual lazy telling.

  • System Design Atlas

    atlas-sysdes.vercel.app

    A free reference of worked system design problems with interactive architecture diagrams, covering ranked designs such as a feed, a chat app, a URL shortener, and a rate limiter, plus pages on the technologies behind them.