Phase 4: Generative AI Frontier (Months 9–10)¶
This is where you stop being a competent ML engineer and start being dangerous. The previous three phases built your foundations — linear algebra, classical ML, deep learning, transformers. Phase 4 is where all of that becomes load-bearing. You’ll operate at the level of the people who actually build and fine-tune LLMs, not just call APIs with a temperature parameter.
The honest framing: LLMs are probabilistic text models trained on token prediction objectives. Every capability you see — reasoning, code generation, instruction following — emerges from scale, data curation, and alignment training applied on top of that single objective. Once you internalize this mechanism, the hype dissolves and the engineering problem becomes tractable.
LLM Ecosystem Map (2025–2026)¶
The landscape has consolidated around a few clear patterns. Pretrained base models are commoditized; the differentiation lives in alignment quality, inference efficiency, and application architecture.
What Most People Get Wrong¶
“Treating LLMs as black boxes instead of probabilistic text models.”
The single most expensive conceptual error in this field. The moment you start thinking “the model knows X” or “the model understands Y,” you’ve left engineering and entered anthropomorphism. The model has a distribution over next tokens conditioned on context. That’s it. Instruction following works because the training data contained examples of instruction-following text. Reasoning works when you structure the prompt to elicit reasoning-shaped token sequences. Chain-of-thought prompting works because “Let me think step by step” appears before correct answers in the training corpus.
This isn’t reductive — it’s mechanistically accurate. And it tells you exactly how to debug failures.
Phase Exit Criteria (End of Month 10)¶
You pass this phase when you can answer “yes” to all of the following without hesitation:
Can you explain why DPO is mathematically equivalent to RLHF under certain assumptions, and where the equivalence breaks down?
Can you fine-tune a 7B LLM on an 8GB GPU using QLoRA without running out of memory? Can you explain why 4-bit quantization + LoRA works while naive 4-bit fine-tuning doesn’t?
Can you build a RAG pipeline from scratch — chunking → embedding → retrieval → generation — and evaluate it with RAGAS?
Can you articulate the exact failure modes of LLM agents in production and design infrastructure guardrails to mitigate them?
Can you benchmark two inference serving backends (throughput in tokens/sec, TTFT in ms, p99 latency) on the same hardware?
Have you completed at least 1 of the 3 phase projects in
06_phase_projects.md?
Phase Contents¶
File |
Topic |
Estimated Study Time |
|---|---|---|
SFT, RLHF, DPO, GRPO, Constitutional AI |
12–15 hrs |
|
LoRA, QLoRA, adapters, prefix tuning |
8–10 hrs |
|
RAG architecture, evaluation, advanced patterns |
10–12 hrs |
|
Agents, ReAct, tool use, production reliability |
8–10 hrs |
|
Vision-language, audio, multi-modal RAG |
6–8 hrs |
|
3 portfolio projects — hard gate |
20–30 hrs |
Total: ~70 hours over 8 weeks, ~9 hrs/week (fits within your 10–15 hr/week budget with buffer for depth).
Prerequisite Check¶
You should have Phase 3 (Transformers & Attention) complete. Specifically:
You understand multi-head self-attention at the matrix multiplication level
You’ve implemented a transformer block from scratch (not just
nn.TransformerEncoderLayer)You understand positional encoding, layer normalization, and residual connections
If those are shaky, consolidate before proceeding. Phase 4 builds on all of them simultaneously.
Return to Phase 3 README · Next: 01_llm_alignment_and_finetuning.md