中文 | English
PaddleSlim is a toolkit for model compression. It contains a collection of compression strategies, such as pruning, fixed point quantization, knowledge distillation, hyperparameter searching and neural architecture search.
PaddleSlim provides solutions of compression on computer vision models, such as image classification, object detection and semantic segmentation. Meanwhile, PaddleSlim Keeps exploring advanced compression strategies for language model. Furthermore, benckmark of compression strategies on some open tasks is available for your reference.
PaddleSlim also provides auxiliary and primitive API for developer and researcher to survey, implement and apply the method in latest papers. PaddleSlim will support developer in ability of framework and technology consulting.
Naive knowledge distillation: transfers dark knowledge by merging the teacher and student model into the same Program
Paddle large-scale scalable knowledge distillation framework Pantheon: a universal solution for knowledge distillation, more flexible than the naive knowledge distillation, and easier to scale to the large-scale applications.
Paddle >= 1.7.0
pip install paddleslim -i https://pypi.org/simple
If you want to use quantization in PaddleSlim, please install PaddleSlim as follows.
If you want to use quantized model in ARM and GPU, any PaddleSlim version is ok and you should install 1.2.0 for CPU.
pip install paddleslim==1.0.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install paddleslim==1.1.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install paddleslim==1.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
QuickStart: Introduce how to use PaddleSlim by simple examples.
Advanced Tutorials：Tutorials about advanced usage of PaddleSlim.
Model Zoo：Benchmark and pretrained models.
Algorithm Background: Introduce the background of quantization, pruning, distillation, NAS.
PaddleDetection: Introduce how to use PaddleSlim in PaddleDetection library.
PaddleSeg: Introduce how to use PaddleSlim in PaddleSeg library.
PaddleLite: How to use PaddleLite to deploy models generated by PaddleSlim.
TensorRT Deploy: How to use TensorRT to deploy models generated by PaddleSlim.
Dataset: ImageNet2012; Model: MobileNetV1;
|Method||Accuracy(baseline: 70.91%)||Model Size(baseline: 17.0M)|
|Knowledge Distillation(ResNet50) + int8 quantization||+1.10%||-71.76%|
|Pruning(FLOPs-50%) + int8 quantization||-1.71%||-86.47%|
|Method||mAP(baseline: 76.2%)||Model Size(baseline: 94MB)|
|Method||mAP(baseline: 29.3%)||Model Size|
Dataset: ImageNet2012; Model: MobileNetV2
|Device||Infer time cost||Top1 accuracy(baseline:71.90%)|
：Code submit frequency
：React/respond to issue & PR etc.
：Well-balanced team members and collaboration
：Recent popularity of project
：Star counts, download counts etc.