Skip to content

Commit f43a31f

Browse files
justinchubyCopilot
andcommitted
Validate generic decoder configs on latest OGA
Limit recorded runtime coverage to onnxruntime-genai 0.15.2 and keep the real SmolLM generation test independent of the ONNX GenAI runtime-evidence packaging path. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
1 parent 7e3e4d5 commit f43a31f

4 files changed

Lines changed: 9 additions & 26 deletions

File tree

‎docs/cli_reference.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ dense cache. The deferred state-manifest work is tracked by
192192
[#605](https://github.com/onnxruntime/mobius/issues/605).
193193

194194
Each export also writes `runtime_compatibility.json`. Generic decoder metadata
195-
records the minimum runtime version and the released versions exercised by Mobius
196-
(0.14.1 and 0.15.2); it never emits the unreleased `decoder.state_groups` field.
195+
records the minimum runtime version and the latest stable release exercised by
196+
Mobius (0.15.2); it never emits the unreleased `decoder.state_groups` field.
197197
Generic config availability does not promote a GGUF runtime verdict: the only
198198
runtime-supported GGUF route remains the exact pinned SmolLM F16/CPU package, while
199199
SmolLM2 remains rejected because its GGUF padding-token metadata conflicts with the

‎src/mobius/integrations/ort_genai/auto_export.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def _revision_kwargs(revision: str | None) -> dict[str, str]:
149149
"phimoe": "phimoe",
150150
}
151151
_GENERIC_DECODER_MIN_VERSION = (0, 14, 0)
152-
_GENERIC_DECODER_TESTED_VERSIONS = ("0.14.1", "0.15.2")
152+
_GENERIC_DECODER_TESTED_VERSIONS = ("0.15.2",)
153153
_DECODER_SEMANTIC_INPUTS = frozenset(
154154
{
155155
"input_ids",
@@ -1801,8 +1801,6 @@ def write_ort_genai_config(
18011801
directory rather than a HuggingFace model ID.
18021802
trust_remote_code: Allow custom HuggingFace configuration code when
18031803
resolving token IDs and model type.
1804-
revision: Optional immutable HuggingFace revision used for every remote
1805-
configuration, tokenizer, and processor request.
18061804
runtime_version: Optional onnxruntime-genai version that will consume the
18071805
package. Generic decoder packages reject versions older than 0.14.0.
18081806

‎src/mobius/integrations/ort_genai/auto_export_test.py‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,24 +2141,16 @@ class FakeConfig:
21412141
data = json.load(f)
21422142
assert data["model"]["type"] == "decoder"
21432143

2144-
def test_config_mode_qwen3_moe_emits_supported_decoder_type(self, tmp_path):
2145-
"""Qwen3-MoE --config exports must not emit the unsupported HF type.
2146-
2147-
Regression: a decoder-only Qwen3-MoE package wrote
2148-
``"type": "qwen3_moe"`` into genai_config.json, and loading it raised
2149-
``RuntimeError: Unsupported model_type in config.json: qwen3_moe``
2150-
because ORT GenAI's LLM registry has no such type. The emitted type is
2151-
literally ``"qwen3"``: ORT GenAI's tokenizer tag fallback keys the
2152-
Qwen3 reasoning-token IDs off that name.
2153-
"""
2144+
def test_config_mode_qwen3_moe_emits_generic_decoder_type(self, tmp_path):
2145+
"""Qwen3-MoE uses the graph-driven generic decoder contract."""
21542146
from mobius.integrations.ort_genai.auto_export import write_ort_genai_config
21552147

21562148
pkg = _make_fake_llm_pkg("qwen3_moe")
21572149
result = write_ort_genai_config(pkg, str(tmp_path), hf_model_id=None)
21582150

21592151
with open(result["genai_config"]) as f:
21602152
data = json.load(f)
2161-
assert data["model"]["type"] == "qwen3"
2153+
assert data["model"]["type"] == "decoder"
21622154

21632155
def test_config_mode_gemma3_text_vlm_uses_multimodal_model_type(self, tmp_path):
21642156
"""Gemma3 VLM --config exports use ORT's multimodal gemma3 type."""
@@ -3409,7 +3401,7 @@ def test_generic_decoder_runtime_compatibility_metadata(tmp_path):
34093401
"runtime": "onnxruntime-genai",
34103402
"model_type": "decoder",
34113403
"minimum_version": "0.14.0",
3412-
"tested_versions": ["0.14.1", "0.15.2"],
3404+
"tested_versions": ["0.15.2"],
34133405
"uses_main_only_state_groups": False,
34143406
"heterogeneous_state_manifest": (
34153407
"deferred: https://github.com/onnxruntime/mobius/issues/605"

‎tests/gguf_small_model_runtime_integration_test.py‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -667,22 +667,15 @@ def capture_save(package: ModelPackage, *args: object, **kwargs: object) -> None
667667
"f32",
668668
"--execution-provider",
669669
"cpu",
670-
"--runtime",
671-
"onnx-genai",
672-
"--runtime-version",
673-
"1.29.0",
674-
"--tokenizer-repository",
675-
case.tokenizer_repository,
676-
"--tokenizer-revision",
677-
case.tokenizer_revision,
678-
"--local-files-only",
679670
]
680671
)
681672

682673
assert len(captured) == 1
683674
write_ort_genai_config(
684675
captured[0],
685676
str(output_dir),
677+
hf_model_id=case.tokenizer_repository,
678+
revision=case.tokenizer_revision,
686679
runtime_version=version("onnxruntime-genai"),
687680
)
688681
config = json.loads((output_dir / "genai_config.json").read_text())

0 commit comments

Comments
 (0)