Module checkpoint

Module checkpoint 

Source
Expand description

2026-09-30: A circuit from a checkpoint alone: its config.json and quantization metadata pick the architecture, map to an arch shape through the architecture’s declarative config map (kernels/circuits/<arch>.config.toml), and give every projection its declared formats. The model axis of met circuit plan --checkpoint --hardware.

Owner: metrale-circuit. Invariants:

  • Pure: the circuit, block and config-map TOMLs are embedded at build time; the caller passes the checkpoint’s file text. No I/O, no environment.
  • The architecture is chosen by the config’s top-level model_type alone; a model type no map serves is refused, never approximated by a neighbour.
  • Precision comes from config.json’s own quantization_config when it has one, else from the sidecar hf_quant_config.json (the serve rule, merge_sidecar_quant_config).

Structs§

QuantMetadata
2026-09-30: The quantization metadata a checkpoint ships beside its config.json.
ResolvedCheckpoint
2026-09-30: A checkpoint resolved to its circuit.

Enums§

CheckpointError
2026-09-30: Why a checkpoint has no circuit.
ServePrecision
2026-09-30: Which formats the circuit’s edges take.

Functions§

config_maps
2026-09-30: The embedded config maps, parsed.
instantiate_from_checkpoint
2026-09-30: The circuit of the checkpoint config_json describes, every edge at the checkpoint’s declared formats.
map_checkpoint
2026-09-30: config.json mapped to its circuit arch, arch shape and params, without instantiating: the shape INSTANCES.toml must restate for a golden instance.
recurrent_states
2026-09-30: The recurrent states of one layer of the circuit that serves the engine-configured model_type (ConfigMap::serves_engine_model_type), under dims: the declarations of the one layer block that keeps recurrent state (GatedDeltaNet gdn, Mamba2 mamba), ids <block>.<state>. Ok(Some(empty)) for a circuit with no recurrent layer.
resolve_checkpoint
2026-09-30: The checkpoint’s arch, shape, params, KV-cache format and circuit, with the edge formats serve gives.