AI LEARNING PATH
Transformer Internals & LLM Training
Go inside attention, GPT-style models, training, fine-tuning, and post-training.
Learning stage 16 · 16 lessons
- Lesson 1NLP Evolution: Rules to Transformers
Connect bag-of-words, TF-IDF, embeddings, recurrent networks, attention, transformers, and LLMs into one progression.
- Lesson 2Tokenization and Vocabulary Design
Understand subword tokenization, vocabulary size, token IDs, and why token boundaries affect cost and model behavior.
- Lesson 3Positional Information
See how transformers represent token order even though attention itself does not inherently know sequence position.
- Lesson 4Queries, Keys, and Values
Understand Q, K, and V projections as the core data flow inside self-attention.
- Lesson 5Scaled Dot-Product Attention
Understand the attention equation softmax(QKᵀ/√dₖ)V and the role of scaling and normalization.
- Lesson 6Multi-Head Attention and the Transformer Block
Combine attention heads, residual connections, normalization, and feed-forward layers into a complete transformer block.
- Lesson 7Causal Masking
Understand why decoder-style language models prevent a training position from attending to future tokens.
- Lesson 8Logits, Softmax, and Sampling
Follow how model outputs become token probabilities and then a generated token.
- Lesson 9Temperature, Top-k, and Top-p
Control randomness and candidate selection without confusing decoding settings with model knowledge.
- Lesson 10KV Cache and Fast Generation
Understand how caching attention keys and values avoids recomputing the whole prefix for every generated token.
- Lesson 11Build a Mini GPT in PyTorch
Connect embeddings, positional information, causal self-attention, MLP blocks, language-model loss, and generation in one small implementation.
- Lesson 12LLM Data and Training Pipeline
Understand cleaning, deduplication, tokenization, sharding, batching, checkpoints, validation, and training monitoring.
- Lesson 13Mixed Precision and Distributed Training
Understand FP16/BF16, gradient accumulation, data parallelism, sharding, and why large models need coordinated compute.
- Lesson 14LoRA and QLoRA
Understand parameter-efficient fine-tuning with low-rank adapters and quantized base models.
- Lesson 15RLHF, DPO, and Preference Optimization
Understand how preference data can shape model behavior after pretraining and supervised tuning.
- Lesson 16Hugging Face Ecosystem
Understand model hubs, Transformers, Datasets, Tokenizers, PEFT, Accelerate, TRL, and model/dataset cards.