Skip to content

Commit 1b10f77

Browse files
justinchubyCopilot
andcommitted
docs(onnx-genai): document decoder-LLM support alongside diffusion
LLM support is NOT missing: the decoder metadata logic that used to live in inference_metadata.py was refactored into the sibling decoder_metadata.py module (build_decoder_metadata / decoder_metadata_from_config / write_decoder_metadata), and write_onnx_genai_config dispatches to it for autoregressive models. Verified end-to-end: 'mobius build --model <llm> --runtime onnx-genai' emits a proper decoder document (required_capabilities [kv_cache, multi_head_attention], model.attention, architecture, max_sequence_length). The package/module docstrings only mentioned diffusion, which made it look like LLM support had been dropped. Fixes: - integrations/onnx_genai/__init__.py: describe BOTH decoder-LLM and diffusion metadata generation and the unified write_onnx_genai_config dispatcher. - inference_metadata.py: add a Note pointing at decoder_metadata.py for LLMs. Co-authored-by: Copilot <[email protected]> Copilot-Session: bd351e74-2569-444d-a7da-6456f3b5df82
1 parent 06c7a06 commit 1b10f77

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

‎src/mobius/integrations/onnx_genai/__init__.py‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@
55
66
onnx-genai (https://github.com/justinchuby/onnx-genai) is a standard-driven
77
runtime whose behavior is declared by an ``inference_metadata`` document rather
8-
than hardcoded per-model dispatch. This module emits the pipeline section for
9-
multi-model diffusion packages (denoiser + optional VAE / text encoder) so a
10-
Mobius-built diffusion package is directly runnable by onnx-genai's iterative
11-
pipeline (`PipelineEngine::run_pipeline`).
8+
than hardcoded per-model dispatch. This package emits that document for both
9+
model families Mobius builds:
10+
11+
* **Decoder-only language models** — :func:`write_decoder_metadata` /
12+
:func:`decoder_metadata_from_config` (in ``decoder_metadata``) emit the
13+
``model.attention`` + ``kv_cache`` sections for an autoregressive LLM.
14+
* **Diffusion pipelines** — :func:`write_diffusion_pipeline_metadata` and the
15+
builders in ``inference_metadata`` emit the iterative ``pipeline`` section for
16+
a multi-model package (denoiser + optional VAE / text encoder).
17+
18+
:func:`write_onnx_genai_config` is the unified entry point: it inspects the
19+
built package and dispatches to the decoder or diffusion writer, so
20+
``mobius build --runtime onnx-genai`` works for LLMs and diffusion models alike.
1221
1322
The core model/task/component layers remain runtime-agnostic; all onnx-genai
1423
specific code lives here.

‎src/mobius/integrations/onnx_genai/inference_metadata.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
``schema/inference_metadata.schema.json`` (kind ``iterative`` with
2020
``denoiser`` / ``num_steps`` / ``timestep_input`` / ``scheduler_config`` /
2121
``cfg_conditioning_input`` and denoiser self-edge loop-carried dataflow).
22+
23+
Note:
24+
This module covers *diffusion* pipelines only. Autoregressive
25+
decoder-only LLM metadata (``model.attention`` + ``kv_cache``) lives in the
26+
sibling :mod:`mobius.integrations.onnx_genai.decoder_metadata` module;
27+
:func:`mobius.integrations.onnx_genai.write_onnx_genai_config` dispatches to
28+
whichever applies for a built package.
2229
"""
2330

2431
from __future__ import annotations

0 commit comments

Comments
 (0)