Repository navigation
Fix inference metadata producer invariants - #539
Merged
justinchuby merged 1 commit intoAug 21, 2026
Merged
Conversation
Stop serializing retired adapter artifact hashes and base-model fingerprints into inference metadata. Enforce identical numeric key/value cache layer sets while preserving heterogeneous K/V geometry, and regenerate the cross-repository workflow fixtures with serialized-output regression checks. Co-authored-by: Copilot <[email protected]> Signed-off-by: justinchuby <[email protected]>
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the invariants and serialization rules for ONNX GenAI inference metadata produced by Mobius, aligning the producer with updated validator/runtime expectations (paired with onnx-genai PR #1688). It removes retired hash/fingerprint fields from authored metadata and enforces correctness of split KV-cache aliasing by layer (including heterogeneous key/value head geometry).
Changes:
- Stop serializing retired authored-metadata fields (
sha256,config_sha256,base_model_fingerprint) in adapter/artifact metadata and update tests/fixtures accordingly. - Enforce (and test) that attention state groups emitting split KV caches declare exactly one key and one value alias per identical numeric layer set.
- Update executable validation-package graphs and workflow fixtures to include distinct value-cache ports alongside key-cache ports, preserving heterogeneous K/V shapes.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/generate_onnx_genai_validation_packages.py | Updates generated decoder/speculative ONNX graphs to model separate K/V cache inputs/outputs with heterogeneous shapes. |
| tests/fixtures/onnx_genai_workflows/speculative/inference_metadata.yaml | Regenerated speculative workflow fixture to include value-cache request/state wiring and present outputs. |
| tests/fixtures/onnx_genai_workflows/decoder/inference_metadata.yaml | Regenerated decoder workflow fixture to include value-cache ports, state cells, and loop carry wiring. |
| tests/fixtures/onnx_genai_workflows/adapter/inference_metadata.yaml | Removes retired fingerprint/hash fields from adapter inference metadata fixture. |
| tests/compare_onnx_genai_validation_packages.py | Adds invariant checks for retired fields and malformed attention K/V layer sets across committed and generated metadata. |
| src/mobius/integrations/onnx_genai/workflow_metadata.py | Adds and applies validation ensuring split KV aliases cover identical numeric layer sets (no duplicates, no mismatches). |
| src/mobius/integrations/onnx_genai/workflow_metadata_test.py | Extends tests to assert K/V layer-set equality and adds negative-coverage tests for the new validator. |
| src/mobius/integrations/onnx_genai/inference_metadata.py | Stops emitting base_model_fingerprint in authored inference metadata under adapters. |
| src/mobius/adapters_test.py | Updates adapter metadata tests to assert retired fields are absent (without relying on serialized sha256 fields). |
| src/mobius/_model_package.py | Removes retired hash/fingerprint fields from serialized adapter artifacts while preserving required artifact descriptors. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
justinchuby
deleted the
justinchuby/fix-inference-metadata-producer-invariants
branch
August 21, 2026 23:52
justinchuby
added a commit
that referenced
this pull request
Aug 22, 2026
Resolve adapter serialization conflicts by retaining the hashless producer contract from #539 together with PEFT attachment and source-preservation support. Co-authored-by: Copilot <[email protected]> Signed-off-by: justinchuby <[email protected]>
justinchuby
added a commit
that referenced
this pull request
Aug 22, 2026
Preserve the hashless inference-metadata producer invariants from #539 and the PEFT integration from #536 while carrying the focused Moshi and Pangu catalogue changes forward. Co-authored-by: Copilot <[email protected]> Signed-off-by: justinchuby <[email protected]>
justinchuby
added a commit
that referenced
this pull request
Aug 22, 2026
## Summary - infer 8-step public Moshi/Moshiko versus 16-step PersonaPlex depformer weights and build the matching real-weight graph - keep full-duplex workflow metadata valid when optimization prunes the temporal position_ids graph input - expose deterministic runtime sampling and standard Mimi component paths - add a standalone pinned Pangu-Weather packaging/evidence utility ## Pangu script scope The Pangu utility is intentionally a separate first commit and does not register a new Mobius architecture. It packages an already-published ONNX checkpoint, verifies its exact SHA-256 and graph ports using onnx_ir, executes deterministic real-weight inference, and emits provenance/evidence. Keeping it under scripts/ makes the catalogue result reproducible without adding an inaccurate synthetic model exporter. ## Main integration and producer invariants Merged current origin/main without rebasing. The merge retains #539's hashless producer invariants (no sha256, config_sha256, or base_model_fingerprint fields in authored inference metadata), complete attention key/value layer alias sets, and #536's PEFT changes. ## Validation - python3 -m pytest tests/build_graph_test.py -k 'depformer_io or TestBuildMoshiLM' -q --tb=short: 4 passed - python3 -m pytest src/mobius/integrations/onnx_genai/duplex_workflow_metadata_test.py src/mobius/generation/_duplex_policy_test.py -q --tb=short: 29 passed, 1 skipped - lintrunner f --output oneline --all-files, then lintrunner -a: passed with pinned ruff 0.16.2 - Pangu graph inspection against the published 1-hour model: exact expected ports, IR v7, opset 14 - automated code review: no significant findings ## Real-weight evidence The public CC-BY-4.0 Moshiko derivative executes encoder -> temporal -> 8-step depformer -> decoder on CUDA. The pinned Pangu weather package and ACT action-rollout fallback are published separately in the catalogue dataset. --------- Signed-off-by: justinchuby <[email protected]> Co-authored-by: Copilot <[email protected]>
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.
Summary
sha256,config_sha256, andbase_model_fingerprintfields in authored inference metadataCross-repository context
This is the paired Mobius producer update for onnx-genai PR #1688. All 13 generated Mobius packages validate with that PR's validator, and all 12 workflow conformance tests pass against its runtime.
PR #536's PEFT implementation was not modified. After this lands, #536 should merge
mainand retain its PEFT implementation while taking the hashless serialization changes insave_adapter_artifacts, the adapter-service fingerprint removal, and updated adapter fixtures/expectations.Validation
python3 -m pytest src/mobius/adapters_test.py src/mobius/integrations/onnx_genai -q --tb=short— 247 passed, 5 skipped