71d3522c3e
## Add evaluation support for using lm-eval harness * Added a new Evaluator to use lm_eval to evaluate hf model * Added a llama2 config to use the new evaluator ## Checklist before requesting a review - [ ] Add unit tests for this change. - [x] Make sure all tests can pass. - [ ] Update documents if necessary. - [x] Lint and apply fixes to your code by running `lintrunner -a` - [ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes. - [ ] Is this PR including examples changes? If yes, please remember to update [example documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md) in a follow-up PR. ## (Optional) Issue link |
||
---|---|---|
.. | ||
AST | ||
bert | ||
deberta | ||
directml | ||
falcon | ||
gptj | ||
inception | ||
llama2 | ||
mistral | ||
mobilenet | ||
open_llama | ||
opt_125m | ||
phi2 | ||
phi3 | ||
red_pajama | ||
resnet | ||
stable_diffusion | ||
super_resolution | ||
test | ||
utils | ||
vgg | ||
whisper | ||
README.md |
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
Conda env
To create a new conda environment and activate it, run the following command:
conda create -n olive-env python=3.8
conda activate olive-env
You can replace olive-env
with any name you want and python=3.8
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.