Olive
AGENTS.md2.4k starsChanged 15 months agoMITView on GitHub
Olive is a Python toolkit for AI model optimization on ONNX Runtime. The main package is in olive/, tests are in test/, and the CLI entry point is olive. Olive users should install olive-ai with pip install olive-ai, and follow README.md. Use the smallest relevant check for your change: If you need to run tests, install the appropriate dependencies from test/requirements-test.txt or one of the platform-specific files in test/.
- Installs packages
Trending
Quiet since September.about the whole repository
Who's talking about microsoft/Olive
- A Hacker News story“Microsoft Olive: an easy-to-use hardware-aware model optimization tool”Hacker News · May 26, 2024 · 12 points
- microsoft/onnxruntime-inference-examples“js/ort-whisper example is broken due to missing operator, ai.onnx.contrib:BpeDecoder.”GitHub · May 8, 2025 · 2 reactions
- microsoft/onnxruntime-genai“KeyError for torch.uint8 in make_tensor_proto_from_tensor due to missing dtype mapping”GitHub · Jun 16, 2025 · 1 reactions
- microsoft/onnxruntime-inference-examples“whisper web example fails setup due to missing olive dependency”GitHub · May 23, 2025 · 1 reactions
- microsoft/onnxruntime“[DmlEP] BeamSearch node is not supported for DmlEP?”GitHub · Dec 13, 2023 · 1 reactions
The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 17
Talked about on GitHub and Hacker News (17 times).
On GitHub · 16
- May 8, 2025js/ort-whisper example is broken due to missing operator, ai.onnx.contrib:BpeDecoder. — microsoft/onnxruntime-inference-examples2 reactions · 1 comment
- Jun 16, 2025KeyError for torch.uint8 in make_tensor_proto_from_tensor due to missing dtype mapping — microsoft/onnxruntime-genai1 reaction
- May 23, 2025whisper web example fails setup due to missing olive dependency — microsoft/onnxruntime-inference-examples1 reaction
- Dec 13, 2023[DmlEP] BeamSearch node is not supported for DmlEP? — microsoft/onnxruntime1 reaction · 6 comments
- Sep 23, 2026docs(js/ort-whisper): add olive installation instructions and fix broken Olive link — microsoft/onnxruntime-inference-examples0 reactions
11 more on GitHub
- Sep 1, 2026revert qnn gpu — microsoft/olive-recipes0 reactions
- Jul 24, 2026Add defensive ndim==2 guard in preprocess_olive_weights to reject Olive moe=True 3D expert checkpoints — onnxruntime/mobius0 reactions · 2 comments
- Jul 14, 2026update amd again - revert previous update — microsoft/olive-recipes0 reactions
- Jun 11, 2026ModelBuilder support use_cache=False and hidden_states_layers — microsoft/onnxruntime-genai0 reactions
- May 29, 2026[AMD] Add RyzenAI token-fusion recipes; Restore legacy VitisAI eager recipes — microsoft/olive-recipes0 reactions · 7 comments
- May 5, 2026Gemma4 ONNX + CUDA support: all PRs tracker — onnxruntime/mobius0 reactions · 6 comments
- Apr 8, 2025Incorrect output shape for logits output returned from get_output("logits") — microsoft/onnxruntime-genai0 reactions · 6 comments
- Dec 8, 2024auto quantization of big arrays on computation — beehive-lab/TornadoVM0 reactions · 1 comment
- Feb 26, 2024【任务】模型量化 — NascentCore/3k0 reactions · 4 comments
- Aug 10, 2023Error Node (BeamSearch_node) has input size 12 not in range [min=5, max=10] — onnxruntime/Whisper-HybridLoop-Onnx-Demo0 reactions · 1 comment
- Jul 2, 2023Add DirectML Support on Windows — painebenjamin/app.enfugue.ai0 reactions
On Hacker News · 1
- May 26, 2024Microsoft Olive: an easy-to-use hardware-aware model optimization tool12 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- oliveSkill
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 1 is common, 6 are distinctive, and 4 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 18
Use the smallest relevant check for your change:
- Very specific: line 24
If you need to run tests, install the appropriate dependencies from test/requirements-test.txt or one of the platform-specific files in …
- Distinctive: line 60
Follow Black-compatible formatting with a 120 character line length.
- Distinctive: line 61
Prefer existing repository patterns before adding new abstractions.
- Very specific: line 63
Use pathlib for path handling.
- Distinctive: line 64
Keep changes focused and avoid unrelated refactors.
- Distinctive: line 68
Add or update tests for behavior changes.
- Distinctive: line 69
Prefer behavior-focused tests over implementation-focused tests.
- Very specific: line 70
Use the existing naming convention: test_<method_or_function>_<expected_behavior>[_when_<condition>].
- Very specific: line 74
When creating PRs, use the template at .github/pull_request_template.md for the PR body.
- Common: line 79
Do not commit secrets, caches, or generated model artifacts.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project overview
Olive is a Python toolkit for AI model optimization on ONNX Runtime. The main package is in olive/, tests are in test/, and the CLI entry point is olive.
User guide
Olive users should install olive-ai with pip install olive-ai, and follow README.md.
Developer setup and validation
pip install -r requirements.txtpip install -e .pip install -r requirements-dev.txtlintrunner init
Use the smallest relevant check for your change:
python -c "import olive; print(olive.__version__)"olive --helplintrunner --all-files -a --skip PYLINTfor faster local linting while iterating; run PYLINT at the end when changes are ready for a PR
If you need to run tests, install the appropriate dependencies from test/requirements-test.txt or one of the platform-specific files in test/.
Repository map
olive/: main packagecli/: CLI commands such asoptimize,quantize,finetune,capture-onnx-graph, plus the shared launcher and base CLI logic.common/: shared helpers for config loading, Hugging Face integration, quantization helpers, ONNX/ORT utilities, and user module loading.data/: data configuration and registry.component/: dataset, dataloader, dataset loading, and pre/post-processing components.container/: data container implementations such as Hugging Face, raw, image, and dummy containers.
engine/: workflow execution, run footprint tracking, outputs, and packaging helpers.evaluator/: metrics, metric backends, metric config/result types, and evaluator orchestration.hardware/: accelerator definitions and related constants.model/: model definitions and runtime-specific model handling.config/: model config, Hugging Face config, I/O config, KV-cache config, and model registry helpers.handler/: handlers for composite, diffusers, Hugging Face, ONNX, OpenVINO, PyTorch, QAIRT, and QNN models.utils/: model utility helpers.
passes/: optimization, conversion, and quantization passes.- Backend-specific pass groups include
onnx/,pytorch/,openvino/,qnn/,qairt/,diffusers/, andquark_quantizer/.
- Backend-specific pass groups include
platform_sdk/qualcomm/: Qualcomm SDK environment setup, runners, and helper scripts.search/: search space, search points/results/samples, strategies, and sampler implementations.systems/: execution targets and runners for local, Docker, and Python-environment based systems.telemetry/: telemetry plumbing, exporters, utilities, and device ID support.workflows/run/: workflow config and workflow run entrypoints.
test/: test suite, organized to largely mirror the package structure.- Main areas include
cli/,common/,data_container/,engine/,evaluator/,hardware/,model/,passes/,resource_path/,search/,systems/, andworkflows/. assets/: shared fixtures and helper scripts for tests.requirements-test*.txt: base and platform-specific test dependency sets.
- Main areas include
docs/: documentation source and build config.source/containsgetting-started,how-to,reference,features,blogs, images, and Sphinx config.
notebooks/: example notebooks for quickstart, finetuning, LoRA, and optimized text generation workflows.scripts/: repository maintenance and artifact-generation utilities..github/workflows/: GitHub Actions workflows, including the Python lint workflow.
Code style
- Follow Black-compatible formatting with a 120 character line length.
- Prefer existing repository patterns before adding new abstractions.
- Use absolute imports.
- Use
pathlibfor path handling. - Keep changes focused and avoid unrelated refactors.
Testing
- Add or update tests for behavior changes.
- Prefer behavior-focused tests over implementation-focused tests.
- Use the existing naming convention:
test_<method_or_function>_<expected_behavior>[_when_<condition>].
Pull requests
- When creating PRs, use the template at
.github/pull_request_template.mdfor the PR body. - Fill in the "Describe your changes" section with a clear summary of what changed and why.
Security and environment notes
- Do not commit secrets, caches, or generated model artifacts.
- Some workflows require optional packages, specific hardware, or model downloads. In limited-network environments, prefer local validation and
olive optimize --dry_run ....
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

