5050 }%
5151}
5252
53+ % --- Section count for navigation (must match actual \section{} count) ---
54+ \setcounter {mlsystotalsections}{7}
55+
56+ \title {Course Overview}
57+ \author {Vijay Janapa Reddi}
58+ \institute {Harvard University}
59+ \date {}
60+
61+ \begin {document }
62+
63+ % =============================================================================
64+ % TITLE SLIDE
65+ % =============================================================================
66+ \mlsystitle {Course Overview}{The Physics of AI Engineering}{cover_course_overview.png}
67+
68+ % =============================================================================
69+ % VISUAL LANGUAGE & ORIENTATION
70+ % =============================================================================
5371
5472\begin {frame }{Visual Language}
5573\note {
93111\end {columns }
94112\end {frame }
95113
96- % --- Section count for navigation (must match actual \section{} count) ---
97- \setcounter {mlsystotalsections}{7}
114+ \begin {frame }{How to Read This Textbook}
115+ \note {
116+ % -- LINK: Students just learned the visual language. This slide orients them
117+ % to the textbook structure they will use all semester.
118+ %
119+ % -- NARRATE: ``The textbook has two volumes. Volume I---this course---covers
120+ % single-machine systems: 1--8 GPUs, shared memory, one node. Volume II covers
121+ % multi-machine distributed systems---that is a follow-on course. Volume I has
122+ % four parts: Foundations, Build, Optimize, Ship. Five lighthouse models recur
123+ % in every chapter as running examples.''
124+ %
125+ % -- ENGAGE: ``How many of you have used a two-volume textbook before?'' Show
126+ % of hands.
127+ %
128+ % -- WARN: Students may skip Part I thinking they ``already know ML.'' Correct
129+ % framing: Part I establishes the analytical vocabulary that every later chapter
130+ % depends on.
131+ %
132+ % -- FLEX: [CORE] Orientation slide for Day 1.
133+ % IF SHORT: Show for 60 seconds, highlight the four parts only.
134+ }
98135
99- \title {Course Overview}
100- \author {Vijay Janapa Reddi}
101- \institute {Harvard University }
102- \date { }
136+ \footnotesize
137+ \begin { columns }[T]
138+ \begin { column }{0.48 \textwidth }
139+ \textbf { Two-volume structure: }
103140
104- \begin {document }
141+ \vspace {0.1cm}
142+ \textcolor {computestroke}{\textbf {Volume I }} (this course):\\
143+ {\scriptsize Single-machine systems, 1--8 GPUs, shared memory}
105144
106- % =============================================================================
107- % TITLE SLIDE
108- % =============================================================================
109- \mlsystitle {Course Overview}{The Physics of AI Engineering}{}
145+ \vspace {0.1cm}
146+ \textcolor {datastroke}{\textbf {Volume II }} (follow-on):\\
147+ {\scriptsize Distributed systems, multi-node, fleet-scale}
148+
149+ \vspace {0.15cm}
150+ \textbf {Four Parts in Volume I: }
151+ \begin {enumerate }\setlength\itemsep {0pt}
152+ \item {\scriptsize \textbf {Foundations } --- frameworks \& physics}
153+ \item {\scriptsize \textbf {Build } --- data, training, architectures}
154+ \item {\scriptsize \textbf {Optimize } --- compression \& hardware}
155+ \item {\scriptsize \textbf {Ship } --- serving, ops, ethics}
156+ \end {enumerate }
157+ \end {column }
158+ \begin {column }{0.48\textwidth }
159+ \vspace {0.1cm}
160+ \begin {mlsyscard }{crimson}
161+ \textbf {Lighthouse Models }\\ [0.1cm]
162+ {\scriptsize Five models recur in every chapter:}
163+ \begin {itemize }\setlength\itemsep {0pt}
164+ \item {\scriptsize ResNet-50 (compute-bound)}
165+ \item {\scriptsize GPT-2 (memory-BW-bound)}
166+ \item {\scriptsize MobileNetV2 (latency-bound)}
167+ \item {\scriptsize DLRM (data I/O-bound)}
168+ \item {\scriptsize KWS (power-bound)}
169+ \end {itemize }
170+ {\scriptsize Same concept, different constraint regime.}
171+ \end {mlsyscard }
172+ \end {column }
173+ \end {columns }
174+
175+ \end {frame }
110176
111177% =============================================================================
112178% WELCOME & COURSE IDENTITY
@@ -511,7 +577,65 @@ \section{Three Frameworks}
511577
512578\end {frame }
513579
514- % --- ACTIVE LEARNING 1: Predict ---
580+ % --- ACTIVE LEARNING: Quantitative Exercise ---
581+ \begin {frame }{Exercise: When to Retrain?}
582+ \note {
583+ % -- LINK: The Degradation Equation just introduced $A(t) = A_0 - \alpha
584+ % \cdot \Delta$. This exercise applies it with concrete numbers.
585+ %
586+ % -- NARRATE: ``A fraud detector starts at 94\% accuracy. It drifts at
587+ % $\alpha = 0.03$ per month with $\Delta$ growing linearly at 0.33 per month.
588+ % The retraining trigger is 90\%. When does it fire?'' Give students 60 seconds.
589+ %
590+ % -- ENGAGE: Students calculate individually, then compare with a neighbor.
591+ % Expected answer: $0.94 - 0.03 \times 0.33 \times t = 0.90$. Solving:
592+ % $0.04 = 0.01 \times t$, so $t \approx 4$ months.
593+ %
594+ % -- WARN: Students may forget that $\Delta$ grows over time. Correct framing:
595+ % drift is cumulative---each month the distribution moves further from training.
596+ % IF STUCK: ``What is $A(t)$ at month 1? Month 2? See the pattern?''
597+ %
598+ % -- FLEX: [CORE] First quantitative exercise of the course.
599+ % IF SHORT: Show the problem, reveal the answer after 30 seconds, move on.
600+ }
601+
602+ \small
603+ \begin {columns }[T]
604+ \begin {column }{0.55\textwidth }
605+ {\normalsize\bfseries When Does the Alarm Fire?}
606+
607+ \vspace {0.2cm}
608+ A fraud detector has:
609+ \begin {itemize }\setlength\itemsep {0pt}
610+ \item $ A_0 = 94 \% $ accuracy at deployment
611+ \item Drift rate: $ \alpha \cdot \Delta (t) \approx 1 \% $ per month
612+ \item Retraining trigger: $ A(t) < 90 \% $
613+ \end {itemize }
614+
615+ \vspace {0.15cm}
616+ \textbf {When does it cross the 90\% threshold? }
617+
618+ {\footnotesize\textcolor {midgray}{(60 seconds --- then compare with a neighbor)}}
619+ \end {column }
620+ \begin {column }{0.42\textwidth }
621+ \pause
622+ \begin {mlsyscard }{errorstroke}
623+ \textbf {Solution: }\\ [0.1cm]
624+ {\footnotesize
625+ $ A(t) = 0.94 - 0.01 t$ \\ [0.1cm]
626+ Month 1: 93\% \\
627+ Month 2: 92\% \\
628+ Month 3: 91\% \\
629+ \textcolor {errorstroke}{\textbf {Month 4: 90\% }} $ \leftarrow $ trigger\\ [0.1cm]
630+ Retrain by month 3--4 to stay above SLA.
631+ }
632+ \end {mlsyscard }
633+ \end {column }
634+ \end {columns }
635+
636+ \end {frame }
637+
638+ % --- ACTIVE LEARNING: Predict ---
515639\begin {frame }{Predict: Which Constraint?}
516640\note {[2 min] Prediction exercise. Give students 60 seconds. The point is to
517641prime their intuition before we introduce the lighthouse models.
@@ -538,6 +662,59 @@ \section{Three Frameworks}
538662
539663\end {frame }
540664
665+ % --- Bridge: Frameworks to Lighthouses ---
666+ \begin {frame }{From Diagnostic Tools to Patients}
667+ \note {
668+ % -- LINK: Students just learned three analytical frameworks (D-A-M, Iron Law,
669+ % Degradation Equation). This bridge slide connects them to the lighthouse
670+ % models they will diagnose.
671+ %
672+ % -- NARRATE: ``Frameworks are diagnostic tools---like a stethoscope, a blood
673+ % pressure cuff, and a thermometer. Lighthouses are the patients we diagnose.
674+ % D-A-M tells you WHERE the bottleneck is. The Iron Law tells you HOW LONG
675+ % it takes. The Degradation Equation tells you WHEN it will fail. Now we need
676+ % patients to examine. That is what the five lighthouse models are.''
677+ %
678+ % -- ENGAGE: ``If D-A-M is the stethoscope, what is the Iron Law?'' Give 10
679+ % seconds. Accept any reasonable medical analogy.
680+ %
681+ % -- WARN: Students may think frameworks and lighthouses are separate topics.
682+ % Correct framing: they are inseparable---you always apply a framework TO a
683+ % specific model on specific hardware.
684+ %
685+ % -- FLEX: [CORE] Essential bridge. Keep to 60 seconds.
686+ % IF SHORT: State the analogy in one sentence and move on.
687+ }
688+
689+ \centering
690+ \vspace {0.6cm}
691+ {\large\bfseries Frameworks are diagnostic tools.\\ [0.3cm]
692+ Lighthouses are the patients we diagnose.}
693+
694+ \vspace {0.5cm}
695+ \begin {columns }[c]
696+ \begin {column }{0.30\textwidth }
697+ \centering
698+ \textcolor {datastroke}{\textbf {\DAM {} }}\\ [0.1cm]
699+ {\small \emph {Where } is the\\ bottleneck?}
700+ \end {column }
701+ \begin {column }{0.30\textwidth }
702+ \centering
703+ \textcolor {computestroke}{\textbf {Iron Law }}\\ [0.1cm]
704+ {\small \emph {How long } does\\ it take?}
705+ \end {column }
706+ \begin {column }{0.30\textwidth }
707+ \centering
708+ \textcolor {errorstroke}{\textbf {Degradation }}\\ [0.1cm]
709+ {\small \emph {When } will\\ it fail?}
710+ \end {column }
711+ \end {columns }
712+
713+ \vspace {0.5cm}
714+ {\normalsize $ \downarrow $ \textbf {Apply these tools to five lighthouse models } $ \downarrow $ }
715+
716+ \end {frame }
717+
541718% =============================================================================
542719\section {Lighthouse Models }
543720% =============================================================================
@@ -773,11 +950,11 @@ \section{A Taste}
773950the Iron Law. This is the kind of reasoning you will learn.
774951Ask: `` Where does the \$ 100M go?'' }
775952
776- \footnotesize
953+ \scriptsize
777954\textbf {A back-of-envelope calculation: }
778955
779- \vspace {0.1cm }
780- \renewcommand {\arraystretch }{1.1 }
956+ \vspace {0.05cm }
957+ \renewcommand {\arraystretch }{1.05 }
781958\begin {tabular }{@{}llr@{}}
782959 \toprule
783960 \textbf {Factor } & \textbf {Estimate } & \textbf {Source } \\
@@ -792,9 +969,9 @@ \section{A Taste}
792969 \bottomrule
793970\end {tabular }
794971
795- \vspace {0.1cm }
972+ \vspace {0.05cm }
796973\begin {mlsyscard }{crimson}
797- {\footnotesize \textbf {Every number traces back to the Iron Law. } The cost follows from physics. This course teaches you to derive these numbers.}
974+ {\scriptsize \textbf {Every number traces back to the Iron Law. } The cost follows from physics. This course teaches you to derive these numbers.}
798975\end {mlsyscard }
799976
800977\end {frame }
@@ -805,27 +982,23 @@ \section{A Taste}
805982distillation --- these are the tools of Part III (Optimize).
806983Leave this as a teaser --- `` We will solve this problem.'' }
807984
808- \footnotesize
985+ \scriptsize
809986\begin {columns }[T]
810987 \begin {column }{0.55\textwidth }
811988 \textbf {GPT-4 at full precision (FP32): }
812989 Model size $ \sim $ 3.6 TB. Phone RAM: 8 GB. \textcolor {errorstroke}{\textbf {Gap: 450$ \times $ . }}
813990
814- \vspace {0.1cm}
815- \textbf {How do we close the gap? }
816-
817991 \vspace {0.05cm}
992+ \textbf {How do we close the gap? }
818993 \begin {itemize }\setlength\itemsep {0pt}
819994 \item \textcolor {computestroke}{\textbf {Quantization }} --- FP32 $ \to $ INT4 (8$ \times $ smaller)
820995 \item \textcolor {datastroke}{\textbf {Pruning }} --- remove redundant weights
821996 \item \textcolor {routingstroke}{\textbf {Distillation }} --- train a smaller model
822997 \end {itemize }
823-
824- \vspace {0.05cm}
825998 Part III of this course teaches all three.
826999 \end {column }
8271000 \begin {column }{0.42\textwidth }
828- \renewcommand {\arraystretch }{1.1 }
1001+ \renewcommand {\arraystretch }{1.0 }
8291002 \begin {tabular }{@{}lrr@{}}
8301003 \toprule
8311004 \textbf {Tier } & \textbf {RAM } & \textbf {Gap } \\
@@ -837,7 +1010,7 @@ \section{A Taste}
8371010 \bottomrule
8381011 \end {tabular }
8391012
840- \vspace {0.1cm }
1013+ \vspace {0.05cm }
8411014 \begin {mlsyscard }{errorstroke}
8421015 You cannot `` just deploy'' a model. The deployment spectrum forces trade-offs at every tier.
8431016 \end {mlsyscard }
@@ -937,54 +1110,66 @@ \section{A Taste}
9371110% =============================================================================
9381111\appendix
9391112
940- \begin {frame }{Backup: Iron Law Dimensional Analysis}
941- \note {Use for additional depth or if students need alternative explanation.}
942- \small
943- Use if students ask about dimensional consistency.
944-
1113+ \begin {frame }{Backup: Iron Law Quick Calculation}
1114+ \note {
1115+ % -- NARRATE: Use if students want to see a concrete Iron Law application.
1116+ % Walk through the voice assistant example: data loading, compute, and
1117+ % orchestration overhead.
1118+ %
1119+ % -- FLEX: [OPTIONAL] Backup for students who want more practice.
1120+ }
9451121\small
946- Each Iron Law term resolves to \textbf { seconds }:
1122+ \textbf { Example: Voice assistant keyword detection on Arduino Nicla }
9471123
948- \vspace {0.2cm }
949- \renewcommand {\arraystretch }{1.2 }
1124+ \vspace {0.15cm }
1125+ \renewcommand {\arraystretch }{1.15 }
9501126{\footnotesize
951- \begin {tabular }{@{}lll @{}}
1127+ \begin {tabular }{@{}llll @{}}
9521128 \toprule
953- \textbf {Term } & \textbf {Units } & \textbf {Resolves to } \\
1129+ \textbf {Term } & \textbf {Variables } & \textbf {Calculation } & \textbf {Time } \\
1130+ \midrule
1131+ \textcolor {datastroke}{Data} & 16 KB audio, 50 MB/s & $ 16 \text {K}/50 \text {M}$ & \textbf {0.32 ms } \\
1132+ \textcolor {computestroke}{Compute} & 6M FLOPs, 0.5 GF, $ \eta $ =0.3 & $ 6 \text {M}/(0.15 \text {G})$ & \textbf {40 ms } \\
1133+ \textcolor {errorstroke}{Overhead} & Wake-up + preprocess & --- & \textbf {2 ms } \\
9541134 \midrule
955- $ D_{\text {vol}} / BW$ & Bytes / (Bytes/s) & seconds \\
956- $ O / (R_p \cdot \eta )$ & FLOPs / (FLOPs/s) & seconds \\
957- $ L_{\text {lat}}$ & seconds & seconds \\
1135+ & & $ T_{\text {total}}$ & \textbf {42.3 ms } \\
9581136 \bottomrule
9591137\end {tabular }
9601138}
9611139
962- \vspace {0.2cm }
963- You can always check your calculation: if the units do not resolve to seconds, the equation is wrong .
1140+ \vspace {0.15cm }
1141+ \textbf { Diagnosis: } Compute-bound. But power is the real constraint: 0.5 mW budget means duty cycling .
9641142\end {frame }
9651143
966- \begin {frame }{Backup: Deployment Spectrum Extended}
967- \note {Use for additional depth or if students need alternative explanation.}
1144+ \begin {frame }{Backup: Degradation Equation Month-by-Month}
1145+ \note {
1146+ % -- NARRATE: Use if students struggled with the retraining exercise.
1147+ % Walk through the full table showing accuracy at each month.
1148+ %
1149+ % -- FLEX: [OPTIONAL] Scaffolding for the quantitative exercise.
1150+ }
9681151\small
969- Use if students want more detail on TinyML vs. \ Mobile.
1152+ \textbf { Fraud detector degradation timeline: }
9701153
971- \small
1154+ \vspace {0.15cm}
9721155\renewcommand {\arraystretch }{1.15}
9731156{\footnotesize
974- \begin {tabular }{@{}lllll @{}}
1157+ \begin {tabular }{@{}lrrrl @{}}
9751158 \toprule
976- \textbf {Tier } & \textbf { Device } & \textbf { RAM } & \textbf { Compute } & \textbf {Power } \\
1159+ \textbf {Month } & $ \Delta (P) $ & $ \alpha \cdot \Delta $ & $ A(t) $ & \textbf {Status } \\
9771160 \midrule
978- Cloud & H100 & 80 GB HBM3 & 989 TF & 700 W \\
979- Edge & Orin NX & 32 GB LPDDR5 & 100 TOPS & 15--40 W \\
980- Mobile & Flagship SoC & 8 GB LPDDR5 & 17 TOPS & 3--5 W \\
981- TinyML & Arduino Nicla & 384 KB SRAM & 0.5 GF & 100 mW \\
1161+ 0 & 0.00 & 0.0\% & 94.0\% & Deployed \\
1162+ 1 & 0.33 & 1.0\% & 93.0\% & Normal \\
1163+ 2 & 0.67 & 2.0\% & 92.0\% & Normal \\
1164+ 3 & 1.00 & 3.0\% & 91.0\% & \textcolor {routingstroke}{Watch} \\
1165+ 4 & 1.33 & 4.0\% & \textcolor {errorstroke}{90.0\% } & \textcolor {errorstroke}{\textbf {Retrain trigger }} \\
1166+ 6 & 2.00 & 6.0\% & 88.0\% & SLA violation \\
9821167 \bottomrule
9831168\end {tabular }
9841169}
9851170
9861171\vspace {0.15cm}
987- The gap from Cloud to TinyML spans $ 10 ^ 5 \! \times $ in memory and $ 10 ^ 6 \! \times $ in compute. Each tier requires fundamentally different engineering .
1172+ \textbf { Key: } Retrain at month 3--4. Waiting until month 6 means 2 months of SLA violations .
9881173\end {frame }
9891174
9901175\end {document }
0 commit comments