Skip to content
E
Educatum
5-Week Study Plan

GenAI by Hand — 5 Week Visual Study Plan

Inspired by and crediting Professor Tom Yeh’s "AI By Hand" series, this 5-week study plan helps engineers internalize modern generative AI architectures through small, hand-calculable numerical examples. Rather than treating attention heads, RoPE rotations, LoRA low-rank updates, or autoencoders as black boxes, you trace matrix dimensions and weights step by step across five structured weeks—making it ideal preparation for technical AI interviews.

27Curriculum Topics
13Full Walkthroughs
Updated:

Full Illustrated Walkthroughs (13)

Week 1Fundamentals

Batch Normalization

Batch Normalization stabilizes and accelerates deep network training by normalizing each feature dimension across a mini-batch to zero mean and unit variance, then applying learnable scale (gamma) and shift (beta) parameters. During inference, it replaces mini-batch statistics with exponential moving averages of the population mean and variance accumulated during training.

Week 1Fundamentals

SVM

A Support Vector Machine (SVM) finds the maximum-margin hyperplane separating classes, relying solely on critical boundary points called support vectors. While a linear SVM scores samples via direct inner products in input space, an RBF (Gaussian) kernel SVM measures similarity as exp(-||x - x_c||^2 / (2 sigma^2)), implicitly mapping data into an infinite-dimensional feature space for non-linear decision boundaries.

Week 2Autoencoders

Autoencoder

An autoencoder is a self-supervised neural network made of an encoder that compresses inputs into a lower-dimensional latent bottleneck and a decoder that reconstructs the original input from that representation. Because the input itself acts as the training target, this self-supervised paradigm also underpins masked representation learning and contrastive multimodal pretraining.

Week 2Fundamentals

Dropout

Dropout regularizes neural networks by randomly zeroing neuron activations with probability p during each training forward pass, preventing co-adaptation and acting as implicit model averaging across thinned subnetworks. With modern inverted dropout, surviving activations are scaled by 1 / (1 - p) during training so their expected value matches inference without requiring scaling at test time.

Week 2GANs

Generative Adversarial Network

A Generative Adversarial Network (GAN) trains a generator and a discriminator in an adversarial game where the discriminator distinguishes real samples from synthetic fakes and the generator learns to fool it. With binary cross-entropy loss and a sigmoid output p = sigma(z), the gradient with respect to the pre-sigmoid logit simplifies cleanly to p - y, while the generator typically minimizes a non-saturating objective with target y = 1.

Week 2Autoencoders

Variational Auto Encoder (VAE)

A Variational Autoencoder (VAE) maps each input to a probabilistic latent distribution parameterized by mean mu and standard deviation sigma, sampling latent codes z = mu + sigma * epsilon via the reparameterization trick so gradients remain differentiable. Training optimizes the Evidence Lower Bound (ELBO), balancing a reconstruction loss (updating both decoder and encoder) against a KL-divergence term that regularizes the latent space toward N(0, I).

Week 3LLM

Reinforcement Learning with Human Feedback (RLHF)

Reinforcement Learning with Human Feedback (RLHF) aligns a language model with human preferences by training a Bradley-Terry reward model on pairwise human rankings and then optimizing the LLM policy to maximize predicted reward. Because discrete token sampling is non-differentiable, practical RLHF uses policy-gradient reinforcement learning such as PPO with a KL-divergence penalty to prevent drifting too far from the base SFT model.

Week 3Transformer

Self Attention

Self-attention enables every token in a sequence to aggregate contextual information from all other tokens in parallel. Each token projects into Query (Q), Key (K), and Value (V) vectors, and softmax-normalized scaled dot products between Q and K weight the V vectors into updated token representations.

Week 3Transformer

Transformer

A Transformer block alternates between two complementary operations: self-attention mixes information horizontally across token positions using learned attention weights, while a position-wise Feed-Forward Network (FFN) transforms feature dimensions vertically at each token independently. Simplified examples like X_1 + X_2 illustrate token mixing conceptually; in real Transformers, each output is a softmax-weighted sum of Value vectors followed by residual connections and layer normalization.

Week 4RAG

Vector Database

A vector database indexes high-dimensional embeddings of text, images, or other unstructured data using Approximate Nearest Neighbor (ANN) structures such as HNSW or IVF so semantic queries execute in milliseconds. At query time, the input is embedded into the same vector space and compared against stored entries via dot product, cosine similarity, or L2 distance to retrieve top-k context for RAG and search.

Week 5Multimodal Models

CLIP

CLIP (Contrastive Language-Image Pre-training) aligns images and text in a shared embedding space by maximizing cosine similarity for matched pairs and minimizing it for mismatched pairs in a mini-batch via symmetric InfoNCE cross-entropy loss. Under softmax and cross-entropy against an identity-matrix target, the gradient with respect to similarity logits simplifies cleanly to p_i - y_i.

Week 5LLM

OpenAI Strawberry (RLHF + CoT)

OpenAI o1 (codenamed Strawberry) combines reinforcement learning with internal Chain-of-Thought (CoT) reasoning so the model generates hidden reasoning tokens before emitting a final answer. Unlike traditional RLHF that optimizes single-pass response preferences, o1 uses large-scale reinforcement learning—largely driven by verifiable outcome rewards—to refine multi-step reasoning and trade extra test-time compute for higher accuracy.

Week 5Multimodal Models

Sora's Diffusion Transformer

Sora's Diffusion Transformer (DiT) generates video by replacing convolutional U-Nets with a Transformer operating directly on spacetime patches in a compressed latent space. Adaptive layer normalization (adaLN) conditions each block on the diffusion timestep and text prompt embeddings so the model iteratively denoises random Gaussian noise into clean video latents before decoding to pixels.

Complete 5-Week Syllabus (27 Topics)

Showing 27 of 27
Week 1BackpropagationFundamentalsVisit
Week 1Batch NormalizationFundamentalsVisit
Week 1GradientFundamentalsVisit
Week 1Matrix MultiplicationFundamentalsVisit
Week 1Multi-Layer Perceptron (MLP)FundamentalsVisit
Week 1SoftmaxFundamentalsVisit
Week 1SVMFundamentalsVisit
Week 2AutoencoderAutoencodersVisit
Week 2DropoutFundamentalsVisit
Week 2Generative Adversarial NetworkGANsVisit
Week 2LSTMFundamentalsVisit
Week 2Mixture of Experts (MoE)FundamentalsVisit
Week 2Recurrent Neural NetworkFundamentalsVisit
Week 2Variational Auto Encoder (VAE)AutoencodersVisit
Week 3Reinforcement Learning with Human Feedback (RLHF)LLMVisit
Week 3Self AttentionTransformerVisit
Week 3TransformerTransformerVisit
Week 4Beginner's Guide to Multi-AgentsAgentVisit
Week 4Beginner's Guide to RAGRAGVisit
Week 4Beginner's Guide to RAG AgentsRAGVisit
Week 4Beginner's Guide to RAG EvaluationRAGVisit
Week 4Query Rewriting RAGRAGVisit
Week 4Vector DatabaseRAGVisit
Week 5AlphaFoldGenerative ModelsVisit
Week 5CLIPMultimodal ModelsVisit
Week 5OpenAI Strawberry (RLHF + CoT)LLMVisit
Week 5Sora's Diffusion TransformerMultimodal ModelsVisit

Frequently Asked Questions

Who is the GenAI by Hand 5-week study plan designed for?

It works best for learners who already know basic Python or ML fundamentals and want concrete, pencil-and-paper intuition for Transformers, LLMs, RAG, and diffusion models before technical interviews.

How is the 5-week GenAI curriculum organized?

Week 1 covers core neural building blocks (dot products, softmax, backpropagation); Week 2 covers classic architectures; Week 3 dives into Transformers and attention; Week 4 explores LLMs, LoRA, and agents; and Week 5 covers diffusion and generative vision models.

Try keywords like RoPE, FlashAttention, DPO, or Blind 75.