On-Device Machine Learning is a project-based course covering how to build, train, and deploy models that can run on low-power devices (e.g. smart phones, refrigerators, and mobile robots). The course will cover advances topics on distillation, quantization, weight imprinting, power calculation and more. Every week we will discuss a new research paper and area in this space one day, and have a lab working-group the second. Specifically, students will be provided with low-power compute hardware (e.g. SBCs and inference accelerators) in addition to sensors (e.g. microphones, cameras, and robotics) for their course project. The project will involve three components for building low-power multimodal models:
(1) inference
(2) performing training/updates for interactive ML, and
(3) maximizing power.
The more that can be performed on device, the more privacy preserving and mobile the solution is.
(1) inference
(2) performing training/updates for interactive ML, and
(3) maximizing power.
The more that can be performed on device, the more privacy preserving and mobile the solution is.
For each stage of the course project, the final model produced will have an mAh "budget" equivalent to one full charge of a smart phone battery (~4 Ah or 2hrs on Jetson Nano, 7hrs on RPi, or 26hrs on a RPi Zero W).
- Time & Place: 9:30am - 10:50am Tu/Th in TBD
- Assignments will be submitted and graded using Canvas
Example Industry Motivation "... if the coffee maker with voice recognition was in use for four years, the speech recognition cost for chewing on data back in the Mr Coffee datacenter would wipe out the entire revenue stream from that coffee maker, but that same function, if implemented on a device specifically tuned for this very precise job, could be done for under $1 and would not affect the purchase price significantly. " -- Source
Instructors


Policies
Submission Policies:- Submit a link/PDF to Canvas.
- Lab reports are individual while projects will be written up and submitted as a group.
- All deadlines are midnight EST (determined by Canvas submission time).
- Late days: Every student has a budget of 5 late days to be used throughout the semester. They will be automatically calculated based on submit time, after which 2% absolute per day is removed from max grade.
In the event a student tests positive for COVID-19, they will be invited to attend discussion virtually and will be expected to participate as usual. This includes participation points for raising their hands with questions/answers and submission of lab-notebooks. Note, that students who attend class while exhibiting symptoms will be told to leave and join virtually for the protection of all others present.
Accommodations for Students with Disabilities: If you have a disability and have an accommodations letter from the Disability Resources office, we encourage you to discuss your accommodations and needs with the instructors as early in the semester as possible. We will work with you to ensure that accommodations are provided as appropriate. If you suspect that you may have a disability and would benefit from accommodations but are not yet registered with the Office of Disability Resources, we encourage you to contact them at access@andrew.cmu.edu.
Note to students
Take care of yourself! As a student, you may experience a range of challenges that can interfere with learning, such as strained relationships, increased anxiety, substance use, feeling down, difficulty concentrating and/or lack of motivation. This is normal, and all of us benefit from support during times of struggle. There are many helpful resources available on campus and an important part of a healthy life is learning how to ask for help. Asking for support sooner rather than later is almost always helpful. CMU services are available free to students, and treatment does work. You can learn more about confidential mental health services available on campus through Counseling and Psychological Services (CaPS). Support is always available (24/7) at: 412-268-2922.Take care of your classmates and instructors! In this class, every individual will and must be treated with respect. The ways we are diverse are many and are fundamental to building and maintaining an equitable and an inclusive campus community. These include but are not limited to: race, color, national origin, caste, sex, disability (visible or invisible), age, sexual orientation, gender identity, religion, creed, ancestry, belief, veteran status, or genetic information.
Research shows that greater diversity across individuals leads to greater creativity in the group. We at CMU work to promote diversity, equity and inclusion not only because it is necessary for excellence and innovation, but because it is just. Therefore, while we are imperfect, we ask you all to fully commit to work, both inside and outside of our classrooms to increase our commitment to build and sustain a campus community that embraces these core values. It is the responsibility of each of us to create a safer and more inclusive environment. Incidents of bias or discrimination, whether intentional or unintentional in their occurrence, contribute to creating an unwelcoming environment for individuals and groups at the university. If you experience or observe unfair or hostile treatment on the basis of identity, we encourage you to speak out for justice and offer support in the moment and/or share your experience using the following resources:
- Center for Student Diversity and Inclusion: csdi@andrew.cmu.edu, (412) 268-2150
- Report-It online anonymous reporting platform (user name: tartans; password: plaid); (877) 700-7050
Projects, Hardware, and Resources
The course will be primarily centered on a few multimodal tasks/platforms to facilitate cross-team collaboration and technical assistance. If your team wants to use custom hardware or sensors not listed here -- that's fine, but please reach out so we can discuss it and put think through the implications. Every team will also be provided with one of the following Single Board Computers (SBCs)Example Projects
Input | Output | Task |
---|---|---|
Speech | Text | Real-time Machine Translation |
Images | Text | Object Detection or ASL Finger Spelling |
Images | Robot Arm | Learning from Demonstration |
Speech + Images | Robot Car | Vision-Language Navigation |
![]() |
![]() |
Single Board Computers
SBC | RAM | Notes |
---|---|---|
Raspberry Pi 4 | 8GB | 2Amp draw on moderately powerful processor |
Jetson Nano | 2GB, 4GB | 128-core NVIDIA Maxwell CUDA cores |
- Can we use other platforms? Yes! But let's talk about the pros and cons together.
- What about custom sensors and hardware? Same answer :)
- Will the course pay for a Coral/Pi Zero/...? Yes, but let's chat first.
Resources
- TinyML by Warden and Situnayake 2019
- Getting Started with AI on Jetson Nano
- PyTorch Mobile
- ONNX Mobile
- Example DexArm Rotary Code
Course Schedule
A basic course schedule is presented below. Papers will be chosen jointly by the instructors and the student presenting.Aug 29: Course structure & Background |
Aug 31: Practical Problems, Theory vs Practice |
Sept 5: Machine Learning and Optimization
|
Sept 7: Lab 1: Benchmarking Simple Models |
Sept 12: NLP |
Sept 14: Computer Vision, Edge Hardware, and Robotics
|
Sept 19 Efficiency Benchmarking
|
Sept 21: Paper discussions
|
Sept 26: Compression I: Quantization and Pruning |
Sept 28: Lab 2: Quantization |
Oct 3: Compression II: Pruning (cont) and Distillation |
Oct 5: Project Feedback
|
Oct 10: Neural Architecture Search | Oct 12: Paper discussion
|
Oct 17: Fall Break | Oct 19: Fall Break |
Oct 24: Project Feedback | Oct 26: Lab 3: Pruning |
Oct 31: Architecture-specific tricks I: CNNs
|
Nov 2: Paper discussions
|
Nov 7: Architecture-specific tricks II: Transformers
|
Nov 9: Lab 4: A new hardware platform |
Nov 14: Guest: TBD
|
Nov 16: Paper discussions
|
Nov 21: Efficient Training | Nov 23: No class: Thanksgiving |
Nov 28: Carbon (and water and minerals) and the Future
|
Nov 30: Lab 5: Benchmarking and Carbon |
Dec 5: Final Presentations | Dec 7: Final Presentations
|