pub struct AsyncSpecConfig {
pub spec_k: usize,
pub draft_sampler: SamplerConfig,
pub target_sampler: SamplerConfig,
pub force_n1: bool,
pub max_tokens: usize,
}Expand description
Configuration for the async speculative decoder.
Fields§
§spec_k: usizeNumber of draft tokens to generate per speculation step (K).
Higher values increase potential throughput but also increase the cost of verification and rollback on divergence. A value of 4–8 is typical.
draft_sampler: SamplerConfigSampler configuration applied by the draft engine.
target_sampler: SamplerConfigSampler configuration applied by the target engine for verification and residual sampling.
force_n1: boolForce N=1 verification mode regardless of target model type.
Set this to true when the target model is SSM-based (cannot rewind).
max_tokens: usizeMaximum number of tokens to generate (prompt + output combined).
Trait Implementations§
Source§impl Clone for AsyncSpecConfig
impl Clone for AsyncSpecConfig
Source§fn clone(&self) -> AsyncSpecConfig
fn clone(&self) -> AsyncSpecConfig
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 moreSource§impl Debug for AsyncSpecConfig
impl Debug for AsyncSpecConfig
Auto Trait Implementations§
impl Freeze for AsyncSpecConfig
impl RefUnwindSafe for AsyncSpecConfig
impl Send for AsyncSpecConfig
impl Sync for AsyncSpecConfig
impl Unpin for AsyncSpecConfig
impl UnsafeUnpin for AsyncSpecConfig
impl UnwindSafe for AsyncSpecConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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