pub struct AdapterConfig {Show 15 fields
pub peft_type: String,
pub auto_mapping: Option<Value>,
pub base_model_name_or_path: String,
pub revision: Option<String>,
pub task_type: String,
pub inference_mode: bool,
pub r: usize,
pub lora_alpha: f32,
pub lora_dropout: f32,
pub fan_in_fan_out: bool,
pub bias: String,
pub target_modules: Vec<String>,
pub modules_to_save: Option<Vec<String>>,
pub layers_to_transform: Option<Vec<usize>>,
pub layers_pattern: Option<String>,
}Expand description
PEFT-compatible adapter configuration
Fields§
§peft_type: String§auto_mapping: Option<Value>§base_model_name_or_path: String§revision: Option<String>§task_type: String§inference_mode: bool§r: usize§lora_alpha: f32§lora_dropout: f32§fan_in_fan_out: bool§bias: String§target_modules: Vec<String>§modules_to_save: Option<Vec<String>>§layers_to_transform: Option<Vec<usize>>§layers_pattern: Option<String>Trait Implementations§
Source§impl Clone for AdapterConfig
impl Clone for AdapterConfig
Source§fn clone(&self) -> AdapterConfig
fn clone(&self) -> AdapterConfig
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 AdapterConfig
impl Debug for AdapterConfig
Source§impl<'de> Deserialize<'de> for AdapterConfig
impl<'de> Deserialize<'de> for AdapterConfig
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 AdapterConfig
impl RefUnwindSafe for AdapterConfig
impl Send for AdapterConfig
impl Sync for AdapterConfig
impl Unpin for AdapterConfig
impl UnwindSafe for AdapterConfig
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