Recipe Catalog Generation
Relevant source files
The following files were used as context for generating this wiki page:
- src/data/olive-recipes-catalog.ts
- src/components/features/InputEnvironmentPanel.tsx
- src/lib/oliveRecipeHub.ts (Inferred from component imports)
- package.json
- README.md
- CONTRIBUTING.md
- scripts/generate-olive-recipes-catalog.mjs (Referenced in automation scripts)
Recipe Catalog Generation is the automated process of synchronizing, parsing, and surfacing optimized model configuration presets from the official microsoft/olive-recipes repository into Olive Studio. This system enables users to discover and apply verified optimization pipelines for specific model architectures and hardware targets without manual JSON configuration.
Sources: README.md:144-148, CONTRIBUTING.md:73-77
Architecture and Data Flow
The catalog generation system follows a periodic update cycle where upstream GitHub data is transformed into a local TypeScript registry. At runtime, this registry is used to lazy-load the actual recipe payloads directly from GitHub.
Catalog Generation Pipeline
The generation process is triggered by a maintenance script that scrapes the upstream repository structure. This script creates a metadata index used by the UI to filter and search for recipes.
The system differentiates between Metadata Source types:
recipe: Metadata is derived directly from the recipe content.folder: Metadata (architecture and device) is inferred from the repository directory structure.
Sources: src/data/olive-recipes-catalog.ts:7-14, src/components/features/InputEnvironmentPanel.tsx:180-184, CONTRIBUTING.md:77
Data Structures and Configuration
The catalog is stored as a constant array of RecipeCatalogItem objects, which serve as the source of truth for the "Starter Curated" presets in the UI.
RecipeCatalogItem Schema
| Field | Type | Description |
|---|---|---|
name | string | Display name, typically formatted as model · device · filename. |
architecture | string | Model family (e.g., Llama, Phi, Whisper, BERT). |
device | string | Target hardware/EP (e.g., CPU, CUDA, QNN, OpenVINO). |
repoPath | string | Relative path to the JSON file in the upstream repo. |
description | string | Human-readable summary of the optimization goal. |
metadataSource | "folder" | "recipe" | Origin of the architecture/device tags. |
Sources: src/data/olive-recipes-catalog.ts:14-23, src/lib/oliveRecipeHub.ts
Global Repository Constants
The system is hardcoded to track a specific upstream target to ensure compatibility:
- Repository:
microsoft/olive-recipes - Branch:
main
Sources: src/data/olive-recipes-catalog.ts:6-7
Maintenance and Automation
The catalog is not intended to be updated manually. Developers use built-in scripts to synchronize the local metadata with the latest upstream additions.
Update Workflow
- Run
npm run generate:recipesto execute the generation script. - The script updates
src/data/olive-recipes-catalog.ts. - The UI automatically reflects new models upon the next build or hot reload.
Integration with Runtime Hardware Probing
When a catalog item is selected, the system compares the recipe's requirements against the local machine's capabilities.
Compatibility Matching Logic
The InputEnvironmentPanel uses the catalog metadata to:
- Filter: Hide recipes targeting NPUs (like
QNN) or specific GPUs if the hardware probe does not detect them. - Warn: Surface "Incompatible" badges if a user selects a recipe for
DirectMLon a Linux machine. - Hardware-Aware Display: Highlight "Compatible" presets based on detected Execution Providers (EPs).
Sources: src/components/features/InputEnvironmentPanel.tsx:340-355, src/components/features/InputEnvironmentPanel.tsx:505-520
Example Catalog Entry
{
name: "deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B · QNN · config_gpu",
architecture: "Qwen",
device: "QNN",
repoPath: "deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B/QNN/config_gpu.json",
description: "Official microsoft/olive-recipes run config for deepseek-ai-DeepSeek-R1-Distill-Qwen-1.5B (QNN/config_gpu.json).",
metadataSource: "folder",
}
Sources: src/data/olive-recipes-catalog.ts:167-174
Summary
The Recipe Catalog Generation system provides a bridge between the rapidly evolving microsoft/olive-recipes ecosystem and the Olive Studio UI. By automating the extraction of metadata and providing a structured TypeScript registry, the project ensures that users have access to hundreds of verified optimization pipelines for modern LLMs and vision models while maintaining strict hardware compatibility checks.