pub struct AdaLoraConfig {
pub target_r: usize,
pub init_r: usize,
pub alpha: usize,
pub dropout: f64,
pub target_modules: Vec<String>,
pub tinit: usize,
pub tfinal: usize,
pub delta_t: usize,
pub beta1: f64,
pub beta2: f64,
pub orth_reg_weight: f64,
pub total_step: usize,
}Expand description
Configuration for AdaLoRA adapters.
Fields§
§target_r: usizeTarget average rank after pruning.
init_r: usizeInitial rank for each incremental matrix (before pruning).
alpha: usizeScaling factor (typically alpha / r).
dropout: f64Dropout probability applied to outputs.
target_modules: Vec<String>Target modules to apply AdaLoRA to.
tinit: usizeSteps of initial warmup (no rank reduction).
tfinal: usizeSteps of final fine-tuning (no rank reduction).
delta_t: usizeTime interval between budget allocations.
beta1: f64Hyperparameter of EMA for sensitivity smoothing.
beta2: f64Hyperparameter of EMA for uncertainty quantification.
orth_reg_weight: f64Coefficient of orthogonal regularization.
total_step: usizeTotal training steps (required for AdaLoRA).
Trait Implementations§
Source§impl AdapterConfig for AdaLoraConfig
impl AdapterConfig for AdaLoraConfig
Source§impl Clone for AdaLoraConfig
impl Clone for AdaLoraConfig
Source§fn clone(&self) -> AdaLoraConfig
fn clone(&self) -> AdaLoraConfig
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 AdaLoraConfig
impl Debug for AdaLoraConfig
Source§impl Default for AdaLoraConfig
impl Default for AdaLoraConfig
Source§fn default() -> AdaLoraConfig
fn default() -> AdaLoraConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AdaLoraConfig
impl<'de> Deserialize<'de> for AdaLoraConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdaLoraConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdaLoraConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AdaLoraConfig
impl Serialize for AdaLoraConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AdaLoraConfig
impl RefUnwindSafe for AdaLoraConfig
impl Send for AdaLoraConfig
impl Sync for AdaLoraConfig
impl Unpin for AdaLoraConfig
impl UnwindSafe for AdaLoraConfig
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