Practical AI · Python required for reproducible project
Build the Loop, Measure the Wait
A generator repeatedly scores possible next tokens, chooses one and extends its input. The loop around the model determines when it stops and what work gets measured. First explore text and image mechanisms, then implement a bounded text-token loop and test whether caching preserves its calculations.
Authored explanation · fixed examples, not a live experiment.
Fixed model + exact prompt → bounded token loop
→Compare scores and instrument prefill/decode
→Reproducible implementation with explicit measurement limits
Implement bounded generation, test cached and uncached equivalence, and measure clearly defined timing boundaries.
What you will make
Implement bounded generation, test cached and uncached equivalence, and measure clearly defined timing boundaries.
Use P25 or equivalent Python functions, lists and test skills. Shared mechanism lessons require no code; this course’s implementation module and project require local Python execution.
You can open any lesson directly, skip familiar practice and return to saved work. Optional review is separate from course requirements.
Start the courseReview Programming for AI preparation or use equivalent Python skills. Shared mechanism lessons remain open without it.
0/21 lessons marked complete. Participation is not certified proficiency.
Your course
5 modules · 21 lessons · one separate project.
Module 1: One Token at a Time
See how a context becomes a set of possible next tokens, and why a likely answer is not necessarily true.
Open module overviewModule 2: Before the First Token
Separate prompt processing, token generation and cached work.
Open module overviewModule 3: Pictures from Noise
Learn how noise prediction and repeated updates can generate samples.
Open module overviewModule 4: Beyond the Base Model
Separate training, context, retrieval and checked tool execution.
Open module overviewModule 5: Inside the Generation Loop
Bound token generation, instrument its phases and test cache correctness.
Open module overviewThe Instrumented Generator
The course requires practice in its 21 lessons and a project containing six evidence responses. Previously completed shared lessons can be reused. This course’s project remains separate.
Open the project brief and review criteriaA human reviewer checks reasoning, accuracy, limitations and transfer. “Ready for review” records your declaration, sends nothing and does not award a passing assessment.
How you will practice
Work with labeled teaching models, fictional source packs and supplied examples. Compare examples, calculate where needed and write decisions in the page. These activities require no live AI service. Your writing is retained in this browser with export/import through My Learning.
Follow the worked examples for guided understanding. For stronger evidence, complete the project under its stated conditions and ask a teacher, colleague or peer to review it. The final project requires running the supplied Python comparison, implementing and testing its small extension, and retaining a runnable package. Reading browser pages alone does not meet that requirement.