Skip to content

Add QairtPipelinePass: single-pass QAIRT LLM pipeline via YAML recipe#2465

Draft
qti-kromero wants to merge 5 commits into
microsoft:mainfrom
CodeLinaro:dev/qti-kromero/qairt-pipeline-pass
Draft

Add QairtPipelinePass: single-pass QAIRT LLM pipeline via YAML recipe#2465
qti-kromero wants to merge 5 commits into
microsoft:mainfrom
CodeLinaro:dev/qti-kromero/qairt-pipeline-pass

Conversation

@qti-kromero
Copy link
Copy Markdown
Contributor

@qti-kromero qti-kromero commented May 14, 2026

Describe your changes

Add QairtPipelinePass, a new Olive pass that runs QAIRT's LLMPipeline end-to-end from a YAML recipe, replacing the multi-step QairtPreparation → QairtGenAIBuilder workflow with a single configurable pass.

  • Accepts an HfModelHandler and a YAML recipe path; executes the full pipeline (model loading, quantization, compilation) and emits a QairtModelHandler.
  • The input HfModelHandler is the authoritative model source — if the recipe also specifies model_id_or_path and it conflicts with the handler's path, the pass raises a ValueError.
  • cache_dir and log_level config params allow Olive-level overrides of the corresponding recipe fields.

Files changed:

  • olive/passes/qairt/pipeline.py — new QairtPipelinePass implementation
  • olive/olive_config.json — registers the pass for QNNExecutionProvider/NPU
  • test/passes/qairt/test_pipeline_pass.py — unit tests covering success, model-id conflict, override params, missing recipe, invalid input model, and import error cases

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • 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.

(Optional) Issue link

QairtEncapsulation needs config.json and generation_config.json to generate
genai_config.json. Copy them from the source HF model if not already present.
@qti-kromero qti-kromero changed the title Dev/qti kromero/qairt pipeline pass Add QairtPipelinePass: single-pass QAIRT LLM pipeline via YAML recipe May 14, 2026
Comment thread olive/passes/qairt/pipeline.py Fixed
Comment thread test/passes/qairt/test_pipeline_pass.py Fixed
Use snapshot_download(local_files_only=True) to resolve the local HF cache
path before copying config.json and generation_config.json. Fixes the case
where model.model_path is a HuggingFace repo ID rather than a local directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants