pub struct TrainingState {Show 14 fields
pub step: usize,
pub total_steps: usize,
pub best_loss: Option<f32>,
pub lr: f32,
pub epoch: usize,
pub batch_size: usize,
pub grad_accum_steps: usize,
pub sequence_length: usize,
pub fp16: bool,
pub train_modules: String,
pub task: String,
pub model_path: String,
pub dataset_path: String,
pub seed: u64,
}Expand description
Progress and settings of a training run (also read by ferrotensor-monitor
from training_state.json).
Fields§
§step: usizeOptimizer steps completed.
total_steps: usizePlanned optimizer steps.
best_loss: Option<f32>Lowest logged training loss so far.
lr: f32Peak learning rate.
epoch: usizeEpochs completed.
batch_size: usizeSequences per batch.
grad_accum_steps: usizeBatches per optimizer step.
sequence_length: usizeMaximum tokens per example.
fp16: boolWhether loss scaling was enabled.
train_modules: StringWhat was trained (lora, all, attn, …).
task: StringObjective (sft or pretrain).
model_path: StringModel directory.
dataset_path: StringTraining data file.
seed: u64Data-order seed of the run, so a resume replays the same order.
Implementations§
Trait Implementations§
Source§impl Clone for TrainingState
impl Clone for TrainingState
Source§impl Debug for TrainingState
impl Debug for TrainingState
Source§impl<'de> Deserialize<'de> for TrainingState
impl<'de> Deserialize<'de> for TrainingState
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 TrainingState
impl RefUnwindSafe for TrainingState
impl Send for TrainingState
impl Sync for TrainingState
impl Unpin for TrainingState
impl UnsafeUnpin for TrainingState
impl UnwindSafe for TrainingState
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
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>,
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