Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Video · AI & Machine LearningFree

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.

Subscribers

91.4K

YouTube · Oct 2026

Videos

25

YouTube · Oct 2026

Format

Video

Topic

AI & Machine Learning

Provider

Umar Jamil

Time needed

Self-paced

Level

Advanced

Access

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Retrieval Augmented Generation (RAG) Explained: Embedding, Sentence BERT, Vector Database (HNSW).
  6. 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

Best for: learners with PyTorch basics who want to understand LLMs down to the code.

llmmachine learningpythonai

Ready to start?

Opens on Umar Jamil in a new tab.

Watch on YouTube
Link broken or out of date?

Report a problem

With "Umar Jamil (YouTube channel)". Only Tauseef reads this.

Work with me

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.