pub struct MuonAdamWRecord<B: AutodiffBackend> { /* private fields */ }Expand description
Versioned optimizer record. Save the model record with it so ParamIds survive. Configuration and routing are checked on load; lower-precision record settings can round momentum, so use full-precision records for continuation comparisons.
Implementations§
Source§impl<B: AutodiffBackend> MuonAdamWRecord<B>
impl<B: AutodiffBackend> MuonAdamWRecord<B>
Sourcepub fn muon_state_count(&self) -> usize
pub fn muon_state_count(&self) -> usize
Number of hidden-matrix momentum states saved.
Sourcepub fn adamw_state_count(&self) -> usize
pub fn adamw_state_count(&self) -> usize
Number of auxiliary AdamW parameter states saved.
Trait Implementations§
Source§impl<B: Clone + AutodiffBackend> Clone for MuonAdamWRecord<B>
impl<B: Clone + AutodiffBackend> Clone for MuonAdamWRecord<B>
Source§impl<B: AutodiffBackend> Record<B> for MuonAdamWRecord<B>
impl<B: AutodiffBackend> Record<B> for MuonAdamWRecord<B>
Source§type Item<S: PrecisionSettings> = (u32, String, Vec<(u64, Vec<usize>, bool, String)>, <HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>> as Record<B>>::Item<S>, <HashMap<ParamId, AdaptorRecord<AdamW, B>> as Record<B>>::Item<S>)
type Item<S: PrecisionSettings> = (u32, String, Vec<(u64, Vec<usize>, bool, String)>, <HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>> as Record<B>>::Item<S>, <HashMap<ParamId, AdaptorRecord<AdamW, B>> as Record<B>>::Item<S>)
Type of the item that can be serialized and deserialized.
Auto Trait Implementations§
impl<B> Freeze for MuonAdamWRecord<B>where
HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>>: Freeze,
HashMap<ParamId, AdaptorRecord<AdamW, B>>: Freeze,
impl<B> RefUnwindSafe for MuonAdamWRecord<B>where
HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>>: RefUnwindSafe,
HashMap<ParamId, AdaptorRecord<AdamW, B>>: RefUnwindSafe,
impl<B> Send for MuonAdamWRecord<B>where
HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>>: Send,
HashMap<ParamId, AdaptorRecord<AdamW, B>>: Send,
impl<B> Sync for MuonAdamWRecord<B>where
HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>>: Sync,
HashMap<ParamId, AdaptorRecord<AdamW, B>>: Sync,
impl<B> Unpin for MuonAdamWRecord<B>where
HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>>: Unpin,
HashMap<ParamId, AdaptorRecord<AdamW, B>>: Unpin,
impl<B> UnsafeUnpin for MuonAdamWRecord<B>where
HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>>: UnsafeUnpin,
HashMap<ParamId, AdaptorRecord<AdamW, B>>: UnsafeUnpin,
impl<B> UnwindSafe for MuonAdamWRecord<B>where
HashMap<ParamId, AdaptorRecord<Muon<<B as AutodiffBackend>::InnerBackend>, B>>: UnwindSafe,
HashMap<ParamId, AdaptorRecord<AdamW, B>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more