pub struct DefaultLLMParams {
pub temperature: f64,
pub max_tokens: u32,
pub top_p: f64,
pub top_k: u32,
pub min_p: f64,
pub presence_penalty: f64,
}Expand description
Default parameters for LLM generation.
These values are used when a request doesn’t specify its own values. All parameters have sensible defaults that work well for most use cases.
§Defaults
| Parameter | Default | Description |
|---|---|---|
temperature | 0.7 | Balanced creativity/consistency |
max_tokens | 1000 | Reasonable response length |
top_p | 0.9 | Standard nucleus sampling |
top_k | 40 | Vocabulary restriction |
min_p | 0.05 | Minimum probability filter |
presence_penalty | 0.0 | No repetition penalty |
§Example
use multi_llm::DefaultLLMParams;
// Use defaults
let params = DefaultLLMParams::default();
// Or customize
let params = DefaultLLMParams {
temperature: 0.2, // More deterministic
max_tokens: 4096, // Longer responses
..Default::default()
};Fields§
§temperature: f64Temperature for response randomness (0.0 = deterministic, 2.0 = very random).
max_tokens: u32Maximum tokens to generate per response.
top_p: f64Top-p (nucleus) sampling threshold.
top_k: u32Top-k sampling limit.
min_p: f64Minimum probability filter.
presence_penalty: f64Presence penalty to reduce repetition.
Trait Implementations§
Source§impl Clone for DefaultLLMParams
impl Clone for DefaultLLMParams
Source§fn clone(&self) -> DefaultLLMParams
fn clone(&self) -> DefaultLLMParams
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 DefaultLLMParams
impl Debug for DefaultLLMParams
Source§impl Default for DefaultLLMParams
impl Default for DefaultLLMParams
Source§impl<'de> Deserialize<'de> for DefaultLLMParams
impl<'de> Deserialize<'de> for DefaultLLMParams
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
Auto Trait Implementations§
impl Freeze for DefaultLLMParams
impl RefUnwindSafe for DefaultLLMParams
impl Send for DefaultLLMParams
impl Sync for DefaultLLMParams
impl Unpin for DefaultLLMParams
impl UnwindSafe for DefaultLLMParams
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