Flexible, Ultra-Low Power On-Device AI