pub struct QLoraTrainingConfig {
pub adapter_config: AdapterTrainingConfig,
pub num_epochs: usize,
pub batch_size: usize,
pub log_every: usize,
pub save_every: Option<usize>,
pub warmup_steps: usize,
pub use_paged_optimizer: bool,
pub page_size: usize,
pub max_optimizer_memory: usize,
}Expand description
Configuration for QLoRA training.
Fields§
§adapter_config: AdapterTrainingConfigAdapter training configuration (from peft-rs).
num_epochs: usizeNumber of training epochs.
batch_size: usizeBatch size for training.
log_every: usizeLogging frequency (steps).
save_every: Option<usize>Checkpoint save frequency (steps, None = no checkpoints).
warmup_steps: usizeWarmup steps for learning rate.
use_paged_optimizer: boolUse paged optimizer (CPU offload for optimizer states).
page_size: usizePage size for paged optimizer (bytes).
max_optimizer_memory: usizeMaximum memory for optimizer states on GPU (bytes, 0 = unlimited).
Trait Implementations§
Source§impl Clone for QLoraTrainingConfig
impl Clone for QLoraTrainingConfig
Source§fn clone(&self) -> QLoraTrainingConfig
fn clone(&self) -> QLoraTrainingConfig
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 QLoraTrainingConfig
impl Debug for QLoraTrainingConfig
Source§impl Default for QLoraTrainingConfig
impl Default for QLoraTrainingConfig
Source§fn default() -> QLoraTrainingConfig
fn default() -> QLoraTrainingConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for QLoraTrainingConfig
impl RefUnwindSafe for QLoraTrainingConfig
impl Send for QLoraTrainingConfig
impl Sync for QLoraTrainingConfig
impl Unpin for QLoraTrainingConfig
impl UnwindSafe for QLoraTrainingConfig
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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