#[repr(u8)]pub enum HybridPattern {
Uniform,
Interleave {
full_ratio: usize,
},
Bookend,
}Expand description
Hybrid attention pattern for looped inference. Controls which layers use full SDPA vs linear attention.
Variants§
Uniform
All layers use the same attention mode.
Interleave
Depth-level interleave: every Nth layer uses full SDPA. e.g., Interleave { full_ratio: 5 } = every 5th layer is full. Paper optimal: 1:4 ratio (full_ratio=5).
Bookend
Bookend: first and last layers are full, middle is linear.
Trait Implementations§
Source§impl Clone for HybridPattern
impl Clone for HybridPattern
Source§fn clone(&self) -> HybridPattern
fn clone(&self) -> HybridPattern
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 moreimpl Copy for HybridPattern
Source§impl Debug for HybridPattern
impl Debug for HybridPattern
Source§impl Default for HybridPattern
impl Default for HybridPattern
Source§fn default() -> HybridPattern
fn default() -> HybridPattern
Returns the “default value” for a type. Read more
impl Eq for HybridPattern
Source§impl PartialEq for HybridPattern
impl PartialEq for HybridPattern
impl StructuralPartialEq for HybridPattern
Auto Trait Implementations§
impl Freeze for HybridPattern
impl RefUnwindSafe for HybridPattern
impl Send for HybridPattern
impl Sync for HybridPattern
impl Unpin for HybridPattern
impl UnsafeUnpin for HybridPattern
impl UnwindSafe for HybridPattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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