Olive is an easy-to-use hardware-aware model optimization tool that composes industry-leading techniques across model compression, optimization, and compilation.
Перейти к файлу
Jambay Kinley 51271f89d4
README: add status badges, update extras docs (#612)
## Describe your changes
Add status badges for the pipelines so devs can see the most recent
status for the pipelines easily.

Update the docs for olive extras.

## Checklist before requesting a review
- [ ] Add unit tests for this change.
- [ ] Make sure all tests can pass.
- [ ] Update documents if necessary.
- [ ] Format your code by running `pre-commit run --all-files`
- [ ] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.

## (Optional) Issue link
2023-09-26 19:01:34 -07:00
.azure_pipelines Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
.github 🏎️ Remove rustfmt & update lint.yaml python version (#604) 2023-09-26 10:35:22 +08:00
docs README: add status badges, update extras docs (#612) 2023-09-26 19:01:34 -07:00
examples Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
olive Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
scripts cleanup makefile and scripts (#602) 2023-09-26 09:45:51 +08:00
test Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
.coveragerc enable code coverage for aml runner (#297) 2023-05-25 10:49:23 +08:00
.flake8 Welcome to new version of Olive (#127) 2023-03-23 17:27:01 -07:00
.gitignore Add perf check pipeline (#523) 2023-09-08 01:54:50 -07:00
.lintrunner.toml Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
.pre-commit-config.yaml Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
CONTRIBUTING.md Welcome to new version of Olive (#127) 2023-03-23 17:27:01 -07:00
LICENSE Welcome to new version of Olive (#127) 2023-03-23 17:27:01 -07:00
MANIFEST.in include sample code directory (#247) 2023-05-08 16:16:47 +08:00
NOTICE.txt add notice file (#234) 2023-05-04 12:00:38 +08:00
README.md README: add status badges, update extras docs (#612) 2023-09-26 19:01:34 -07:00
SECURITY.md Update package description (#128) 2023-03-23 18:53:16 -07:00
pyproject.toml Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
requirements-dev.txt Welcome to new version of Olive (#127) 2023-03-23 17:27:01 -07:00
requirements-lintrunner.txt Enable more linter in adapter config (#607) 2023-09-27 07:52:27 +08:00
requirements.txt 🐇 Requirements-txt-fixer for pre-commit (#548) 2023-09-08 12:45:14 +08:00
setup.py more lint rules (#605) 2023-09-25 21:32:56 +08:00

README.md

Olive

Olive is an easy-to-use hardware-aware model optimization tool that composes industry-leading techniques across model compression, optimization, and compilation. Given a model and targeted hardware, Olive composes the best suitable optimization techniques to output the most efficient model(s) for inferring on cloud or edge, while taking a set of constraints such as accuracy and latency into consideration.

Since every ML accelerator vendor implements their own acceleration tool chains to make the most of their hardware, hardware-aware optimizations are fragmented. With Olive, we can:

Reduce engineering effort for optimizing models for cloud and edge: Developers are required to learn and utilize multiple hardware vendor-specific toolchains in order to prepare and optimize their trained model for deployment. Olive aims to simplify the experience by aggregating and automating optimization techniques for the desired hardware targets.

Build up a unified optimization framework: Given that no single optimization technique serves all scenarios well, Olive enables an extensible framework that allows industry to easily plugin their optimization innovations. Olive can efficiently compose and tune integrated techniques for offering a ready-to-use E2E optimization solution.

Get Started and Resources

Installation

We recommend installing Olive in a virtual environment or a conda environment. Olive is installed using pip.

Create a virtual/conda environment with the desired version of Python and activate it.

You will need to install a build of onnxruntime. You can install the desired build separately but public versions of onnxruntime can also be installed as extra dependencies during Olive installation.

Install with pip

Olive is available for installation from PyPI.

pip install olive-ai

With onnxruntime (Default CPU):

pip install olive-ai[cpu]

With onnxruntime-gpu:

pip install olive-ai[gpu]

With onnxruntime-directml:

pip install olive-ai[directml]

Optional Dependencies

Olive has optional dependencies that can be installed to enable additional features. Please refer to extra dependencies for the list of extras and their dependencies.

Pipeline Status

Build Status

Build Status

Build Status

Contributing

Wed love to embrace your contribution to Olive. Please refer to CONTRIBUTING.md.

Formatting

Olive uses pre-commit hooks to check and format code. To install the pre-commit hooks, run the following commands from the root of the repository:

# install pre-commit and other dev requirements
python -m pip install pre-commit
# install the git hook scripts
pre-commit install
# for the first time, run on all files
pre-commit run --all-files

Every time you make a git commit, the hooks will automatically point out issues in code for changed files and fix them if possible.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.