pub struct BeamConfig {
pub beam_width: usize,
pub max_steps: usize,
pub length_alpha: f64,
pub diversity: f64,
}Expand description
Beam-search configuration.
Fields§
§beam_width: usize§max_steps: usize§length_alpha: f64Exponent applied to length^alpha denominator for length normalisation.
diversity: f64Penalty subtracted from each candidate proportional to its position in the sorted beam (diversity / Diverse Beam Search).
Trait Implementations§
Source§impl Clone for BeamConfig
impl Clone for BeamConfig
Source§fn clone(&self) -> BeamConfig
fn clone(&self) -> BeamConfig
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 BeamConfig
Source§impl Debug for BeamConfig
impl Debug for BeamConfig
Auto Trait Implementations§
impl Freeze for BeamConfig
impl RefUnwindSafe for BeamConfig
impl Send for BeamConfig
impl Sync for BeamConfig
impl Unpin for BeamConfig
impl UnsafeUnpin for BeamConfig
impl UnwindSafe for BeamConfig
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