pub struct AdapterSlot {
pub name: String,
pub adapter_config: PeftAdapterConfig,
pub layers: Vec<Option<LoraLayerWeights>>,
pub generation: u64,
}Expand description
2026-09-25: One pool slot: the resident adapter’s name and config, and its
pairs, which point into this slot’s region of the shared pool. layers is
indexed by global layer and has num_hidden_layers entries. An empty
name marks a placeholder that holds no adapter.
Fields§
§name: String§adapter_config: PeftAdapterConfig§layers: Vec<Option<LoraLayerWeights>>§generation: u642026-09-25: Incremented (wrapping) each time a disk or peer swap
replaces this slot’s contents, and folded into adapter_id_hash, so
new weights under the same name get a new cache identity and miss the
old prefix cache entries. It is 0 at load, where the fold is a no-op. A
rotation does not change it.
Trait Implementations§
Source§impl Clone for AdapterSlot
impl Clone for AdapterSlot
Source§fn clone(&self) -> AdapterSlot
fn clone(&self) -> AdapterSlot
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 moreAuto Trait Implementations§
impl Freeze for AdapterSlot
impl RefUnwindSafe for AdapterSlot
impl Send for AdapterSlot
impl Sync for AdapterSlot
impl Unpin for AdapterSlot
impl UnwindSafe for AdapterSlot
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