Generative AI
Master modern Generative AI & LLMs visually from zero — What Is Generative AI, BPE, Self-Attention, RoPE, Long-Context/YaRN, KV-Cache, GQA, FlashAttention, MoE, Decoding, Hallucinations, What Is RAG, Hybrid RAG, GraphRAG, RAG vs. Fine-Tuning, SFT, LoRA/QLoRA, DPO, GRPO, Quantization, vLLM, Prompt Caching, TTFT/TPOT, Diffusion, Flow Matching & Multimodal VLMs.
Modern AI systems are built from clean, composable primitives: subword tokenization, causal Self-Attention, RoPE, KV-Cache/GQA, hybrid RAG, LoRA/DPO post-training, and vLLM inference serving.
Master exact tensor shapes, prompt caching, hybrid BM25+RRF retrieval, constrained JSON decoding, and VRAM math.
Go from scratch derivations of RoPE, FlashAttention, LoRA, DPO, and GRPO straight to production PyTorch.
Every focused sub-chapter links straight into AIMLCode's 21 live auto-graded Generative AI coding problems!
What Is Generative AI & How Do LLMs Actually Work? (Next-Token Prediction From Zero)
The beginner-first blueprint of Generative AI: Discriminative vs. Generative models, the 4-stage Token → Transformer → Probabilities → Sampling loop, and Pretraining vs. Post-Training
How KV-Cache Works: Prefill vs. Autoregressive Decode & VRAM Math
Why autoregressive generation wastes O(T²) FLOPs without caching, how KV-Cache turns each new token into O(T) work, why Prefill is compute-bound while Decode is memory-bandwidth-bound, and the exact KV-Cache VRAM formula.
LLM Decoding: Temperature, Top-K & Top-P (Nucleus) Sampling Visualized
How an LLM turns 128,000 raw logits into the next token: Temperature scaling (z/T), rigid Top-K vs. adaptive Top-P (Nucleus) filtering, exact re-normalization, and why decoding order matters.
What Is RAG (Retrieval-Augmented Generation)? Architecture, Pipeline & When to Use It
The complete beginner-to-production overview of RAG: Offline Indexing vs. Online Retrieval-and-Generate, why RAG solves stale knowledge, and every building block in Module 4
RAG vs. Fine-Tuning vs. Prompt Engineering: Decision Framework, Cost & Latency Guide
The #1 AI Engineer architecture decision — when to prompt, when to retrieve (RAG), when to adapt weights (LoRA/SFT), and how production systems combine all three
LLM Quantization: Symmetric INT8, INT4, Activation Outliers, AWQ & FP8
How Quantization shrinks a 70B LLM from 140 GB down to 35 GB and speeds up memory-bound Decode by 2×–3.2×: symmetric quantization math, why 100× activation outliers break naive INT8, AWQ salient-channel scaling, and native Hopper/Blackwell FP8.