pub struct ModelConfig {Show 13 fields
pub model: Option<String>,
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub presence_penalty: Option<f32>,
pub frequency_penalty: Option<f32>,
pub num_ctx: Option<u32>,
pub repeat_last_n: Option<i32>,
pub repeat_penalty: Option<f32>,
pub seed: Option<i32>,
pub stop: Option<String>,
pub num_predict: Option<i32>,
pub top_k: Option<u32>,
pub min_p: Option<f32>,
}
Fields§
§model: Option<String>
Identifier or name of the model to use.
temperature: Option<f32>
Sampling temperature (0.0
= deterministic, higher = more random).
top_p: Option<f32>
Nucleus sampling probability threshold.
presence_penalty: Option<f32>
Penalty applied to encourage novel tokens.
frequency_penalty: Option<f32>
Penalty applied to discourage repeating tokens.
num_ctx: Option<u32>
Maximum context length (in tokens).
repeat_last_n: Option<i32>
Number of tokens to look back when applying repeat penalty.
repeat_penalty: Option<f32>
Strength of repeat penalty.
seed: Option<i32>
RNG seed for reproducibility.
stop: Option<String>
Hard stop sequence that forces termination.
num_predict: Option<i32>
Maximum number of tokens to generate in a single response.
top_k: Option<u32>
Top-K cutoff for sampling (how many candidates are considered).
min_p: Option<f32>
Minimum probability threshold for token acceptance.
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
Returns a duplicate 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 ModelConfig
impl Debug for ModelConfig
Source§impl Default for ModelConfig
impl Default for ModelConfig
Source§fn default() -> ModelConfig
fn default() -> ModelConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModelConfig
impl RefUnwindSafe for ModelConfig
impl Send for ModelConfig
impl Sync for ModelConfig
impl Unpin for ModelConfig
impl UnwindSafe for ModelConfig
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