pub struct KvElemsPerToken {
pub k: u64,
pub v: u64,
}Expand description
Per-token K and V element counts, type-agnostic.
K and V element counts are tracked separately (not just summed) because
callers may quantize K and V to different types (e.g. q8_0 K with f16
V to sidestep the Flash Attention requirement on quantized V), so the byte
cost of each side must be computed independently.
Fields§
§k: u64§v: u64Trait Implementations§
Source§impl Clone for KvElemsPerToken
impl Clone for KvElemsPerToken
Source§fn clone(&self) -> KvElemsPerToken
fn clone(&self) -> KvElemsPerToken
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 KvElemsPerToken
impl Debug for KvElemsPerToken
Source§impl PartialEq for KvElemsPerToken
impl PartialEq for KvElemsPerToken
Source§fn eq(&self, other: &KvElemsPerToken) -> bool
fn eq(&self, other: &KvElemsPerToken) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for KvElemsPerToken
impl Eq for KvElemsPerToken
impl StructuralPartialEq for KvElemsPerToken
Auto Trait Implementations§
impl Freeze for KvElemsPerToken
impl RefUnwindSafe for KvElemsPerToken
impl Send for KvElemsPerToken
impl Sync for KvElemsPerToken
impl Unpin for KvElemsPerToken
impl UnsafeUnpin for KvElemsPerToken
impl UnwindSafe for KvElemsPerToken
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