Skip to content

Fix Qwen3 genai bundle component builds - #1248

Open
DingmaomaoBJTU wants to merge 2 commits into
mainfrom
dingmaomaobjtu-convert-qwen3-model
Open

Fix Qwen3 genai bundle component builds#1248
DingmaomaoBJTU wants to merge 2 commits into
mainfrom
dingmaomaobjtu-convert-qwen3-model

Conversation

@DingmaomaoBJTU

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve quantization for raw graphs that intentionally skip ORT optimization.
  • Add a build-only path for HF/composite builds so genai bundle assembly consumes ONNX artifacts without creating runtime sessions.
  • Use the build-only component path in genai bundle orchestration and cover the Qwen3 regression cases.

Validation

  • uv run ruff check src\winml\modelkit\build\common.py src\winml\modelkit\commands\build.py src\winml\modelkit\config\build.py src\winml\modelkit\models\auto.py src\winml\modelkit\models\winml\composite_model.py src\winml\modelkit\models\winml\genai_bundle.py src\winml\modelkit\models\hf\qwen3\qwen_transformer_only.py tests\unit\build\test_hf.py tests\unit\build\test_onnx.py tests\unit\commands\test_build.py tests\unit\models\auto\test_from_pretrained_ep.py tests\unit\models\qwen3\test_qwen3_modeling.py tests\unit\models\winml\test_genai_bundle_orchestrator.py
  • uv run pytest tests\unit\build\test_hf.py tests\unit\build\test_onnx.py tests\unit\commands\test_build.py tests\unit\models\auto\test_from_pretrained_ep.py tests\unit\models\qwen3\test_qwen3_modeling.py tests\unit\models\winml\test_genai_bundle_orchestrator.py
  • x64 cmd full rebuild of Qwen/Qwen3-0.6B with --export-type optimized --ep qnn --device npu --rebuild exits 0 and produces matching bundle hashes.

@DingmaomaoBJTU
DingmaomaoBJTU requested a review from a team as a code owner July 29, 2026 06:27
@DingmaomaoBJTU
DingmaomaoBJTU force-pushed the dingmaomaobjtu-convert-qwen3-model branch 2 times, most recently from 8fc63fa to ceed825 Compare July 29, 2026 07:32
Preserve quantization when raw graphs skip ORT optimization, and make genai bundle assembly use private artifact builds so bundle export does not create runtime sessions.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@DingmaomaoBJTU
DingmaomaoBJTU force-pushed the dingmaomaobjtu-convert-qwen3-model branch from ceed825 to e176488 Compare July 29, 2026 09:50
stage_timings["export"] = time.monotonic() - t0
stages_completed.append("export")
logger.info("Export done (%.1fs) -> %s", stage_timings["export"], export_path)
pytorch_model = None
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