pub struct Eagle3SessionConfig {
pub n_seq: u32,
pub n_draft_max: i32,
pub n_min: i32,
pub p_min: f32,
}Expand description
Parameters for Eagle3Session::new_with_config.
Maps directly to upstream common_params_speculative_draft.
Fields§
§n_seq: u32Number of concurrent sequences (usually 1).
n_draft_max: i32Maximum tokens drafted per Eagle3Session::draft call (n_max upstream).
n_min: i32Minimum draft tokens to propose (n_min upstream, default 0).
p_min: f32Greedy probability floor; drafts below this are dropped (p_min upstream, default 0.0).
Implementations§
Source§impl Eagle3SessionConfig
impl Eagle3SessionConfig
Sourcepub fn new(n_seq: u32, n_draft_max: i32) -> Self
pub fn new(n_seq: u32, n_draft_max: i32) -> Self
Build a config with upstream-aligned defaults for n_min (0) and
p_min (0.0).
Sourcepub fn with_n_min(self, n_min: i32) -> Self
pub fn with_n_min(self, n_min: i32) -> Self
Set minimum draft tokens (n_min upstream).
Sourcepub fn with_p_min(self, p_min: f32) -> Self
pub fn with_p_min(self, p_min: f32) -> Self
Set draft probability floor (p_min upstream).
Draft tokens whose greedy probability falls below this value are dropped.
Trait Implementations§
Source§impl Clone for Eagle3SessionConfig
impl Clone for Eagle3SessionConfig
Source§fn clone(&self) -> Eagle3SessionConfig
fn clone(&self) -> Eagle3SessionConfig
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 moreimpl Copy for Eagle3SessionConfig
Source§impl Debug for Eagle3SessionConfig
impl Debug for Eagle3SessionConfig
Source§impl PartialEq for Eagle3SessionConfig
impl PartialEq for Eagle3SessionConfig
Source§fn eq(&self, other: &Eagle3SessionConfig) -> bool
fn eq(&self, other: &Eagle3SessionConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Eagle3SessionConfig
Auto Trait Implementations§
impl Freeze for Eagle3SessionConfig
impl RefUnwindSafe for Eagle3SessionConfig
impl Send for Eagle3SessionConfig
impl Sync for Eagle3SessionConfig
impl Unpin for Eagle3SessionConfig
impl UnsafeUnpin for Eagle3SessionConfig
impl UnwindSafe for Eagle3SessionConfig
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