pub enum ChainStep {
Penalties,
Dry,
TopNSigma,
TopK,
TypP,
TopP,
MinP,
Xtc,
Temperature,
}Expand description
A step the ferrox chain can actually run.
SamplerOrder holds these rather than SamplerNames so that an
unimplemented sampler is unrepresentable once the order exists: the
applier’s match is total over what it can be handed, with no
unreachable! standing in for a check that happened somewhere else.
Variants§
Penalties
The repetition / presence / frequency penalties.
Dry
The DRY sequence-repetition penalty; see crate::dry.
TopNSigma
TopK
TypP
Locally typical sampling, llama.cpp’s typ_p.
TopP
MinP
Xtc
“Exclude top choices”, llama.cpp’s xtc.
Temperature
Implementations§
Source§impl ChainStep
impl ChainStep
Sourcepub const fn name(self) -> SamplerName
pub const fn name(self) -> SamplerName
The name this step is spelled with. Exhaustive, so a step added without a name does not compile.
Sourcepub fn all() -> Vec<ChainStep>
pub fn all() -> Vec<ChainStep>
Every step this engine can run, DERIVED from the name table rather than restated beside it.
A hand-written list here would be a second structure that had to
agree with SamplerName::implemented, which is the defect
shape this whole module is built to avoid. Derived, “is a step”
and “has a name that maps to it” are the same statement, and
tests::every_step_the_name_table_yields_names_itself_back
closes the loop in the other direction.
Trait Implementations§
impl Copy for ChainStep
impl Eq for ChainStep
impl StructuralPartialEq for ChainStep
Auto Trait Implementations§
impl Freeze for ChainStep
impl RefUnwindSafe for ChainStep
impl Send for ChainStep
impl Sync for ChainStep
impl Unpin for ChainStep
impl UnsafeUnpin for ChainStep
impl UnwindSafe for ChainStep
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
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> ⓘ
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> ⓘ
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