pub enum SamplerName {
Penalties,
Dry,
TopNSigma,
TopK,
TypP,
TopP,
MinP,
Xtc,
Temperature,
Mirostat,
Infill,
}Expand description
Every sampler name llama.cpp’s --samplers accepts.
Membership here says the name is REAL, not that ferrox
implements it; SamplerName::implemented decides that.
Variants§
Implementations§
Source§impl SamplerName
impl SamplerName
Sourcepub const ALL: &'static [SamplerName]
pub const ALL: &'static [SamplerName]
Every name, in llama.cpp’s own default chain order.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
llama.cpp’s canonical spelling, which is also what
SamplerOrder prints.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
One name, canonical spelling or llama.cpp alias.
name is expected already trimmed and lowercased; see
SamplerOrder::from_names.
Source§impl SamplerName
impl SamplerName
Sourcepub const fn implemented(self) -> Result<ChainStep, &'static str>
pub const fn implemented(self) -> Result<ChainStep, &'static str>
The step ferrox runs for this name, or the reason it has none.
EXHAUSTIVE ON PURPOSE, with no ..: a name added to the table
above stops this crate compiling here until someone states
whether ferrox implements it. The alternative – a _ => Err(..)
arm – would let a sampler ferrox does have be added to the
table and silently refused, which is the same class of silence
this module exists to close.
Trait Implementations§
Source§impl Clone for SamplerName
impl Clone for SamplerName
Source§fn clone(&self) -> SamplerName
fn clone(&self) -> SamplerName
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SamplerName
Source§impl Debug for SamplerName
impl Debug for SamplerName
impl Eq for SamplerName
Source§impl Hash for SamplerName
impl Hash for SamplerName
Source§impl PartialEq for SamplerName
impl PartialEq for SamplerName
impl StructuralPartialEq for SamplerName
Auto Trait Implementations§
impl Freeze for SamplerName
impl RefUnwindSafe for SamplerName
impl Send for SamplerName
impl Sync for SamplerName
impl Unpin for SamplerName
impl UnsafeUnpin for SamplerName
impl UnwindSafe for SamplerName
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