pub struct AdapterConfig {
pub peft_type: Option<String>,
pub base_model_name_or_path: Option<String>,
pub r: Option<u32>,
pub lora_alpha: Option<f64>,
pub target_modules: Vec<String>,
pub task_type: Option<String>,
}Expand description
PEFT adapter configuration parsed from adapter_config.json.
Contains the key fields that identify an adapter: the PEFT type,
base model, LoRA rank and scaling parameters, and target modules.
All fields are optional because adapter configs vary across PEFT methods.
Fields§
§peft_type: Option<String>PEFT method type (e.g., "LORA", "ADALORA", "IA3").
base_model_name_or_path: Option<String>The base model this adapter was trained on.
r: Option<u32>LoRA rank (the r parameter). Only meaningful for LoRA-family methods.
lora_alpha: Option<f64>LoRA alpha scaling factor. Only meaningful for LoRA-family methods.
target_modules: Vec<String>List of model modules targeted by the adapter.
task_type: Option<String>Task type the adapter was trained for (e.g., "CAUSAL_LM").
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
Auto Trait Implementations§
impl Freeze for AdapterConfig
impl RefUnwindSafe for AdapterConfig
impl Send for AdapterConfig
impl Sync for AdapterConfig
impl Unpin for AdapterConfig
impl UnsafeUnpin 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