Towards On-Device Machine Learning: Efficient Inference, Independent Learning, And Collaborative Unsupervised Learning