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.
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: 10:10am - 11:30am Tu/Th in POS 151
  • 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

Yonatan Bisk
Yonatan Bisk
Instructor

ybisk@cs.cmu.edu

OH: Tues at 2pm, GHC 6703

Emma Strubell
Emma Strubell
Instructor

strubell@cmu.edu

OH: 3-4pm Mondays, GHC 6709 or Zoom

If there is a question you would like to address to the instructors, please email 11-767-instructors@cs.cmu.edu.

Policies

Submission Policies:
COVID Details:
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:

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
Side view of three-wheel robot car LCD Screen and Camera for ASL
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
FAQ
  1. Can we use other platforms? Yes! But let's talk about the pros and cons together.
  2. What about custom sensors and hardware? Same answer :)
  3. Will the course pay for a Coral/Pi Zero/...? Yes, but let's chat first.
Resources

Course Schedule

A basic course schedule is presented below. Papers will be chosen jointly by the instructors and the student presenting.
Lectures
Lab/Discussion
Aug 30: Course structure & Background
Sept 1: Practical Problems, Theory vs Practice
Sept 6: Machine Learning and Optimization
Sept 8: Lab 1: Benchmarking Simple Models
Sept 13: NLP Sept 15: Computer Vision, Edge Hardware, and Robotics
  • Sept 16: Lab 1 Due
Sept 20 Efficiency Benchmarking
  • Lecture Highlight (9/21)
  • Project Proposals (9/23)
Sept 22: Paper discussions
  • Discussion Highlight (9/23)
Sept 27: Compression I: Quantization and Pruning
Sept 29: Lab 2: Quantization
Oct 4: Compression II: Pruning (cont) and Distillation Oct 6: Project Feedback
  • Oct 7: Lab 2 Due
Oct 11: Neural Architecture Search Oct 13: Paper discussion
  • Oct 12: Lecture Highlight
  • Oct 14: Discussion Highlight
Oct 18: Fall Break Oct 20: Fall Break
Oct 25: Project Feedback Oct 27: Lab 3: Pruning
Nov 1: Architecture-specific tricks I: CNNs
  • Nov 2: Lecture Highlight
Nov 3: Paper discussions
  • Nov 4: Discussion Highlight
  • Nov 4: Lab 3 Due
Nov 8: Architecture-specific tricks II: Transformers
  • Nov 9: Lecture Highlight
Nov 10: Lab 4: A new hardware platform
Nov 15: Guest: Gierad Laput
Senior Research and Engineering Manager at Apple
  • Nov 16: Lecture Highlight
Nov 17: Paper discussions
  • Nov 18: Discussion Highlight
  • Nov 18: Lab 4 Due
Nov 22: Efficient Training Nov 24: No class: Thanksgiving
Nov 29: Carbon (and water and minerals) and the Future
  • Nov 28: Lecture Highlight
Dec 1: Lab 5: Benchmarking and Carbon
Dec 6: Final Presentations Dec 8: Final Presentations
  • Dec 9: Lab 5 Due