pub struct LoadedCheckpoint {
pub plan: ModelPlan,
pub weights: ReferenceWeights,
/* private fields */
}Expand description
A checkpoint materialized through the pack contract: reference-layout weights for the
trunk + globals (effective norms — the (1+w) fold applied per the module-header rule),
plus the table carrier that stays out of ReferenceWeights and the LAZY bank plans.
The open safetensors mmap is part of the value: expert banks are read from it per layer
at consume time (see BankPlan). It stays mapped until the checkpoint is dropped, so a
consumer must not outlive it — every consumer here is a constructor that finishes
uploading before returning.
Fields§
§plan: ModelPlan§weights: ReferenceWeightsImplementations§
Source§impl LoadedCheckpoint
impl LoadedCheckpoint
Sourcepub fn bank_fingerprints(&self) -> Result<Vec<BankFingerprint>, Box<dyn Error>>
pub fn bank_fingerprints(&self) -> Result<Vec<BankFingerprint>, Box<dyn Error>>
Per-projection byte fingerprints for every bank, read one layer at a time (so this
costs one layer of host memory, not the artifact). Gate instrument only — see
BankFingerprint; the tiny-fixture gate compares these against banked goldens.
Sourcepub fn into_reference_weights(self) -> Result<ReferenceWeights, Box<dyn Error>>
pub fn into_reference_weights(self) -> Result<ReferenceWeights, Box<dyn Error>>
Expand banks and n-gram tables into plain ReferenceWeights entries so
memra-reference can execute the checkpoint. TINY/SIBLING SCALE ONLY — the real
artifact’s banks/table do not fit host f32; the GPU path never takes this.
Source§impl LoadedCheckpoint
impl LoadedCheckpoint
Sourcepub fn mtp_reference_weights(&self) -> Result<ReferenceWeights, Box<dyn Error>>
pub fn mtp_reference_weights(&self) -> Result<ReferenceWeights, Box<dyn Error>>
CLONE the float weights and expand ONLY the MTP bank(s) into ReferenceWeights
entries — the real-checkpoint draft-parity instrument (mtp-spec lane): the host
reference twin needs the mtp.* rows + embed/head, and must NOT expand the trunk
banks (48 layers of f32 experts do not fit anywhere). Borrowing form so ONE
checkpoint read serves both the engine model and the host twin.