Skip to main content

CheckpointMetadata

Struct CheckpointMetadata 

Source
pub struct CheckpointMetadata {
Show 27 fields pub version: u32, pub config_signature: String, pub project_only_targets: bool, pub retrain_early_epochs: usize, pub retrain_early_until: usize, pub input_size: u64, pub original_len: usize, pub file_len: usize, pub initial_prior_sha256: Option<String>, pub initial_prior_vocab_sha256: Option<String>, pub tensors_sha256: String, pub online_adam_steps: BTreeMap<String, u64>, pub retrain_adam_steps: BTreeMap<String, u64>, pub rng_state: RngState, pub encoder_state: Option<EncoderState>, pub decoder_state: Option<DecoderState>, pub bit_out_state: Option<BitOutputState>, pub bit_in_state: Option<BitInputState>, pub output_position: Option<u64>, pub n_symbols: usize, pub n_bits: f64, pub train_step: usize, pub retrain_train_step: usize, pub block_start: usize, pub last_retrain_pos: usize, pub elapsed_seconds: f64, pub reason: String,
}
Expand description

Serializable metadata written alongside latest.safetensors for resumable execution.

Fields§

§version: u32

Checkpoint format version (1).

§config_signature: String

Stable JSON signature of architectural and coding parameters.

§project_only_targets: bool

Whether only target positions were projected through head.

§retrain_early_epochs: usize

Early replay epoch override setting.

§retrain_early_until: usize

Early replay prefix threshold setting.

§input_size: u64

Input file size in bytes at start of run.

§original_len: usize

Unpadded original token count.

§file_len: usize

Padded token buffer length (multiple of batch_size).

§initial_prior_sha256: Option<String>

SHA-256 digest of --initial_prior if used.

§initial_prior_vocab_sha256: Option<String>

SHA-256 digest of --vocab_file if used with --initial_prior.

§tensors_sha256: String

SHA-256 digest of the paired latest.safetensors file.

§online_adam_steps: BTreeMap<String, u64>

Per-parameter Adam step counters for the online optimizer.

§retrain_adam_steps: BTreeMap<String, u64>

Per-parameter Adam step counters for the replay optimizer.

§rng_state: RngState

Exact PRNG state.

§encoder_state: Option<EncoderState>

Encoder state (Some when compressing with coding enabled).

§decoder_state: Option<DecoderState>

Decoder state (Some when decompressing).

§bit_out_state: Option<BitOutputState>

Output bit stream state (Some when compressing with coding enabled).

§bit_in_state: Option<BitInputState>

Input bit stream state (Some when decompressing).

§output_position: Option<u64>

Byte offset of the decoded token output file (Some when decompressing).

§n_symbols: usize

Cumulative coded symbol count.

§n_bits: f64

Cumulative modeled cross-entropy bits.

§train_step: usize

Cumulative online optimizer steps.

§retrain_train_step: usize

Cumulative prefix-replay optimizer steps.

§block_start: usize

Token index at the start of the next block.

§last_retrain_pos: usize

Token index where prefix retraining last ran.

§elapsed_seconds: f64

Elapsed active compute seconds before this checkpoint.

§reason: String

Reason this checkpoint was saved ("periodic", "stop-request", "test-stop").

Trait Implementations§

Source§

impl Clone for CheckpointMetadata

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CheckpointMetadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CheckpointMetadata

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CheckpointMetadata

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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, !>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more