#[repr(C)]pub struct InferencingParams {
pub max_tokens: u32,
pub repeat_penalty: f32,
pub repeat_penalty_last_n_token_count: u32,
pub temperature: f32,
pub top_k: u32,
pub top_p: f32,
}
Expand description
Inference request parameters
Fields§
§max_tokens: u32
The maximum tokens that should be inferred.
Note: the backing implementation may return less tokens.
repeat_penalty: f32
The amount the model should avoid repeating tokens.
repeat_penalty_last_n_token_count: u32
The number of tokens the model should apply the repeat penalty to.
temperature: f32
The randomness with which the next token is selected.
top_k: u32
The number of possible next tokens the model will choose from.
top_p: f32
The probability total of next tokens the model will choose from.
Trait Implementations§
Source§impl Clone for InferencingParams
impl Clone for InferencingParams
Source§fn clone(&self) -> InferencingParams
fn clone(&self) -> InferencingParams
Returns a copy of the value. Read more
1.0.0 · 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 InferencingParams
impl Debug for InferencingParams
Source§impl Default for InferencingParams
impl Default for InferencingParams
impl Copy for InferencingParams
Auto Trait Implementations§
impl Freeze for InferencingParams
impl RefUnwindSafe for InferencingParams
impl Send for InferencingParams
impl Sync for InferencingParams
impl Unpin for InferencingParams
impl UnwindSafe for InferencingParams
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)