Welcome to ShrinkAI's documentation
ShrinkAI is a package for reducing neural networks size, making them ideal to run on small devices such as smartphones or robots, and for speeding up inference, particularly interesting for edge AI.
This package includes, among other things, numerous distillation and compression techniques, all wrapped in an API that is easy to use for users familiar with PyTorch. It also provides customizable training loops and easy export features.
Installation
ShrinkAI is on pypi and can be installed with the following command:
The package is compatible with Python 3.11+, and depends on torch, torchvision, rich, tqdm, and psutil. Exporting to ONNX additionally requires the export extra: pip install shrinkai[export].
Contact & Contributing
You can report an issue directly on GitHub. Bug reports, feature requests, and questions are all welcome.
Contributions are welcome too, whether it's a bug fix, a new feature, or a documentation improvement:
- Open an issue first for anything non-trivial, to discuss the approach before you start.
- Fork the repository and work on a dedicated branch.
- Add or update tests for any behavior change (run
uv run pytestlocally before opening a PR). - Keep the code clean:
uv run ruff checkanduv run ruff format. - Open a pull request against
main, CI runs the test suite, coverage, and lint checks automatically.
Citation
If you use ShrinkAI in your work and think it was helpful, please cite it as:
@software{shrinkai2026,
author = {Elouan Marsot},
title = {ShrinkAI},
url = {https://github.com/elouanzer/shrinkai},
license = {MIT},
version = {0.1.0}
}