COE 592Lecture 01
Why efficient deep learning
Why modern vision, generative and language models cost so much to train and run, how algorithm, hardware and data together drive deep learning, and why the huge gap between cloud GPUs, phones and microcontrollers makes efficiency the central problem for embedded and edge AI.
- Parts
- 3
- Concepts
- 15
- Slides
- 24
- Reading
- 90 min
AOverview
Modern deep learning is expensive and it is everywhere. This lecture measures both halves of that sentence: how much computation and memory the models you already use actually cost, and how little of either the devices you want to deploy on can supply. Between those two measurements sits the question every later lecture answers, which is how to shrink a model without giving away the accuracy that made it worth running.
As a PhD student you need this lecture in three places. Exams turn it into arithmetic: a reduction ratio between two models, bytes per parameter at a given precision, a frame rate converted into milliseconds and checked against a budget, or TOPS per watt for a GPU generation. Your research project puts a model on a board with kilobytes of SRAM, and the sizing step you defend there is this lecture's comparison of demand against supply. And every efficient-model paper you read from now on, from MCUNet to an edge language model, opens by making exactly the trade you will learn to state in one line: what the model costs, what the target can pay, and how large the gap is.
The path has five stops. You watch ImageNet error fall from 28.2% to 2.3% and ask what each drop cost, then read the frontier chart where accuracy is bought with MACs and parameters and see architecture search bend that frontier downward. You follow the same question into models that are not classifiers at all, promptable segmentation, video diffusion, 3D perception and language models, where the bill is set by tokens and denoising steps rather than parameter count. You then measure supply, reading a data center GPU trajectory of 94x more compute on 2.8x the power against phone NPUs, Jetson modules and a microcontroller at 320 kB of SRAM. The lecture closes on the ratio between the two measurements, 80 GB of cloud activation memory against 320 kB on a microcontroller, about 250,000x end to end.
The numbers this lecture anchors
Each row is introduced with its own worked arithmetic in one of the three parts, so that by the end of the lecture no number here is a fact you memorized. They are the anchors the exam and the reference sheet return to, and the vocabulary every later lecture assumes.
| Anchor | Number | Why it matters |
|---|---|---|
| ImageNet top-5 error | 28.2% to 2.3%, human 5.1% | Accuracy arrived, but each step was paid for in computation and model size. |
| Once-for-All against Xception | 14.1x less compute, 80.0% top-1 | Architecture search moves the frontier left instead of climbing it. |
| MCUNet on a Cortex-M7 | 320 kB SRAM, 1 MB flash | TinyML runs where a phone's memory is already three orders of magnitude away. |
| EfficientViT-SAM against SAM | 538 img/s versus 11 img/s, 48.9x | Replace the block that dominates the cost and keep the rest untouched. |
| Stable Diffusion training | 256 A100s, 150k GPU-hours, $600,000 | Generative cost follows tokens and steps, not parameters. |
| Fast-LiDARNet | 5 fps to 47 fps inside a 33.3 ms budget | Turn a rate into a frame time before arguing that a system is real time. |
| MT-NLG weights | 530 B parameters, 1,060 GB, 14 A100 80 GB GPUs | Model size outgrew GPU memory, so serving alone needs a cluster. |
| Cloud to tiny activation memory | 80 GB to 320 kB, 250,000x | The gap the rest of the course exists to close on the model side. |
Success looks like
- State the course challenge in one sentence and name the three pillars, algorithm, hardware and data, with one efficiency lever for each.
- Define top-5 error and top-1 accuracy precisely, say why the two cannot be compared directly, and read a bubble chart of accuracy against MACs and parameters.
- Compute a computation reduction ratio, such as 8400 / 595 = 14.1x, and explain the Pareto frontier shift that architecture search produces.
- Convert parameters and precision into bytes, divide by a device budget, and report the overshoot as a ratio, for example 102 MB of FP32 ResNet-50 weights against 1 MB of flash.
- Turn a rate into a time, compare it against a budget, and say which of two levers crosses the line, as in 5 fps to 47 fps against a 33.3 ms frame period.
- Read a GPU spec sheet: define TOPS, memory bandwidth and TDP, and compute TOPS per watt for any generation.
- Compare cloud, mobile and tiny tiers on activation memory and weight storage, separate the two budgets, and decide whether a given model fits each tier.
How to study this lecture
- Read the parts in order. Demand comes before supply: the model costs of the first two parts only become meaningful once the third part shows what a device can pay.
- Keep a pencil next to every worked example. Compute the slide's number before you reveal it, then check yourself against the arithmetic in the concept.
- Answer every recall prompt in your head before opening it. Ratios that you retrieved stay; the ones you only read do not.
- Take each quiz and read the explanation even when you are right; the wrong options are the exam traps.
- Read the slide errata carefully. Several slides carry inherited arithmetic slips, and spotting why a number is wrong is the best proof that you own the computation behind it.
- Mark a concept understood only when you could redo its number and its ratio from a blank page. Unmarked concepts show you where to return.
- Come back after a few days and size a model cold on a device you have not used, such as the board your own project targets. Spaced practice on a new example is what turns a formula into a skill.
Sources
- MIT 6.5940 TinyML and Efficient Deep Learning Computing, Fall 2024DocsMIT HAN Lab, Song HanThe source deck this lecture follows, with its cost-of-accuracy charts, the efficient-model case studies, the GPU and edge accelerator trajectory and the cloud, mobile and tiny tiers.(opens in a new tab)
- Efficient Processing of Deep Neural Networks: A Tutorial and SurveyPaperSze, Chen, Yang and Emer, Proceedings of the IEEE 2017The MAC as the fundamental operation of a network, and the reference counts for ResNet-50 and for the energy of a multiply and a memory access.(opens in a new tab)
BThe 3 parts
- 01Accuracy comes at a costDeep learning now beats humans on ImageNet, but every accuracy gain was paid for in computation and model size, and efficient design (NAS, MCUNet, on-device training) is what brings it to phones and IoT devices.6 conceptsSlides 1-836 min
- 1.1Deep learning is everywhere and expensive: the challenge of this course
- 1.2ImageNet: eight years from 28.2% to below human
- 1.3Reading the bubble chart: accuracy is bought with MACs and parameters
- 1.4Architecture search moves the frontier: 14x less compute at equal accuracy
- 1.5TinyML: deep learning on a microcontroller with kilobytes of memory
- 1.6Learning on the device: why it is wanted and why it is hard
- 02Segmentation, generative models and LLMsPromptable segmentation, diffusion models, 3D perception and large language models push computation and memory far beyond classification, and each has an efficient counterpart that recovers speed without losing quality.5 conceptsSlides 9-1630 min
- 2.1Promptable segmentation: one heavy encoder, one cheap decoder
- 2.2Generative models: tokens and steps set the bill, not parameters
- 2.3DistriFusion: splitting one image across GPUs without splitting the story
- 2.4Fast-LiDARNet: reaching real time by co-designing kernels and model
- 2.5LLMs outgrow GPU memory, and why they must still run at the edge
- 03Cloud and edge AI hardware, and the gap between themHow NVIDIA data center GPUs, mobile NPUs, Jetson modules and microcontrollers compare in performance, power and memory, and why the orders-of-magnitude gap from cloud to tiny devices demands efficient models.4 conceptsSlides 17-2424 min