pub struct SlidingWindowStats {
pub config: SlidingWindowConfig,
pub complexity_reduction: f64,
pub memory_reduction: f64,
}Expand description
Statistics for Sliding Window Attention
Fields§
§config: SlidingWindowConfigConfiguration
complexity_reduction: f64Complexity reduction for given sequence length
memory_reduction: f64Memory reduction for given sequence length
Implementations§
Source§impl SlidingWindowStats
impl SlidingWindowStats
Sourcepub fn from_config(config: &SlidingWindowConfig, seq_len: usize) -> Self
pub fn from_config(config: &SlidingWindowConfig, seq_len: usize) -> Self
Create stats from configuration and sequence length
Trait Implementations§
Source§impl Clone for SlidingWindowStats
impl Clone for SlidingWindowStats
Source§fn clone(&self) -> SlidingWindowStats
fn clone(&self) -> SlidingWindowStats
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 moreAuto Trait Implementations§
impl Freeze for SlidingWindowStats
impl RefUnwindSafe for SlidingWindowStats
impl Send for SlidingWindowStats
impl Sync for SlidingWindowStats
impl Unpin for SlidingWindowStats
impl UnwindSafe for SlidingWindowStats
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