pub struct TrainingConfig {
pub learning_rate: f64,
pub batch_size: usize,
pub gradient_accumulation_steps: usize,
pub num_epochs: usize,
pub warmup_ratio: f32,
pub weight_decay: f32,
pub max_grad_norm: f32,
pub lr_scheduler_type: String,
pub save_steps: usize,
pub eval_steps: usize,
pub logging_steps: usize,
}Expand description
Training hyperparameters
Fields§
§learning_rate: f64Learning rate (benchmark optimal: 0.002)
batch_size: usizeBatch size (benchmark optimal: 32)
gradient_accumulation_steps: usizeGradient accumulation steps
num_epochs: usizeNumber of epochs
warmup_ratio: f32Warmup ratio
weight_decay: f32Weight decay
max_grad_norm: f32Max gradient norm
lr_scheduler_type: StringLR scheduler type
save_steps: usizeSave steps
eval_steps: usizeEvaluation steps
logging_steps: usizeLogging steps
Trait Implementations§
Source§impl Clone for TrainingConfig
impl Clone for TrainingConfig
Source§fn clone(&self) -> TrainingConfig
fn clone(&self) -> TrainingConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 TrainingConfig
impl Debug for TrainingConfig
Source§impl Default for TrainingConfig
impl Default for TrainingConfig
Source§impl<'de> Deserialize<'de> for TrainingConfig
impl<'de> Deserialize<'de> for TrainingConfig
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
Auto Trait Implementations§
impl Freeze for TrainingConfig
impl RefUnwindSafe for TrainingConfig
impl Send for TrainingConfig
impl Sync for TrainingConfig
impl Unpin for TrainingConfig
impl UnwindSafe for TrainingConfig
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