Scaling Laws and Pretraining: Why Bigger Became Better
You've arrived at the final course, and it answers the question the whole Deep Learning and NLP arc has been building toward: how did "predict the next word" — the humble n-gram t…
Large Language Models and AI Engineering covers: Scaling Laws and Pretraining, From Predictor to Assistant, Prompt Engineering, Retrieval-Augmented Generation and Fine-Tuning, Making It Run. Year 4, Quarter 16. Includes 14 exercises and 3 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
You've arrived at the final course, and it answers the question the whole Deep Learning and NLP arc has been building toward: how did "predict the next word" — the humble n-gram t…
The base model from the last lesson — a giant next-token predictor trained on the internet — is not the ChatGPT or Claude you talk to. If you hand a raw pretrained model the promp…
Here is the strangest and most consequential fact about aligned LLMs: you program them in plain English. There's no API of functions to call, no parameters to tune, no code to wri…
Prompting (last lesson) is powerful but hits a hard wall: the model only knows what was in its training data, frozen at its pretraining cutoff. It doesn't know your company's inte…
You've learned to build with LLMs — prompt them, ground them with retrieval, fine-tune them. Now the unglamorous, load-bearing reality: running LLMs is expensive, slow, and hard t…
This is the final lesson — of this course, of Quarter 16, and of the entire four-year computer-science journey — and it's the one that turns everything you've learned into respons…
- [ ] Prompt engineering exercises — Write zero-shot, few-shot, chain-of-thought prompts for 5 tasks (classification, extraction, summarization, code generation, reasoning) - [ ] …
- [ ] Fine-tune a model with LoRA — Use PEFT library to fine-tune Llama-2 7B on a custom dataset (< 1000 examples) - [ ] Implement a RAG system with evaluation — Chunk strategy co…
- [ ] Quantize a model — Apply GPTQ/AWQ quantization to a 7B model, benchmark speed vs quality tradeoff - [ ] Implement RLHF concepts — Build a reward model from human preferences…
- [ ] Red-team an LLM — Systematically find prompt injection, jailbreak, and data extraction vulnerabilities; document and propose mitigations
- [ ] Build a full AI application — RAG-powered chatbot for a specific domain (e.g., Ruby on Rails documentation): document ingestion, chunking, embedding, vector store, retrieval…
Build a retrieval-augmented generation system: chunk documents (experiment with fixed-size vs semantic chunking), embed with sentence-transformers, store in ChromaDB or FAISS, ret…
Build an LLM agent that can: search the web (via API), run Ruby code (sandboxed), query a SQLite database, and read files. Implement a simple planning loop: the agent reasons abou…
Build a Python tool that evaluates LLM outputs on a test set: compute ROUGE, BERTScore, and custom rubric-based scores (using an LLM-as-judge). Support side-by-side comparison of …
- [ ] What is RAG (Retrieval-Augmented Generation)? Explain the pipeline: chunk, embed, store, retrieve, generate. - [ ] What is LoRA? How does it enable efficient fine-tuning? - …
- [ ] Course 16.1 knowledge check passed - [ ] Course 16.2 knowledge check passed - [ ] AI Code Review Assistant capstone completed
Complete all of the following:
17 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.