Add QairtPipelinePass: single-pass QAIRT LLM pipeline via YAML recipe#2465
Draft
qti-kromero wants to merge 5 commits into
Draft
Add QairtPipelinePass: single-pass QAIRT LLM pipeline via YAML recipe#2465qti-kromero wants to merge 5 commits into
qti-kromero wants to merge 5 commits into
Conversation
QairtEncapsulation needs config.json and generation_config.json to generate genai_config.json. Copy them from the source HF model if not already present.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Add
QairtPipelinePass, a new Olive pass that runs QAIRT'sLLMPipelineend-to-end from a YAML recipe, replacing the multi-stepQairtPreparation → QairtGenAIBuilderworkflow with a single configurable pass.HfModelHandlerand a YAML recipe path; executes the full pipeline (model loading, quantization, compilation) and emits aQairtModelHandler.HfModelHandleris the authoritative model source — if the recipe also specifiesmodel_id_or_pathand it conflicts with the handler's path, the pass raises aValueError.cache_dirandlog_levelconfig params allow Olive-level overrides of the corresponding recipe fields.Files changed:
olive/passes/qairt/pipeline.py— newQairtPipelinePassimplementationolive/olive_config.json— registers the pass forQNNExecutionProvider/NPUtest/passes/qairt/test_pipeline_pass.py— unit tests covering success, model-id conflict, override params, missing recipe, invalid input model, and import error casesChecklist before requesting a review
lintrunner -a(Optional) Issue link