pub struct InferenceParameters {
pub temperature: Option<u32>,
pub top_p: Option<u32>,
pub top_k: Option<u32>,
pub max_tokens: Option<u32>,
pub stop_sequences: Vec<String>,
pub custom: HashMap<String, String>,
}Expand description
Parameters for model inference
Fields§
§temperature: Option<u32>Temperature for sampling
top_p: Option<u32>Top-p sampling
top_k: Option<u32>Top-k sampling
max_tokens: Option<u32>Maximum tokens to generate
stop_sequences: Vec<String>Stop sequences
custom: HashMap<String, String>Additional custom parameters
Trait Implementations§
Source§impl Clone for InferenceParameters
impl Clone for InferenceParameters
Source§fn clone(&self) -> InferenceParameters
fn clone(&self) -> InferenceParameters
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 moreSource§impl Debug for InferenceParameters
impl Debug for InferenceParameters
Source§impl Default for InferenceParameters
impl Default for InferenceParameters
Source§impl<'de> Deserialize<'de> for InferenceParameters
impl<'de> Deserialize<'de> for InferenceParameters
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
impl Eq for InferenceParameters
Source§impl PartialEq for InferenceParameters
impl PartialEq for InferenceParameters
Source§fn eq(&self, other: &InferenceParameters) -> bool
fn eq(&self, other: &InferenceParameters) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InferenceParameters
impl Serialize for InferenceParameters
impl StructuralPartialEq for InferenceParameters
Auto Trait Implementations§
impl Freeze for InferenceParameters
impl RefUnwindSafe for InferenceParameters
impl Send for InferenceParameters
impl Sync for InferenceParameters
impl Unpin for InferenceParameters
impl UnsafeUnpin for InferenceParameters
impl UnwindSafe for InferenceParameters
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