pub struct ModelStateIdentity { /* private fields */ }Expand description
Architecture and placement identity used to derive persistence identity.
Implementations§
Source§impl ModelStateIdentity
impl ModelStateIdentity
Sourcepub fn new(
model_family: impl Into<String>,
effective_model_type: impl Into<String>,
architecture_fingerprint: impl Into<String>,
layer_count: usize,
global_layer_start: usize,
sink_tokens: usize,
topology: PromptCacheTopology,
) -> Result<Self, PromptCacheError>
pub fn new( model_family: impl Into<String>, effective_model_type: impl Into<String>, architecture_fingerprint: impl Into<String>, layer_count: usize, global_layer_start: usize, sink_tokens: usize, topology: PromptCacheTopology, ) -> Result<Self, PromptCacheError>
Creates a validated architecture and placement identity.
Sourcepub const fn layer_count(&self) -> usize
pub const fn layer_count(&self) -> usize
Total architecture layer count.
Sourcepub const fn global_layer_start(&self) -> usize
pub const fn global_layer_start(&self) -> usize
Inclusive first global layer owned by this runtime instance.
Sourcepub fn prompt_cache_identity(
&self,
layout: &StateLayout,
) -> Result<PromptCacheModelIdentity, PromptCacheError>
pub fn prompt_cache_identity( &self, layout: &StateLayout, ) -> Result<PromptCacheModelIdentity, PromptCacheError>
Combines architecture identity, placement, and exact state geometry.
Trait Implementations§
Source§impl Clone for ModelStateIdentity
impl Clone for ModelStateIdentity
Source§fn clone(&self) -> ModelStateIdentity
fn clone(&self) -> ModelStateIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ModelStateIdentity
impl Debug for ModelStateIdentity
impl Eq for ModelStateIdentity
Source§impl PartialEq for ModelStateIdentity
impl PartialEq for ModelStateIdentity
impl StructuralPartialEq for ModelStateIdentity
Auto Trait Implementations§
impl Freeze for ModelStateIdentity
impl RefUnwindSafe for ModelStateIdentity
impl Send for ModelStateIdentity
impl Sync for ModelStateIdentity
impl Unpin for ModelStateIdentity
impl UnsafeUnpin for ModelStateIdentity
impl UnwindSafe for ModelStateIdentity
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