pub struct RetrainConfig {
pub period: usize,
pub len: usize,
pub epochs: usize,
pub early_epochs: usize,
pub early_until: usize,
pub lr_schedule: PiecewiseLrSchedule,
pub update_len: usize,
pub batch_size: usize,
}Expand description
Periodic prefix retraining (replay) hyperparameters.
Fields§
§period: usizeRetrain every period symbols (checked at block boundaries; 0 disables).
len: usizeMaximum trailing prefix tokens to replay.
epochs: usizeNumber of replay epochs per retrain invocation.
early_epochs: usizeOptional override epoch count when file_pos <= early_until (0 disables).
early_until: usizeSymbol prefix limit for early_epochs (0 disables).
lr_schedule: PiecewiseLrSchedulePiecewise learning-rate schedule across cumulative replay optimizer steps.
update_len: usizeNew retraining targets per optimizer step (0 uses ctx_len).
batch_size: usizeIndependent stream count during replay (0 uses online batch_size).
Implementations§
Trait Implementations§
Source§impl Clone for RetrainConfig
impl Clone for RetrainConfig
Source§impl Debug for RetrainConfig
impl Debug for RetrainConfig
Source§impl<'de> Deserialize<'de> for RetrainConfig
impl<'de> Deserialize<'de> for RetrainConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for RetrainConfig
impl PartialEq for RetrainConfig
Source§impl Serialize for RetrainConfig
impl Serialize for RetrainConfig
impl StructuralPartialEq for RetrainConfig
Auto Trait Implementations§
impl Freeze for RetrainConfig
impl RefUnwindSafe for RetrainConfig
impl Send for RetrainConfig
impl Sync for RetrainConfig
impl Unpin for RetrainConfig
impl UnsafeUnpin for RetrainConfig
impl UnwindSafe for RetrainConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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