Umar Jamil (YouTube channel)
Long, from-scratch explanations of the models behind modern AI by Umar Jamil, a machine learning engineer based in Milan. Each video takes one architecture or technique, such as the transformer, LLaMA, LoRA, RLHF, diffusion or Flash Attention, and explains the maths before coding it in PyTorch. It suits learners who already know Python and basic deep learning and want to understand LLMs at the level of the code.
91.4K
YouTube · Oct 2026
25
YouTube · Oct 2026
Video
AI & Machine Learning
Umar Jamil
Self-paced
Advanced
Free
What the channel covers
Umar Jamil is a machine learning engineer from Milan who, in his own words, teaches complex deep learning concepts to his cat. The channel is small in number of videos but unusually deep: most uploads run for hours and take one important model or technique from the paper to working PyTorch code, with the maths derived on screen.
There are no shortcuts here. You see why each component exists, how the tensors flow through it and how training and inference differ. Few free resources go this far into the internals of large language models.
Videos to start with
The channel has only a couple of dozen videos, so you can choose by topic. A sensible order:
- Attention is all you need (Transformer) - Model explanation (including math), Inference and Training, then Coding a Transformer from scratch on PyTorch, with full explanation, training and inference.
- LLaMA explained: KV-Cache, Rotary Positional Embedding, RMS Norm, Grouped Query Attention, SwiGLU and Coding LLaMA 2 from scratch in PyTorch - KV Cache, Grouped Query Attention, Rotary PE, RMSNorm.
- LoRA: Low-Rank Adaptation of Large Language Models - Explained visually + PyTorch code from scratch and Quantization explained with PyTorch - Post-Training Quantization, Quantization-Aware Training.
- Reinforcement Learning from Human Feedback explained with math derivations and the PyTorch code. and Direct Preference Optimization (DPO) explained: Bradley-Terry model, log probabilities, math.
- Retrieval Augmented Generation (RAG) Explained: Embedding, Sentence BERT, Vector Database (HNSW).
- For the adventurous: Flash Attention derived and coded from first principles with Triton (Python), Distributed Data Parallel (DDP) with PyTorch: complete tutorial with cloud infrastructure and code and Coding Stable Diffusion from scratch in PyTorch.
Who it suits
Learners who can already train a small neural network in PyTorch and want to understand what is inside the models they call through an API. It is especially useful for final-year projects and masters work on LLMs, and for AI engineers who want to reason about fine-tuning, quantisation and inference costs from first principles. If you are new to deep learning, build the basics first.
How to learn from it without getting stuck in tutorial loops
These videos are long, so plan your sessions:
- Watch one section at a time and type the code yourself instead of copying the repository.
- Check shapes constantly. Print tensor shapes at each step until the architecture feels obvious.
- Change something real. Train the small transformer on a different dataset, or add LoRA to a model you already use, and compare results.
- Teach it back. Write a short explanation of one component, such as rotary embeddings or the KV cache, in your own words.
Pair it with on Sefism
- The Machine learning roadmap builds the foundations; the AI engineering roadmap and cheat sheet put model knowledge to work in applications.
- Start with Neural Networks: Zero to Hero and The Illustrated Transformer if the first videos feel steep.
- Keep PyTorch: Learn the Basics and the Hugging Face Transformers documentation open alongside.
Best for: learners with PyTorch basics who want to understand LLMs down to the code.
Ready to start?
Opens on Umar Jamil in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.