pub struct LlamaStateSeqFlags(/* private fields */);Expand description
Flags for state sequence operations.
These flags control what parts of the state are included when saving/restoring sequence state.
Implementations§
Source§impl LlamaStateSeqFlags
impl LlamaStateSeqFlags
Sourcepub const PARTIAL_ONLY: LlamaStateSeqFlags
pub const PARTIAL_ONLY: LlamaStateSeqFlags
Work only with partial states, such as SWA KV cache or recurrent cache (e.g. Mamba).
This flag is useful when you only want to save/restore the recurrent state without affecting the KV cache.
Sourcepub const fn empty() -> LlamaStateSeqFlags
pub const fn empty() -> LlamaStateSeqFlags
Create an empty flags set.
Sourcepub const fn contains(&self, other: LlamaStateSeqFlags) -> bool
pub const fn contains(&self, other: LlamaStateSeqFlags) -> bool
Check if a flag is set.
Trait Implementations§
Source§impl Clone for LlamaStateSeqFlags
impl Clone for LlamaStateSeqFlags
Source§fn clone(&self) -> LlamaStateSeqFlags
fn clone(&self) -> LlamaStateSeqFlags
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 moreSource§impl Debug for LlamaStateSeqFlags
impl Debug for LlamaStateSeqFlags
Source§impl Default for LlamaStateSeqFlags
impl Default for LlamaStateSeqFlags
Source§impl PartialEq for LlamaStateSeqFlags
impl PartialEq for LlamaStateSeqFlags
impl Copy for LlamaStateSeqFlags
impl Eq for LlamaStateSeqFlags
impl StructuralPartialEq for LlamaStateSeqFlags
Auto Trait Implementations§
impl Freeze for LlamaStateSeqFlags
impl RefUnwindSafe for LlamaStateSeqFlags
impl Send for LlamaStateSeqFlags
impl Sync for LlamaStateSeqFlags
impl Unpin for LlamaStateSeqFlags
impl UnsafeUnpin for LlamaStateSeqFlags
impl UnwindSafe for LlamaStateSeqFlags
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