EfficientML.ai Lecture 1 - Introduction (MIT 6.5940 Fall 2026)
Overview
Song Han introduces MIT 6.5940 as a hands-on course on efficient AI computing, motivated by model sizes growing far faster than GPU memory and the cost of moving data. The course covers pruning, quantization, neural architecture search, efficient training, and application-specific optimization, with five graded labs culminating in deploying a quantized 7-billion-parameter language model locally on a laptop.
Key takeaways
- AI model sizes are growing faster than GPU memory capacity, so pruning, quantization, and sparsity are practical ways to narrow the gap between compute demand and available hardware.
- Efficiency is an accuracy-and-cost trade-off: hardware-aware architecture search aims to reduce computation without sacrificing model quality.
- Local inference and training can improve privacy and customization, but microcontrollers make memory reduction especially important; the lecture cites reducing training memory from over 600 MB to 141 KB.
- Language-model costs rise not only with parameter count but also with generated tokens: chain-of-thought reasoning can improve answers while increasing inference work.
- Four-bit quantization, SmoothQuant, and a specialized inference engine can make large language models practical on laptops, with the course labs targeting local deployment of a 7-billion-parameter model.
- Efficient AI depends on coordinated algorithm, hardware, and data choices; parallelism and reduced data movement matter because memory access and communication can cost more than computation.
Chapters
- Song Han describes the course's growth from 30 students in 2022 to about 300 in this offering.
- The course emphasizes practical coding and demonstrations, with five graded labs leading to local deployment of a 7-billion-parameter model.
- Song Han discusses his work on model compression, Deep Compression, and AWQ, an activation-aware quantization method with more than 60 million downloads.
- Course staff introduce their research interests, spanning efficient machine learning systems, robotics, multimodal models, and protein foundation models.
- The lecture contrasts steady GPU-memory growth, from about 16 GB on the P100 to 192 GB on the B200, with model growth from millions of parameters to trillions.
- Song Han argues that the widening gap between computing supply and model demand makes compression and efficiency essential.
- Pruning, quantization, and sparsity are presented as ways to reduce model size and computation while retaining accuracy.
- AlexNet sharply improved ImageNet error in 2012, followed by GoogLeNet and ResNet; the lecture cites a human baseline near 5%.
- Higher image-classification accuracy typically requires more multiply-accumulate operations, creating a compute-versus-accuracy trade-off.
- Hardware-aware neural architecture search aims to move the frontier toward lower computation and higher accuracy, with examples targeting up to 14 times less computation.
- On-device image classification, face recognition, and pose estimation can keep personal data on a phone rather than sending it to the cloud.
- MCUNet demonstrates face-mask and person detection on an ARM Cortex-M7 microcontroller with only a few hundred kilobytes of SRAM.
- On-device training can personalize models using locally collected sensor data, but requires managing backward-pass computation and tight memory limits.
- The course previews reducing training memory from more than 600 MB to 141 KB using techniques including quantization-aware scaling and sparse updates.
- The lecture presents EfficientViT-SAM as a faster implementation of Segment Anything, reporting up to 48 times higher speed while maintaining accuracy.
- Generative workloads are substantially more expensive than image classification: the lecture compares image generation and video generation with a ViT and an 8-billion-parameter language model.
- Pruning-based GAN compression increases a CycleGAN horse-to-zebra demo from about 12 to 40 frames per second.
- AnyCost GAN supports real-time image editing with smaller subnetworks before running the full model for a final result.
- Distributed inference can reduce diffusion-image generation time by splitting work across GPUs, while communication must be managed to avoid artifacts.
- Because large language models and their KV caches may exceed a single GPU's memory, parallelism and data-movement efficiency are central to serving them.
- The lecture reports accelerating a LiDAR 3D-perception system from 5 to 47 frames per second through algorithm and systems design.
- Camera and LiDAR fusion produces bird's-eye-view maps and object detections while fitting perception workloads onto mobile GPU hardware.
- Large language models support zero-shot and few-shot tasks such as translation, but the lecture notes that capability generally rises with parameter count and diminishing returns.
- Chain-of-thought prompting can improve arithmetic reasoning by showing intermediate steps, as in the example of calculating apples remaining after lunch and a purchase.
- Generating reasoning traces requires more tokens than returning only an answer, increasing inference cost.
- The lecture connects larger models and longer reasoning outputs to the growing compute, power, cooling, and facility requirements of GPU clusters.
- Sparse attention can remove redundant tokens; the sentiment example reduces an 11-token sentence to the key words 'treat' and 'perfect' while preserving a positive classification.
- Quantization reduces the bits used for model weights and activations, helping language models fit on laptops and phones.
- SmoothQuant redistributes activation outliers to make four-bit quantization more practical.
- The course pairs quantization with a tiny chat inference engine that handles four-bit weights and supports local deployment of a 7-billion-parameter model.
- Vision-language models combine image or video tokens with text tokens, using a vision transformer and projector to align visual and language representations.
- The lecture demonstrates video understanding, prediction of likely next events, image-based in-context learning, and recognition of Pompeii.
- AWQ enables a compressed vision-language model to describe the Mona Lisa and interpret a meme more accurately than naive four-bit quantization.
- Compressed models support real-time robotics examples, including ping-pong at 15 Hz and a world-action model that predicts steps for a robot to make coffee.
- Song Han identifies algorithms, hardware, and data as the three pillars of deep-learning computing.
- Single-thread processor performance has plateaued, increasing the importance of parallelism and software-aware algorithm design.
- GPU inference performance has improved through tensor-core instructions, INT8 operations, and structured sparsity, rather than transistor scaling alone.
- The course focuses on software techniques that improve hardware utilization and reduce model memory and computation, rather than designing new chips.
- Lectures are scheduled Tuesdays and Thursdays, with Thursday office hours and course discussions on Piazza and submissions through Canvas.
- The three course modules are efficient inference, efficient training, and application-specific optimization.
- Topics include pruning, quantization, neural architecture search, distillation, gradient compression, on-device training, federated learning, and optimization for language, image, video, and point-cloud models.
- The course combines machine-learning and computer-architecture foundations, with related preparation in systems, performance engineering, computer vision, and NLP.
- The five graded labs cover GPU basics, pruning, neural architecture search, quantization, and large-language-model deployment; Lab 0 introduces PyTorch without a grade.
- Labs make up 70% of the grade, while a group final project contributes 30%, including a proposal and final presentation and report.
- Lab 4's quantization methods and Lab 5's inference engine combine to run a chatbot locally; supported laptops need at least 8 GB of memory and 5 GB of storage.
- Song Han highlights SmoothQuant as an example of a course project technique later adopted in tools including NVIDIA TensorRT-LLM.
Transcript excerpt
0:02 All right. Hello everyone. Let's get started. Find your seat. It's a big class. Um very glad to talk about tiny ML and efficient AI computing again. This is the fourth time I offer this lecture. I remember I started offering this lecture in 2022. At that time only 30 students in a very small classroom. But that was the fall semester as we were offering the class ch November early December and suddenly boomed this area. So the second year when I offered this class there are tripled to 90 students and then when I offer this class in the third year there
0:48 are 180 students and this time it's 300 students. So thank you so much for coming and uh I hope you can learn a lot from this class about AI computing deep learning infrastructure which is actually widely needed badly needed in industry like all the companies need people like you guys um to serve these models to train these models it's in high demand so I really look forward to work with you uh with the whole semester and hopefully you can learn from this class as Uh this class is very practical. You won't see a lot of uh equations but you will write some write a lot of code and do a lot of practical demos. By the end of the semester by finishing all the five labs you will bring home a laptop
1:37 with uh where you can run a seven billion parameter locally on your laptop. So this is a quick introduction of myself. Uh my name is Sunhan. I joined MIT eight years ago. Um, previously I got my bachelor degree from Chinuha University and PhD from Stanford. Um, I worked on model compression and efficient AI computing for more than a
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, MIT HAN Lab.