pub struct BatchEntry {
pub seq_id: u64,
pub kind: BatchKind,
pub input_tokens: Vec<u32>,
pub cached_len: u32,
}Expand description
One slot in a continuous batch — either a decode step (single new token from a sequence with prior cache) or a prefill chunk (multiple new tokens for a fresh sequence).
Fields§
§seq_id: u64§kind: BatchKind§input_tokens: Vec<u32>Tokens to feed in this forward pass.
cached_len: u32Pre-existing KV-cache length (number of cached tokens before this batch).
Trait Implementations§
Source§impl Clone for BatchEntry
impl Clone for BatchEntry
Source§fn clone(&self) -> BatchEntry
fn clone(&self) -> BatchEntry
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 moreAuto Trait Implementations§
impl Freeze for BatchEntry
impl RefUnwindSafe for BatchEntry
impl Send for BatchEntry
impl Sync for BatchEntry
impl Unpin for BatchEntry
impl UnsafeUnpin for BatchEntry
impl UnwindSafe for BatchEntry
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