What a generated model needs to preserve
A generated model can compile and still behave differently from its source. A cast moved across a normalization step, a weight assigned to the wrong module, or a cache dropped between tokens can change the result.
ModelIR records the model facts needed by the target. Recent work concentrates on the checks around that translation, including source freshness, checkpoint geometry, and state continuity.
Know which source was checked
Selected artifact paths carry digests of the source they describe. When that source changes, the old check is no longer a check of the new input. This matters when upstream model definitions and local generators evolve independently.
Preserve structure before loading weights
Tensor dimensions are only part of a checkpoint contract. Module roles, weight paths, precision choices, and architecture-specific normalization also matter. The representation separates these facts from target-specific lowering. Unsupported structure should produce a named refusal.
Follow state into the next token
A single forward pass can miss a state-transfer error. Selected Gated Delta Network fixtures now check that returned caches reach the following decode step. The check covers the fixture and path exercised; a different model or runtime needs its own comparison.
Compare execution after generation
Source emission, compilation, and numerical comparison answer successive questions. Reference execution needs declared inputs and tolerances, along with the exact model and runtime revisions. Host coverage cannot substitute for execution on the target accelerator.
This is the boundary between ModelIR, which describes and translates model structure, and mlx-go-lm, which owns loading and execution. Keeping the boundary explicit makes a failed check easier to locate.
For a model-port review, send the model family and intended target. We can then identify the supported source patterns and the runtime comparison needed.