Metadata-Version: 2.4
Name: lattice-contract
Version: 0.4.0
Summary: Backend-neutral sparse lattice artifact contract
Author-email: "Z.Y. Lin" <me@iki.moe>
License-Expression: MIT
Keywords: ir,lattice,model-artifact,sparse
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# lattice-contract

`lattice-contract` is the backend-neutral artifact contract package used by
`mlx-lattice` and future training-side exporters.

The forward contract is MLIR-first. Dialect declarations live in one annotated
Python schema and generate the textual MLIR builder surface at import time, so
exporters do not hand-maintain op-name and attribute-name maps.

It intentionally does not import MLX, Torch, native extensions, or backend
runtime objects. The exchange target is `graph.mlir + weights.safetensors`;
shallow package metadata can be added later, but graph semantics belong in
MLIR.

The package exports the artifact ABI constants used by builders and importers:
`CURRENT_DIALECT_VERSION`, `DIALECT_SCHEMA_DIGEST`, `ARTIFACT_GRAPH_FILE`,
and `ARTIFACT_WEIGHT_FILE`.
