pub struct DynamicCache {}Expand description
Tracks per-layer KV cache state (sequence length, sliding-window/compileability) across generation steps.
Implementations§
Source§impl DynamicCache
impl DynamicCache
Sourcepub fn get_sequence_length(&self) -> usize
pub fn get_sequence_length(&self) -> usize
Returns the number of tokens currently cached.
Not yet implemented.
Sourcepub fn is_sliding(&self) -> Option<&[(usize, bool)]>
pub fn is_sliding(&self) -> Option<&[(usize, bool)]>
Per-layer sliding-window state: (window_size, is_sliding) for each layer, or None if
no layer uses a sliding window.
Not yet implemented.
Sourcepub fn is_compileable(&self) -> bool
pub fn is_compileable(&self) -> bool
Whether this cache’s current state is safe to pass into a compiled (AOT/JIT) kernel path.
Not yet implemented.
Trait Implementations§
Source§impl Clone for DynamicCache
impl Clone for DynamicCache
Source§fn clone(&self) -> DynamicCache
fn clone(&self) -> DynamicCache
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 DynamicCache
impl Debug for DynamicCache
Source§impl Default for DynamicCache
impl Default for DynamicCache
Source§fn default() -> DynamicCache
fn default() -> DynamicCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DynamicCache
impl RefUnwindSafe for DynamicCache
impl Send for DynamicCache
impl Sync for DynamicCache
impl Unpin for DynamicCache
impl UnsafeUnpin for DynamicCache
impl UnwindSafe for DynamicCache
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