Auto Model Compression
The resulting model can be fine tuned with a few iterations to recover the accuracy to some extent.
Auto model compression. All the above model compression algorithms can trained with fast fine tuning which is to directly derive a compressed model from the original one by applying either pruning masks or quantization functions. Conventional model compression techniques rely on hand crafted features and require domain experts to explore the large design space trading off among model size speed and accuracy which is usually sub optimal and time consuming. The strategy we found and reported in the paper is. It will also download our 50 flops compressed model.
If you find the repo useful please kindly cite our paper. In this paper we propose automl for model compression amc which leverage reinforcement learning to provide the model compression policy. Compressing models before they are deployed can therefore result in significantly more efficient systems. Results may differ due to different random seed.
There are some popular model compression algorithms built in in nni. Take pruning for example you can prune a pretrained model with levelpruner like this. This learning based compression policy outperforms conventional rule based compression policy by having higher compression ratio better preserving the accuracy and freeing human labor. On the other hand users could easily.
First model compression with nni you can easily compress a model with nni compression. We achieved state of the art model compression results in a fully automated way without any human efforts. We applied this automated push the. Automl for model compression and acceleration on mobile devices author he yihui and lin ji and liu zhijian and wang hanrui and li li jia and han song.
Model compression in some situations it is not enough for a classi er or re gressor to be highly accurate it also has to meet stringent time and space requirements. Alternatively the compressed model can be re trained with the full training data which leads to higher accuracy but usually takes longer to complete. Automatic model compression on nni it s convenient to implement auto model compression with nni compression and nni tuners. It supports tensorflow and pytorch with unified interface.
In many cases however the best performing model is too slow and too large to meet these requirements while fast and compact models are less accurate because either they are not expressive enough or theyover tto thelimited. However while the results are desirable finding the best compression strategy for a given neural network target platform and optimization objective often requires extensive experimentation. Under 4x flops reduction we achieved 2 7 better accuracy than the handcrafted model compression policy for vgg 16 on imagenet. After searching we need to.
This repo contains the pytorch implementation for paper amc. Then run the following script to search under 50 flops constraint. For users to compress their models they only need to add several lines in their code. Model compression nni provides an easy to use toolkit to help user design and use compression algorithms.
In this paper we propose automl for model compression amc which leverages reinforcement learning to efficiently sample the design space and can improve the. Under 4 flops reduction we achieved 2 7 better. Automl for model compression and acceleration on mobile devices. 3 24 48 96 80 192 200 328 352 368 360 328 400 736 752 export the pruned weights.