pub struct AdapterSlot {
pub name: String,
pub adapter_config: PeftAdapterConfig,
pub layers: Vec<Option<LoraLayerWeights>>,
pub generation: u64,
}Expand description
One packed pool slot: a resident adapter’s own name/config + its per-layer
pairs (a/b DevicePtrs into that slot’s byte sub-region of the shared pool).
layers is GLOBAL-layer-indexed (len = num_hidden_layers), the same index
the install walk uses.
Fields§
§name: String§adapter_config: PeftAdapterConfig§layers: Vec<Option<LoraLayerWeights>>§generation: u64Task #25 (slot generation): monotonic counter bumped every time this
slot’s CONTENTS are replaced (disk/RDMA swap-into-slot). Folded into the
adapter identity (adapter_id_hash) so re-staging DIFFERENT weights
under the SAME adapter name yields a FRESH id — a later request then
misses the stale (previous-generation) prefix/KV instead of warm-hitting
it. Init 0; gen 0 is a strict no-op in the fold so a slot’s FIRST-load id
(and the base sentinel) stay byte-identical to the pre-#25 (#24) value. A
pure rotate (same weights re-pointed) does NOT bump.
Trait Implementations§
Source§impl Clone for AdapterSlot
impl Clone for AdapterSlot
Source§fn clone(&self) -> AdapterSlot
fn clone(&self) -> AdapterSlot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more