pub struct BoftConfig {
pub boft_block_size: usize,
pub boft_block_num: usize,
pub boft_n_butterfly_factor: usize,
pub boft_dropout: f64,
pub eps: f64,
pub target_modules: Vec<String>,
}Expand description
Configuration for BOFT adapters.
Fields§
§boft_block_size: usizeBlock size for butterfly factorization.
If 0, computed from boft_block_num. Must divide input features.
boft_block_num: usizeNumber of blocks for butterfly factorization.
If 0, computed from boft_block_size. Must divide input features.
boft_n_butterfly_factor: usizeNumber of butterfly factors to use (1 = no butterfly, higher = more expressive).
Must satisfy: boft_block_num must be divisible by 2^(n_butterfly_factor-1).
boft_dropout: f64Dropout probability for multiplicative dropout (0.0 = no dropout). Note: Dropout is currently not implemented in forward pass. This parameter is reserved for future implementation.
eps: f64Small constant for numerical stability.
target_modules: Vec<String>Target modules to apply BOFT to.
Trait Implementations§
Source§impl AdapterConfig for BoftConfig
impl AdapterConfig for BoftConfig
Source§impl Clone for BoftConfig
impl Clone for BoftConfig
Source§fn clone(&self) -> BoftConfig
fn clone(&self) -> BoftConfig
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 BoftConfig
impl Debug for BoftConfig
Source§impl Default for BoftConfig
impl Default for BoftConfig
Source§fn default() -> BoftConfig
fn default() -> BoftConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BoftConfig
impl<'de> Deserialize<'de> for BoftConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BoftConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BoftConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BoftConfig
impl Serialize for BoftConfig
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 BoftConfig
impl RefUnwindSafe for BoftConfig
impl Send for BoftConfig
impl Sync for BoftConfig
impl Unpin for BoftConfig
impl UnwindSafe for BoftConfig
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