{"data":{"slug":"tencent-pocketflow","name":"PocketFlow","tagline":"An Automatic Model Compression (AutoMC) framework for developing smaller and faster AI applications.","github_url":"https://github.com/Tencent/PocketFlow","owner":"Tencent","repo":"PocketFlow","owner_avatar_url":"https://avatars.githubusercontent.com/u/18461506?v=4","primary_language":"Python","stars":2909,"forks":490,"topics":["automl","computer-vision","deep-learning","mobile-app","model-compression"],"archived":false,"github_pushed_at":"2023-03-31T22:23:33+00:00","maintenance_label":"Dormant","url":"https://www.graphcanon.com/tools/tencent-pocketflow","markdown_url":"https://www.graphcanon.com/tools/tencent-pocketflow.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/tencent-pocketflow","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=tencent-pocketflow","description":"An Automatic Model Compression (AutoMC) framework for developing smaller and faster AI applications.","homepage_url":"https://pocketflow.github.io","license":"Other","open_issues":75,"watchers":141,"ai_summary":null,"readme_excerpt":"# PocketFlow\n\nPocketFlow is an open-source framework for compressing and accelerating deep learning models with minimal human effort. Deep learning is widely used in various areas, such as computer vision, speech recognition, and natural language translation. However, deep learning models are often computational expensive, which limits further applications on mobile devices with limited computational resources.\n\nPocketFlow aims at providing an easy-to-use toolkit for developers to improve the inference efficiency with little or no performance degradation. Developers only needs to specify the desired compression and/or acceleration ratios and then PocketFlow will automatically choose proper hyper-parameters to generate a highly efficient compressed model for deployment.\n\nPocketFlow was originally developed by researchers and engineers working on machine learning team within Tencent AI Lab for the purposes of compacting deep neural networks with industrial applications.\n\nFor full documentation, please refer to [PocketFlow's GitHub Pages](https://pocketflow.github.io/). To start with, you may be interested in the [installation guide](https://pocketflow.github.io/installation/) and the [tutorial](https://pocketflow.github.io/tutorial/) on how to train a compressed model and deploy it on mobile devices.\n\nFor general discussions about PocketFlow development and directions please refer to [PocketFlow Google Group](https://groups.google.com/forum/#!forum/pocketflow). If you need a general help, please direct to [Stack Overflow](https://stackoverflow.com/). You can report issues, bug reports, and feature requests on [GitHub Issue Page](https://github.com/Tencent/PocketFlow/issues).\n\n**News: we have created a QQ group (ID: 827277965) for technical discussions. Welcome to join us!**\n<img src=\"docs/qr_code.jpg\" alt=\"qr_code\" width=\"256\"/>\n\n## Framework\n\nThe proposed framework mainly consists of two categories of algorithm components, *i.e.* learners and hyper-parameter optimizers, as depicted in the figure below. Given an uncompressed original model, the learner module generates a candidate compressed model using some randomly chosen hyper-parameter combination. The candidate model's accuracy and computation efficiency is then evaluated and used by hyper-parameter optimizer module as the feedback signal to determine the next hyper-parameter combination to be explored by the learner module. After a few iterations, the best one of all the candidate models is output as the final compressed model.\n\n\n\n## Learners\n\nA learner refers to some model compression algorithm augmented with several training techniques as shown in the figure above. Below is a list of model compression algorithms supported in PocketFlow:\n\n| Name | Description |\n|:-----|:------------|\n| `ChannelPrunedLearner`   | channel pruning with LASSO-based channel selection (He et al., 2017) |\n| `DisChnPrunedLearner`    | discrimination-aware channel pruning (Zhuang et al., 2018) |\n| `WeightSparseLearner`    | weight sparsification with dynamic pruning schedule (Zhu & Gupta, 2017) |\n| `UniformQuantLearner`    | weight quantization with uniform reconstruction levels (Jacob et al., 2018) |\n| `UniformQuantTFLearner`  | weight quantization with uniform reconstruction levels and TensorFlow APIs |\n| `NonUniformQuantLearner` | weight quantization with non-uniform reconstruction levels (Han et al., 2016) |\n\nAll 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. The resulting model can be fine-tuned with a few iterations to recover the accuracy to some extent. Alternatively, the compressed model can be re-trained with the full training data, which leads to higher accuracy but usually takes longer to complete.\n\nTo further reduce the compressed model's performance degradation, we adopt network distillation to augment its training process with an","github_created_at":"2018-10-31T07:45:21+00:00","created_at":"2026-07-11T23:37:34.566354+00:00","updated_at":"2026-07-11T23:37:45.221846+00:00","categories":[{"slug":"inference-serving","name":"Inference & Serving","url":"https://www.graphcanon.com/categories/inference-serving","markdown_url":"https://www.graphcanon.com/categories/inference-serving.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/inference-serving"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"},{"slug":"vector-databases","name":"Vector Databases","url":"https://www.graphcanon.com/categories/vector-databases","markdown_url":"https://www.graphcanon.com/categories/vector-databases.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/vector-databases"}],"tags":[{"slug":"automl","name":"automl"},{"slug":"computer-vision","name":"computer-vision"},{"slug":"deep-learning","name":"deep-learning"},{"slug":"mobile-app","name":"mobile-app"},{"slug":"model-compression","name":"model-compression"},{"slug":"python","name":"python"}],"trust":{"provenance":{"is_fork":false,"github_id":155518202,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:37:41.551Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":1198,"last_release_at":null},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T23:37:41.958Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T23:37:41.304Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-07-11T23:37:41.304Z"},"license_spdx":{"value":"Other","source":"github.license","observed_at":"2026-07-11T23:37:41.304Z"}}}}