PPrepLearn
Progress Β· 0/6 phases

πŸ—“οΈ πŸ—“οΈ All 90 Days Reference β€” AI/LLM Roadmap

10 min read Β· Notion

Every day has a specific deliverable: build something from scratch, then verify it against the library version. Mark Done only when you can explain the mechanism, not just call the function.


Phase 1 β€” Python & Math Foundations (Days 1–15)

DayTopicDaily Milestone
1NumPy vectorizationReplace 3 loop-based computations with vectorized NumPy. Benchmark speedup.
2NumPy broadcastingNormalize a dataset using broadcasting. Explain axis=0 vs axis=1.
3NumPy linear algebra opsMatrix multiply, dot product, norm. Implement cosine similarity from scratch.
4Pandas basicsLoad CSV, inspect, filter, groupby on a real dataset.
5Pandas missing dataHandle missing values 3 ways (drop, median impute, flag). Compare results.
6Pandas encodingOne-hot encode categoricals. Prep a train/test split with no leakage.
7Vectors and dot productsCompute dot product by hand and with NumPy. Explain geometric meaning.
8Matrices as transformationsVisualize a matrix scaling/rotating vectors. Explain what Wx does.
9Eigenvalues and eigenvectorsImplement PCA from scratch using eigendecomposition. Compare to sklearn PCA.
10Matrix rank, determinant, inverseCompute all 3 for a 3x3 matrix by hand and with NumPy.
11Derivatives and gradientsImplement numerical derivative. Compare to analytical derivative for x^2.
12Chain ruleDerive d/dx of a composed function by hand. Verify with PyTorch autograd.
13Gradient descentImplement gradient descent to minimize (x-3)^2. Plot convergence.
14Probability distributions + BayesImplement Bayes theorem on a concrete example (medical test scenario).
15Phase 1 CapstoneLinear regression from scratch with gradient descent. Match sklearn's weights. Plot loss curve.

Phase 2 β€” Classical Machine Learning (Days 16–35)

DayTopicDaily Milestone
16Linear regression with sklearnFit on a real dataset with a Pipeline + StandardScaler.
17Logistic regressionFit a binary classifier. Inspect predict_proba outputs.
18L1 vs L2 regularizationTrain Ridge and Lasso on the same data. Compare which features Lasso zeros out.
19Bias-variance tradeoffTrain models of increasing complexity. Plot train vs test error. Identify overfit point.
20Cross-validationReplace single train/test split with 5-fold CV. Report mean +/- std.
21Classification metricsCompute precision, recall, F1, confusion matrix on an imbalanced dataset.
22Decision treesTrain and visualize a decision tree. Explain a split using Gini impurity.
23Random Forest (bagging)Train Random Forest. Compare variance to a single decision tree.
24Gradient BoostingTrain XGBoost with early stopping. Compare to Random Forest.
25Feature importanceExtract and plot feature importances from your best tree model.
26SVMTrain SVM with RBF kernel. Explain the kernel trick conceptually.
27KNNTrain KNN classifier. Demonstrate performance degradation in high dimensions.
28Curse of dimensionalitySimulate: compute average distance between random points as dimensions increase.
29K-Means clusteringImplement elbow method. Cluster a dataset and visualize.
30DBSCANCompare DBSCAN to K-Means on a non-spherical dataset.
31PCA for visualizationReduce a high-dim dataset to 2D with PCA. Plot and interpret.
32t-SNECompare PCA vs t-SNE visualization on the same dataset.
33Feature engineering pipelineBuild a ColumnTransformer handling numeric + categorical features.
34Hyperparameter tuningGridSearchCV on your best model. Report best params and CV score.
35Phase 2 CapstoneEnd-to-end ML pipeline: EDA, 3 model families, tuning, final eval, feature importance, report.

Phase 3 β€” Deep Learning Foundations (Days 36–55)

DayTopicDaily Milestone
36Neural network forward passImplement forward pass (2-layer) in pure NumPy.
37Activation functionsImplement sigmoid, ReLU, softmax. Plot each. Explain why non-linearity matters.
38Backprop derivationDerive gradients for a 2-layer network by hand on paper.
39Backprop implementationImplement backward pass in NumPy. Train on a toy classification dataset.
40Chain rule in backpropTrace gradient flow through 3 layers by hand. Verify against autograd.
41PyTorch autogradUse torch.autograd to compute gradients. Compare to your NumPy implementation.
42Vanishing/exploding gradientsTrain a deep network with sigmoid vs ReLU. Compare gradient magnitudes.
43PyTorch nn.ModuleBuild an MLP using nn.Module. Train on MNIST.
44PyTorch training loopWrite the full loop: zero_grad, forward, loss, backward, step. Train to convergence.
45Optimizers: SGD vs AdamTrain the same model with SGD and Adam. Compare convergence speed.
46DataLoaders and batchingUse DataLoader with batching + shuffling. Explain why batching matters.
47model.eval() and dropoutAdd Dropout. Show different behavior in train() vs eval() mode.
48CNN: convolution operationImplement a conv layer forward pass conceptually. Explain parameter sharing.
49CNN: build and trainBuild a CNN in PyTorch. Train on CIFAR-10 or similar.
50CNN: pooling and architectureAdd pooling layers. Compare model size vs a fully-connected equivalent.
51Transfer learningFine-tune a pretrained ResNet. Compare to your from-scratch CNN.
52RNN basicsBuild a simple RNN. Explain the hidden state mechanism.
53LSTM/GRUReplace RNN with LSTM. Explain why it handles long sequences better.
54RNN limitationsDocument why RNNs can't parallelize across sequence length (sets up Phase 4).
55Phase 3 CapstoneCNN image classifier + LSTM char-level language model with text generation at 3 temperatures.

Phase 4 β€” NLP & Transformers (Days 56–70)

DayTopicDaily Milestone
56TokenizationTokenize text with a BPE tokenizer. Inspect subword splits on rare words.
57BPE algorithmImplement a simplified BPE merge algorithm conceptually on a tiny corpus.
58EmbeddingsUse nn.Embedding. Explore word similarity using cosine distance on embeddings.
59Self-attention derivationDerive the QKV attention formula on paper. Explain each matrix's role.
60Self-attention implementationImplement scaled dot-product attention from scratch in PyTorch.
61Causal maskingImplement causal masking. Verify: changing a future token doesn't affect past outputs.
62Attention scalingExplain why sqrt(d_k) scaling matters. Show softmax saturation without it.
63Multi-head attentionImplement multi-head attention from scratch (no nn.MultiheadAttention).
64Residual connections + LayerNormAdd both to your transformer block. Explain why they help gradient flow.
65Positional encodingImplement sinusoidal positional encoding. Explain why attention needs it.
66Full Transformer blockAssemble: attention + residual + FFN + residual + norm. Stack N blocks.
67BERT architectureLoad a pretrained BERT. Explain encoder-only + bidirectional + MLM pretraining.
68GPT architectureLoad GPT-2. Generate text. Explain decoder-only + causal + next-token pretraining.
69BERT vs GPT decisionWrite up: when would you use an encoder vs decoder architecture? With examples.
70Phase 4 CapstoneGPT-style transformer from scratch (no nn.Transformer) + fine-tuned BERT on a real task.

Phase 5 β€” LLMs & Applied GenAI Engineering (Days 71–90)

DayTopicDaily Milestone
71Temperature samplingImplement temperature scaling. Generate text at temp 0.1, 1.0, 2.0. Compare.
72Top-k and top-p samplingImplement both from scratch. Explain when to use each.
73Prompt engineering patternsWrite few-shot and chain-of-thought prompts. Compare output quality to zero-shot.
74Embeddings for retrievalEmbed a small document set. Compute cosine similarity for a query.
75FAISS vector searchBuild a FAISS index. Run nearest-neighbor search. Explain HNSW conceptually.
76Vector DB comparisonCompare FAISS vs Chroma vs Pinecone tradeoffs (local vs managed, scale).
77RAG: chunking strategyChunk a document 3 ways (size/overlap). Compare retrieval quality qualitatively.
78RAG: full pipelineBuild index -> retrieve -> generate pipeline with LangChain or from scratch.
79RAG: source citationsModify your pipeline to always return source documents with the answer.
80RAG: hybrid searchAdd BM25 keyword search alongside vector search. Compare results.
81RAG: re-rankingAdd a cross-encoder re-ranker. Measure precision improvement on top-K.
82RAG: failure modesTest your RAG on a question with no good answer in your docs. Does it say "I don't know"?
83LoRA concept and configSet up a LoraConfig. Print trainable params %. Explain the low-rank math.
84LoRA fine-tuningFine-tune a small model with LoRA on a custom dataset.
85QLoRA and quantizationLoad a model in 4-bit. Fine-tune with QLoRA. Compare memory usage to full fine-tune.
86Fine-tune vs RAG decisionWrite a decision framework: when to fine-tune, when to RAG, when to just prompt.
87Function calling / tool useImplement a function-calling agent with 2 tools. Test multi-step tool use.
88ReAct agent patternBuild a ReAct loop: thought -> action -> observation -> repeat until answer.
89Evaluation harnessBuild a 20-question golden eval set. Run faithfulness + relevance metrics.
90Phase 5 CapstoneProduction RAG app: ingestion + retrieval + generation + evals + FastAPI + UI + README with limitations.

Daily ritual

  1. Open this table. Find today's row.
  2. Read the concept explanation in the phase page.
  3. Implement the "from scratch" version first β€” resist reaching for the library immediately.
  4. Verify correctness against the library/pretrained version.
  5. Log in tracker: tick Built from scratch and Used the library version.
  6. Write one Key insight in your own words β€” not copied from the explanation.
  7. Mark Done only if you could explain today's mechanism to someone else without notes.

Related