Module bindings

Module bindings 

Source
Expand description

2026-09-28: CircuitBindings, the supertrait of TransformerLayer through which a layer hands the circuit executor its weights by role and the facts its kernels need. Layers keep owning their weights; a binding is a copy of pointers.

Owner: model-layers circuit executor. Invariants:

  • A layer lists in unmodelled every feature it carries that the circuit does not model (hyper-connections, LoRA, a projection format the rules do not cover, …). The executor refuses a model with any, so a plan never runs over a layer it misdescribes.
  • A bound weight carries its storage format; the executor checks it against the format the plan’s node was resolved to.

Structs§

AttnFacts
2026-09-28: What a full-attention layer’s kernels need beyond its weights.
CircuitLayer
2026-09-28: One layer, as the executor sees it.
DraftBinding
2026-09-29: The MTP draft head as the executor binds it: its one layer (weights by slot, the attention facts of its own KV cache) and that cache.
DraftRows
2026-09-30: The MTP head’s n-row draft facts: where its batched metadata and confidences live, and the LM-head launch it chooses at each width (MtpHead::lm_head_batch_kernel, mtp_head::lm_head_rows_arm), which the executor checks the plan against.
GdnFacts
2026-09-28: What a GatedDeltaNet layer’s kernels need beyond its weights.
HeadBinding
2026-09-28: The model’s own weights the head block reads, filled by the model.
RopeFacts
2026-09-28: A full-attention layer’s rotary embedding.

Enums§

BoundWeight
2026-09-28: A bound weight and its storage format.
MixerFacts
2026-09-28: The mixer a layer runs.
WeightSlot
2026-09-28: Which weight of a layer a circuit node reads.

Traits§

CircuitBindings
2026-09-28: A supertrait of TransformerLayer; see the module header.

Functions§

check_bindings
2026-09-28: Refuse a model the circuit misdescribes: an unbound layer, a layer or head feature no rule models, or a layer whose mixer is not the circuit’s.