Skip to main content

LoadedCheckpoint

Struct LoadedCheckpoint 

Source
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 bank/table carriers that stay out of ReferenceWeights.

Fields§

§plan: ModelPlan§weights: ReferenceWeights

Implementations§

Source§

impl LoadedCheckpoint

Source

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

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.