pub enum MultiSeqKv<'a> {
Contiguous(&'a mut [Vec<KvCache>]),
Paged {
caches: &'a mut [Vec<PagedKvCache>],
stores: &'a SharedPagedKv,
},
}Expand description
Where a batch of independent sequences keeps its KV.
forward_multi_seq batches the projections across sequences but
must attend per sequence, because each has its own length and its
own history. That per-sequence step is the ONLY place the batched
path touches a cache, which is why paging it is a parameter here
rather than a second copy of a 300-line function – the lesson the
paged decode path taught by losing five model features one at a
time to exactly that kind of copy.
Variants§
Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for MultiSeqKv<'a>
impl<'a> Freeze for MultiSeqKv<'a>
impl<'a> RefUnwindSafe for MultiSeqKv<'a>
impl<'a> Send for MultiSeqKv<'a>
impl<'a> Sync for MultiSeqKv<'a>
impl<'a> Unpin for MultiSeqKv<'a>
impl<'a> UnsafeUnpin for MultiSeqKv<'a>
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> 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