pub struct SpeculativeDecodeOutput {
pub accepted_tokens: Vec<TokenId>,
pub next_logits: TensorRef,
pub kv_cache: Arc<dyn KvCacheHandle>,
pub acceptance_count: usize,
}Expand description
Output from speculative decoding
Fields§
§accepted_tokens: Vec<TokenId>Accepted tokens (subset of draft tokens)
next_logits: TensorRefLogits for the next token after last accepted
kv_cache: Arc<dyn KvCacheHandle>Updated KV cache
acceptance_count: usizeNumber of draft tokens accepted
Trait Implementations§
Source§impl Clone for SpeculativeDecodeOutput
impl Clone for SpeculativeDecodeOutput
Source§fn clone(&self) -> SpeculativeDecodeOutput
fn clone(&self) -> SpeculativeDecodeOutput
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 SpeculativeDecodeOutput
impl !RefUnwindSafe for SpeculativeDecodeOutput
impl Send for SpeculativeDecodeOutput
impl Sync for SpeculativeDecodeOutput
impl Unpin for SpeculativeDecodeOutput
impl UnsafeUnpin for SpeculativeDecodeOutput
impl !UnwindSafe for SpeculativeDecodeOutput
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