Introduction & Quick Start
Relevant source files
The following files were used as context for generating this wiki page:
Olive Studio is a local-first desktop web application designed to facilitate the creation, validation, and execution of model optimization workflows using Microsoft Olive. It provides a graphical user interface (GUI) that abstracts the complexity of manually authoring JSON recipes and shell scripts, offering a guided three-step pipeline: selecting a model source, picking a hardware target, and configuring the optimization recipe for execution. Sources: ABOUT.md:3-10, README.md:8-12
The application operates primarily as a front-end and runner for the official Olive CLI. It manages local Python virtual environments, automates the installation of olive-ai and hardware-specific dependencies (such as CUDA, TensorRT, and OpenVINO), and provides real-time log streaming via Server-Sent Events (SSE). While it supports optional AI-assisted features like recipe review and chat, the core optimization workflows are strictly local and do not require cloud connectivity or API keys. Sources: ABOUT.md:12-23, README.md:14-16
Architecture Overview
The system architecture is divided into a React-based UI, an Express-based server, and a Python execution layer. The UI handles state management and recipe building, while the server manages the lifecycle of the optimization process, including environment setup and process spawning. Sources: ABOUT.md:33-40, README.md:147-155
Core Components
| Component | Description |
|---|---|
| UI Layer | Built with React 19, Tailwind CSS, and Radix UI. Includes features like the Recipe Graph, JSON Editor, and Input Panels. |
| Server Layer | Express.js server that handles API requests, job registry, and streams Olive process output via SSE. |
| Optimization Engine | Python 3.9+ environment containing olive-ai and relevant execution providers (CUDA, TensorRT, OpenVINO, etc.). |
| Hardware Probe | Logic that detects local CPU/GPU/NPU capabilities to recommend valid execution providers. |
Sources: ABOUT.md:33-40, README.md:46-56, server.ts:143-150
Workflow Logic
The following diagram illustrates the high-level data flow from model selection to execution:
The workflow begins with selecting a model (HuggingFace, Local, or Azure ML), followed by hardware detection to filter compatible Execution Providers (EP). The resulting recipe is validated against schemas and hardware constraints before being executed via the server. Sources: README.md:112-120, ABOUT.md:12-16, src/components/features/InputEnvironmentPanel.tsx:126-140
Installation and Setup
Prerequisites
Before starting Olive Studio, ensure the following are installed on your host system:
- Node.js: Version 18+ (20+ recommended).
- Python: Version 3.9+ available on the system
PATH. - Git: For cloning the repository.
- Hardware Tooling: (Optional) NVIDIA, Intel, or Qualcomm drivers for specific GPU/NPU optimizations.
Sources: README.md:72-78, CONTRIBUTING.md:16-21
Quick Start Commands
To get the development environment running locally:
git clone https://github.com/tonythethompson/Olive-Studio.git
cd Olive-Studio
pnpm install
npm run dev
The application will be available at http://localhost:3000. Note that pnpm is the preferred package manager. Sources: README.md:80-87, package.json:20-20
Initial Execution
On the first attempt to "Execute Live" or run a batch job, the server automatically performs the following tasks:
- Creates a
.venv/directory in the project root. - Installs
olive-aiand required Python dependencies. - Pins specific versions like
onnxruntime-gpuand pulls CUDA/cuDNN/TensorRT packages if a GPU recipe is targeted.
Sources: README.md:46-50, server.ts:251-285
Key Features
Input & Environment Management
The InputEnvironmentPanel allows users to load models from multiple sources:
- Hugging Face: Supports model IDs and handles gated models via
HF_TOKEN. - Local Files: Includes an inspector for model metadata and a "Reconstruct Binary" feature for chunked uploads (e.g.,
.bin.001,.bin.002). - Azure ML: Direct path integration for enterprise models.
- Curated Catalog: Starter recipes fetched from
microsoft/olive-recipes.
Sources: src/components/features/InputEnvironmentPanel.tsx:880-1120, README.md:20-25
Execution Workspace
The ExecutionWorkspace provides the final interface for starting optimization:
- Recipe Graph View: A visual representation of the optimization passes.
- JSON Editor: For advanced users to edit the Olive recipe directly.
- Live Execution: Connects to the
/api/olive/runendpoint and streams logs. - OWR Export: Generates deployment bundles for ONNX Runtime Web and Mobile.
Sources: src/components/features/ExecutionWorkspace.tsx:143-220, src/components/features/ExecutionWorkspace.tsx:505-550
API Endpoints
The server exposes several endpoints for managing the optimization lifecycle:
| Endpoint | Method | Description |
|---|---|---|
/api/olive/run | POST | Triggers the optimization process; ensures venv and dependencies are ready. |
/api/olive/stream/:jobId | GET | Establishes an SSE connection to stream stdout/stderr logs for a specific job. |
/api/olive/status/:jobId | GET | Returns the current status (e.g., running, completed, failed) and exit code. |
/api/system/hardware-probe | GET | Returns the detected hardware capabilities and recommended execution providers. |
Sources: server.ts:518-525, server.ts:639-650, server.ts:684-692, server.ts:503-515
Conclusion
Olive Studio provides a comprehensive GUI for Microsoft Olive, streamlining the transition from raw models to hardware-optimized inference. By automating environment management and providing visual validation, it enables ML engineers and hobbyists to leverage advanced optimization techniques—such as quantization, pruning, and LoRA—without the overhead of manual configuration management. Sources: ABOUT.md:3-10, README.md:8-12