pub struct ModelTrainingConfig {
pub steps: usize,
pub batch_size: usize,
pub learning_rate: f64,
pub weight_decay: f64,
pub grad_clip_norm: Option<f64>,
pub pad_token_id: u32,
pub checkpoint_dir: Option<String>,
pub checkpoint_interval: usize,
}Expand description
Training options for token-sequence training.
Fields§
§steps: usize§batch_size: usize§learning_rate: f64§weight_decay: f64§grad_clip_norm: Option<f64>§pad_token_id: u32§checkpoint_dir: Option<String>Directory to save checkpoints into. When None, no checkpoints are
saved during training.
checkpoint_interval: usizeSave a checkpoint every N steps. Only used when checkpoint_dir is
Some. A value of 0 disables periodic snapshots (only best.mpk
is kept).
Trait Implementations§
Source§impl Clone for ModelTrainingConfig
impl Clone for ModelTrainingConfig
Source§fn clone(&self) -> ModelTrainingConfig
fn clone(&self) -> ModelTrainingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelTrainingConfig
impl Debug for ModelTrainingConfig
Auto Trait Implementations§
impl Freeze for ModelTrainingConfig
impl RefUnwindSafe for ModelTrainingConfig
impl Send for ModelTrainingConfig
impl Sync for ModelTrainingConfig
impl Unpin for ModelTrainingConfig
impl UnsafeUnpin for ModelTrainingConfig
impl UnwindSafe for ModelTrainingConfig
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