AI LEARNING PATH

Transformer Internals & LLM Training

Go inside attention, GPT-style models, training, fine-tuning, and post-training.

Learning stage 16 · 16 lessons

  1. Lesson 1NLP Evolution: Rules to Transformers

    Connect bag-of-words, TF-IDF, embeddings, recurrent networks, attention, transformers, and LLMs into one progression.

  2. Lesson 2Tokenization and Vocabulary Design

    Understand subword tokenization, vocabulary size, token IDs, and why token boundaries affect cost and model behavior.

  3. Lesson 3Positional Information

    See how transformers represent token order even though attention itself does not inherently know sequence position.

  4. Lesson 4Queries, Keys, and Values

    Understand Q, K, and V projections as the core data flow inside self-attention.

  5. Lesson 5Scaled Dot-Product Attention

    Understand the attention equation softmax(QKᵀ/√dₖ)V and the role of scaling and normalization.

  6. Lesson 6Multi-Head Attention and the Transformer Block

    Combine attention heads, residual connections, normalization, and feed-forward layers into a complete transformer block.

  7. Lesson 7Causal Masking

    Understand why decoder-style language models prevent a training position from attending to future tokens.

  8. Lesson 8Logits, Softmax, and Sampling

    Follow how model outputs become token probabilities and then a generated token.

  9. Lesson 9Temperature, Top-k, and Top-p

    Control randomness and candidate selection without confusing decoding settings with model knowledge.

  10. Lesson 10KV Cache and Fast Generation

    Understand how caching attention keys and values avoids recomputing the whole prefix for every generated token.

  11. 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.

  12. Lesson 12LLM Data and Training Pipeline

    Understand cleaning, deduplication, tokenization, sharding, batching, checkpoints, validation, and training monitoring.

  13. Lesson 13Mixed Precision and Distributed Training

    Understand FP16/BF16, gradient accumulation, data parallelism, sharding, and why large models need coordinated compute.

  14. Lesson 14LoRA and QLoRA

    Understand parameter-efficient fine-tuning with low-rank adapters and quantized base models.

  15. Lesson 15RLHF, DPO, and Preference Optimization

    Understand how preference data can shape model behavior after pretraining and supervised tuning.

  16. Lesson 16Hugging Face Ecosystem

    Understand model hubs, Transformers, Datasets, Tokenizers, PEFT, Accelerate, TRL, and model/dataset cards.