Skip to content

Files

Latest commit

Aug 12, 2025
aaa65ef · Aug 12, 2025

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 1, 2025
Aug 5, 2025
Jan 9, 2025
Aug 9, 2025
May 28, 2025
Jul 30, 2025
Jan 31, 2025
Aug 8, 2025
Jul 11, 2025
Aug 1, 2024
Aug 1, 2025
Jul 30, 2024
Mar 21, 2025
Aug 12, 2025
Aug 8, 2025
Aug 5, 2025
Aug 12, 2025
Aug 12, 2025
Jun 2, 2025
Jul 11, 2025
Aug 9, 2025
Aug 9, 2025
Aug 9, 2025
Aug 9, 2025
Apr 10, 2025
Aug 12, 2025
May 1, 2025
Jul 11, 2025
Jul 11, 2025
Oct 16, 2024
May 1, 2025
Aug 9, 2025
Apr 21, 2025
Apr 10, 2025
Jul 30, 2025
May 8, 2025
Jan 31, 2025

README.md

Examples

This folder contains actively maintained examples of use of Olive with different models, optimization tools and hardware.

Each example is a self-contained folder with a README.md file that explains how to run it.

Important

To ensure that the latest versions of the examples can be run without issues, you have to install Olive from source. We also recommend using a new conda or virtual environment.

To install Olive from source, run the following command in a new conda or virtual environment:

git clone https://github.com/microsoft/Olive.git
cd Olive
python -m pip install .

Then cd into the desired example folder and follow the instructions in the README.md file.

For examples corresponding to a specific release of Olive, checkout the corresponding tag. For instance, to use the examples corresponding to the v0.2.0 release, run the following command:

git checkout tags/v0.2.0

Note: Olive installs torch as a dependency from the PyPI feed. On Windows, this feed installs the CPU version of torch by default. If you want to install a version of torch with CUDA support, please install it manually following the instructions in the PyTorch documentation.

Conda env

To create a new conda environment and activate it, run the following command:

conda create -n olive-env python=3.12
conda activate olive-env

You can replace olive-env with any name you want and python=3.12 with the version of python you want to use.

Please refer to the conda documentation for more information on how to create and manage conda environments.

Virtual env

To create a new virtual environment and activate it, run the following command:

On Linux:

python -m venv olive-env
source olive-env/bin/activate

On Windows (CMD):

python -m venv olive-env
olive-env\Scripts\activate.bat

On Windows (PowerShell):

python -m venv olive-env
olive-env\Scripts\Activate.ps1

You can replace olive-env with any path you want. A new folder will be created at the specified path to contain the virtual environment.

Please refer to the python documentation for more information on how to create and manage virtual environments.