Advanced25 lessons
Training and Alignment
Follow the training stack from scaling laws and data pipelines through SFT, LoRA, RLHF, DPO, rewards, and distillation.
Readers moving from API usage into model adaptation, post-training, and training infrastructure.
You can explain the lifecycle of a model update and choose the right adaptation method for a product constraint.
- 1The LLM LifecycleFollow one key-rotation assistant from base-model training to post-training, retrieval, serving, evaluation, and the fix chosen after a real failure.Preparation & PrerequisitesEasy15 min
- 2PyTorch Training LoopsBuild a PyTorch classifier from raw logits through autograd, validation, and reloadable checkpoints.ML Algorithms & EvaluationMedium17 min
- 3Scaling Laws & Compute-Optimal TrainingLearn the empirical power laws governing LLM performance, from Kaplan's parameter-heavy frontier through Chinchilla-optimal ratios to modern inference-aware training strategies.Advanced Training & AdaptationHard36 min
- 4Dataset Pipelines and Data QualityBuild versioned AI datasets with schema gates, grouped splits, contamination checks, and auditable receipts.ML Algorithms & EvaluationMedium16 min
- 5Pre-training Data at ScaleUnderstand how web-scale pre-training data is extracted, filtered, deduplicated, mixed, tokenized, and packed into training-ready shards, including decontamination, late-stage annealing, and synthetic-data tradeoffs.Advanced Training & AdaptationHard35 min
- 6Build GPT from Scratch LabBuild and train a tiny GPT end to end on Shakespeare: tokenize with GPT-style subwords, remap active token IDs, run causal self-attention, track validation loss, save a checkpoint, and sample text.Advanced Training & AdaptationHard22 min
- 7Instruction Tuning & Chat TemplatesTeach a base language model to answer as an assistant: curate grounded SFT rows, serialize chat turns exactly, choose loss targets, pack safely, and detect serving-time template drift.Core LLM FoundationsMedium18 min
- 8Continued Pretraining for Domain ShiftLearn when to keep the causal language-modeling objective and continue pretraining on domain text instead of jumping straight to SFT, and how to evaluate the trade-off against forgetting, cost, and downstream gain.Advanced Training & AdaptationHard19 min
- 9LLM-as-a-Judge EvaluationAdd calibrated soft judgments to a RAG evaluation trace without letting an LLM override deterministic evidence gates.Applied LLM EngineeringMedium18 min
- 10Synthetic Data PipelinesBuild synthetic post-training data pipelines with Self-Instruct, Evol-Instruct, calibrated judge signals, verifiers, preference pairs, diversity checks, and decontamination.Advanced Training & AdaptationHard25 min
- 11Supervised Fine-Tuning PipelineRun supervised fine-tuning as a real training system: choose the learning objective before the update surface, verify response-token loss and packing, track the real batch budget, save resumable checkpoints, and export on held-out behavior.Advanced Training & AdaptationHard23 min
- 12Experiment Tracking with MLflow and W&BTurn a live LLM regression into a reproducible candidate decision by logging inputs, metrics, artifacts, and promotion evidence.Applied LLM EngineeringMedium17 min
- 13CUDA for ML TrainingBuild beginner-first CUDA intuition for model training: CPU vs GPU roles, host-device copies, asynchronous execution, PyTorch device placement, and first-line debugging of OOM and performance issues.Computing FoundationsEasy14 min
- 14Mixed Precision TrainingMeasure how FP16 and BF16 affect training range, update precision, memory, and release evidence before enabling faster low-precision compute.Advanced Training & AdaptationHard22 min
- 15Distributed Training: FSDP & ZeROUnderstand ZeRO stages, current FSDP1 vs FSDP2 guidance, and when native PyTorch or DeepSpeed is the right choice for large-model training.Advanced Training & AdaptationHard40 min
- 16LoRA & Parameter-Efficient TuningUnderstand the mathematics of Low-Rank Adaptation (LoRA), modern adapter targeting strategies, and the real memory tradeoffs compared to full fine-tuning and QLoRA.Advanced Training & AdaptationHard33 min
- 17Data Labeling and Human FeedbackBuild a trustworthy human-feedback data flywheel: redact traces, write rubrics, measure agreement, select useful examples, prevent leakage, and promote versioned datasets.Applied LLM EngineeringMedium16 min
- 18Reward Modeling from Preference DataTrain reward models as a first-class post-training stage: validate chosen/rejected pairs and splits, fit a scalar reward head with Bradley-Terry loss, audit generalization, and decide when explicit rewards are worth the extra complexity.Advanced Training & AdaptationHard18 min
- 19RLHF & DPO AlignmentUnderstand the RLHF pipeline and DPO, including reward modeling, PPO mechanics, and the trade-offs between iterative reinforcement learning and direct preference optimization.Advanced Training & AdaptationHard33 min
- 20Constitutional AI & Red TeamingUnderstand how Constitutional AI reduces reliance on repeated human preference labeling through AI critique and ranking, and how automated red teaming stress-tests those safeguards.Advanced Training & AdaptationHard30 min
- 21RLVR & Verifiable RewardsUnderstand RLVR, a post-training approach that uses programmatic verification instead of learned human-preference rewards to improve checked outcomes in math, code, and other contract-driven tasks.Advanced Training & AdaptationHard37 min
- 22Knowledge Distillation for LLMsUnderstand the main forms of knowledge distillation for LLMs, from logit matching and response-based supervision to on-policy KD. Learn when distillation helps, where student capacity becomes the bottleneck, and how to implement a correct teacher-student training loop.Advanced Training & AdaptationHard25 min
- 23LLM Benchmarks & LimitationsBuild an evaluation suite for a policy-answering LLM: score evidence use, understand public benchmark contracts, control judge bias, and make release decisions from private tests.Core LLM FoundationsMedium21 min
- 24Model Versioning & DeploymentTurn an evaluated LLM change into an immutable release bundle, promote it through measured traffic, and roll back without losing lineage.Applied LLM EngineeringMedium19 min
- 25Capstone: Fine-Tuned ClassifierTrain and gate an access-ticket encoder that exports exact-receipt evidence and safe intake decisions to a production agent.Portfolio CapstonesHard24 min