pub struct RequestedSampling {
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<usize>,
}Expand description
The sampling fields one request actually specified. None means
the request said nothing about that field, so the checkpoint’s
recommendation (and then the framework default) may speak for it.
Collapsing this to a plain SamplingParams at the wire boundary
– temperature: req.temperature.unwrap_or(0.0) – is what destroys
the distinction: a request that omitted temperature becomes
indistinguishable from one that explicitly asked for greedy, and no
recommendation can ever apply.
Fields§
§temperature: Option<f32>§top_p: Option<f32>§top_k: Option<usize>Trait Implementations§
Source§impl Clone for RequestedSampling
impl Clone for RequestedSampling
Source§fn clone(&self) -> RequestedSampling
fn clone(&self) -> RequestedSampling
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 RequestedSampling
Source§impl Debug for RequestedSampling
impl Debug for RequestedSampling
Source§impl Default for RequestedSampling
impl Default for RequestedSampling
Source§fn default() -> RequestedSampling
fn default() -> RequestedSampling
Returns the “default value” for a type. Read more
Source§impl PartialEq for RequestedSampling
impl PartialEq for RequestedSampling
impl StructuralPartialEq for RequestedSampling
Auto Trait Implementations§
impl Freeze for RequestedSampling
impl RefUnwindSafe for RequestedSampling
impl Send for RequestedSampling
impl Sync for RequestedSampling
impl Unpin for RequestedSampling
impl UnsafeUnpin for RequestedSampling
impl UnwindSafe for RequestedSampling
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