PocketFlow is an automatic model compression framework from Tencent that makes deep learning models smaller and faster for mobile and edge deployment. Instead of hand-tuning pruning ratios and quantization settings layer by layer, PocketFlow uses reinforcement learning to search for a compression strategy automatically โ an approach Tencent calls AutoMC โ and outputs a compact model ready for on-device applications. The project has about 2,900 stars on GitHub.
Compressing a neural network well is a tedious search problem: each layer tolerates a different amount of pruning or bit-width reduction, and the trade-off between size, speed and accuracy is model-specific. PocketFlow automates that search with an RL agent that explores per-layer compression policies, evaluating accuracy as it goes, then fine-tunes the compressed network to recover performance. It supports channel pruning and weight quantization for convolutional networks, integrates with TensorFlow-based training workflows, and includes deployment paths for mobile inference. Developed inside Tencent for production apps where model size and latency directly affect user experience, PocketFlow was released publicly as part of the wave of AutoML research that replaced manual compression heuristics with learned policies. The repository was last updated in 2023 and today serves as a well-known reference implementation of RL-based model compression.
PocketFlow is free: Tencent publishes the full source code on GitHub for developers and researchers to use in their own model-optimization work.
PocketFlow is for ML engineers and researchers shipping neural networks to phones and edge devices who need to shrink model size and latency without spending weeks hand-tuning compression settings.
Note: This is Tencent’s PocketFlow model-compression framework. A separate, unrelated minimal LLM framework also named PocketFlow (by The-Pocket) is listed on Tooloso as Pocket Flow.