Repository navigation
Commit 640c1cb
Emit executable native VLM contracts (#418)
## Summary
- emit typed graph-derived inputs/outputs for every native VLM
component, including source classification and exact sparse KV ports
- route every compatible sequence edge (including `per_layer_inputs`)
and run sequence-producing embedding stages on every decode step
- emit qualified typed image endpoints/transforms and validate
executable closure before writing the sidecar
- reject missing/duplicate input sources and dtype/rank-incompatible
edges with actionable `component.port` errors
The real Gemma4 audio output is rank 3 while the embedding input is rank
2, so the old invalid edge is no longer guessed; the embedding audio
port is explicitly external until optional-modality/typed-audio
transform semantics land.
## Validation
- `PYTHONPATH=$PWD/src python3 -m pytest
src/mobius/integrations/onnx_genai/inference_metadata_test.py
tests/cli_test.py -q` — 62 passed
- `lintrunner` 0.12.7 with repository Ruff 0.15.14 adapters — clean
- offline optimized Gemma4 E2B fp16 export — closure validator passed
against all four saved ONNX graphs
- verified 15 K/V layers (30 inputs/30 outputs), mixed 256/512 head
dimensions, fp16 pixels + int64 patch coordinates, both
embedding→decoder edges, and embedding `every_step`
Co-authored-by: Copilot <[email protected]>1 parent 00c8fac commit 640c1cb
2 files changed
Lines changed: 497 additions & 53 deletions
0 commit comments