pub struct GenerateConfig {Show 15 fields
pub temperature: f32,
pub block_length: usize,
pub steps: usize,
pub gen_length: usize,
pub top_p: Option<f32>,
pub top_k: Option<usize>,
pub eos_early_stop: bool,
pub minimal_topk: usize,
pub threshold: f32,
pub eos_id: u32,
pub mask_id: u32,
pub do_sample: bool,
pub predictive_offload_enabled: bool,
pub jump_steps: usize,
pub collect_stats: bool,
}Expand description
Generation options matching PyTorch LLaDA2MoeModelLM.generate.
Fields§
§temperature: f32§block_length: usize§steps: usize§gen_length: usize§top_p: Option<f32>§top_k: Option<usize>§eos_early_stop: bool§minimal_topk: usize§threshold: f32Confidence threshold for unmasking (eval_dinfer.py default 0.9).
eos_id: u32§mask_id: u32§do_sample: bool§predictive_offload_enabled: bool§jump_steps: usize§collect_stats: boolImplementations§
Source§impl GenerateConfig
impl GenerateConfig
pub fn from_model(cfg: &LLaDA2MoeConfig) -> GenerateConfig
Trait Implementations§
Source§impl Clone for GenerateConfig
impl Clone for GenerateConfig
Source§fn clone(&self) -> GenerateConfig
fn clone(&self) -> GenerateConfig
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 GenerateConfig
impl RefUnwindSafe for GenerateConfig
impl Send for GenerateConfig
impl Sync for GenerateConfig
impl Unpin for GenerateConfig
impl UnsafeUnpin for GenerateConfig
impl UnwindSafe for GenerateConfig
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