pub struct TopP { /* private fields */ }
Expand description
Use nucleus sampling.
In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by top_p. You should either alter temperature or top_p, but not both.
Recommended for advanced use cases only. You usually only need to use temperature.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TopP
impl<'de> Deserialize<'de> for TopP
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialOrd for TopP
impl PartialOrd for TopP
impl Copy for TopP
impl StructuralPartialEq for TopP
Auto Trait Implementations§
impl Freeze for TopP
impl RefUnwindSafe for TopP
impl Send for TopP
impl Sync for TopP
impl Unpin for TopP
impl UnwindSafe for TopP
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