Skip to main content
 
OpenMMLab website HOT      OpenMMLab platform TRY IT OUT
 

PyPI docs badge codecov license open issues issue resolution

📘Documentation | 🛠️Installation | 👀Model Zoo | 🤔Reporting Issues

Introduction

MMRazor is a model compression toolkit for model slimming and AutoML, which includes 3 mainstream technologies:

  • Neural Architecture Search (NAS)
  • Pruning
  • Knowledge Distillation (KD)
  • Quantization

It is a part of the OpenMMLab project.

Major features:

  • Compatibility

    MMRazor can be easily applied to various projects in OpenMMLab, due to the similar architecture design of OpenMMLab as well as the decoupling of slimming algorithms and vision tasks.

  • Flexibility

    Different algorithms, e.g., NAS, pruning and KD, can be incorporated in a plug-n-play manner to build a more powerful system.

  • Convenience

    With better modular design, developers can implement new model compression algorithms with only a few codes, or even by simply modifying config files.

About MMRazor's design and implementation, please refer to tutorials for more details.

Latest Updates

The default branch is now main and the code on the branch has been upgraded to v1.0.0. The old master branch code now exists on the 0.x branch

MMRazor v1.0.0 was released in 2023-4-24, Major updates from 1.0.0rc2 include:

  1. MMRazor quantization is released.
  2. Add a new pruning algorithm named GroupFisher.
  3. Support distilling rtmdet with MMRazor.

To know more about the updates in MMRazor 1.0, please refer to Changelog for more details!

Benchmark and model zoo

Results and models are available in the model zoo.

Supported algorithms:

Neural Architecture Search
Pruning
Knowledge Distillation
Quantization

Installation

MMRazor depends on PyTorch, MMCV and MMEngine.

Please refer to installation.md for more detailed instruction.

Getting Started

Please refer to user guides for the basic usage of MMRazor. There are also advanced guides:

Contributing

We appreciate all contributions to improve MMRazor. Please refer to CONTRUBUTING.md for the contributing guideline.

Acknowledgement

MMRazor is an open source project that is contributed by researchers and engineers from various colleges and companies. We appreciate all the contributors who implement their methods or add new features, as well as users who give valuable feedbacks. We wish that the toolbox and benchmark could serve the growing research community by providing a flexible toolkit to reimplement existing methods and develop their own new model compression methods.

Citation

If you find this project useful in your research, please consider cite:

@misc{2021mmrazor,
    title={OpenMMLab Model Compression Toolbox and Benchmark},
    author={MMRazor Contributors},
    howpublished = {\url{https://github.com/open-mmlab/mmrazor}},
    year={2021}
}

License

This project is released under the Apache 2.0 license.

Projects in OpenMMLab

  • MMCV: OpenMMLab foundational library for computer vision.
  • MIM: MIM installs OpenMMLab packages.
  • MMClassification: OpenMMLab image classification toolbox and benchmark.
  • MMDetection: OpenMMLab detection toolbox and benchmark.
  • MMDetection3D: OpenMMLab's next-generation platform for general 3D object detection.
  • MMRotate: OpenMMLab rotated object detection toolbox and benchmark.
  • MMYOLO: OpenMMLab YOLO series toolbox and benchmark.
  • MMSegmentation: OpenMMLab semantic segmentation toolbox and benchmark.
  • MMOCR: OpenMMLab text detection, recognition, and understanding toolbox.
  • MMPose: OpenMMLab pose estimation toolbox and benchmark.
  • MMHuman3D: OpenMMLab 3D human parametric model toolbox and benchmark.
  • MMSelfSup: OpenMMLab self-supervised learning toolbox and benchmark.
  • MMRazor: OpenMMLab model compression toolbox and benchmark.
  • MMFewShot: OpenMMLab fewshot learning toolbox and benchmark.
  • MMAction2: OpenMMLab's next-generation action understanding toolbox and benchmark.
  • MMTracking: OpenMMLab video perception toolbox and benchmark.
  • MMFlow: OpenMMLab optical flow toolbox and benchmark.
  • MMEditing: OpenMMLab image and video editing toolbox.
  • MMGeneration: OpenMMLab image and video generative models toolbox.
  • MMDeploy: OpenMMLab model deployment framework.

Metadata

Release files for mmrazor 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mmrazor 1.0.0
File Size Uploaded Provenance Actions
mmrazor-1.0.0.tar.gz 388.2 kB Without provenance Details for mmrazor-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mmrazor 1.0.0
File Interpreter ABI Platform Actions
mmrazor-1.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for mmrazor-1.0.0-py2.py3-none-any.whl

Total release size: 1.1 MB

Release files / mmrazor-1.0.0.tar.gz

Download URL mmrazor-1.0.0.tar.gz
Size 388.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c09732eb92011eded34fa63b8def9739702bcafeb329ac32eac2ad9bd7ad9500
BLAKE2b-256 checksum
How to use checksums
2f370426034f420394b127055d34fb2e2a8de455ecfb1d7a632ff545b08d3eb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.16

Release files / mmrazor-1.0.0-py2.py3-none-any.whl

Download URL mmrazor-1.0.0-py2.py3-none-any.whl
Size 732.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d542a78697fa7a4ec6a5a052b232131ba5e2d150afff11db52709d2054508eaa
BLAKE2b-256 checksum
How to use checksums
8d782a1db132ba707c9dc0843a3bee25065743f4ab4867315ddc43bd59128156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.16

Security for mmrazor 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page