pub struct WeightIdentity {
pub base_revision: String,
pub adapter_generation: u64,
}Expand description
Authoritative identity of the effective weights (base + adapter/delta) that produced a cache’s KV.
Two caches are reuse-compatible only if their KV was produced under the same effective weights. This is split from the structural descriptor so a weight change (e.g. loading/unloading an adapter) is a first-class mismatch reason distinct from a geometry or dtype change.
Fields§
§base_revision: StringAuthoritative identity of the base model weights — a content digest of
the weight shards actually resolved by the loader (today a SHA-256 over
the sorted .safetensors shard bytes; a git2db content OID when one is
associated with the loaded worktree, issue #1285). This is never a
human/path label: two snapshots sharing a basename but differing in
content diverge here. Empty when no authoritative digest could be
obtained, in which case the descriptor is treated as non-authoritative
and reuse fails closed (see KvCompatDescriptor::is_authoritatively_complete).
adapter_generation: u64Adapter/delta generation active when the KV was produced. 0 means base
weights only (no adapter). Populated at the per-request reuse boundary
from the live lora_generation counter actually applied to the request,
so a re-adapted model is detected as incompatible (issue #1260).
Implementations§
Trait Implementations§
Source§impl Clone for WeightIdentity
impl Clone for WeightIdentity
Source§fn clone(&self) -> WeightIdentity
fn clone(&self) -> WeightIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WeightIdentity
impl Debug for WeightIdentity
Source§impl Default for WeightIdentity
impl Default for WeightIdentity
Source§fn default() -> WeightIdentity
fn default() -> WeightIdentity
Source§impl Hash for WeightIdentity
impl Hash for WeightIdentity
Source§impl PartialEq for WeightIdentity
impl PartialEq for WeightIdentity
Source§fn eq(&self, other: &WeightIdentity) -> bool
fn eq(&self, other: &WeightIdentity) -> bool
self and other values to be equal, and is used by ==.impl Eq for WeightIdentity
impl StructuralPartialEq for WeightIdentity
Auto Trait Implementations§
impl Freeze for WeightIdentity
impl RefUnwindSafe for WeightIdentity
impl Send for WeightIdentity
impl Sync for WeightIdentity
impl Unpin for WeightIdentity
impl UnsafeUnpin for WeightIdentity
impl UnwindSafe for WeightIdentity
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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