pub struct ModelSamplingContext {
pub is_reasoning: bool,
pub defaults_origin: Option<DefaultsOrigin>,
}Expand description
Everything about the target model that changes how sampling resolves, independent of any specific request.
Bundled rather than passed as separate parameters because both
InferenceConfig::resolve_with_profile and
crate::request_pipeline::sampling::resolve_sampling need the same two
facts about the same model, and the list has already grown once (see
#685) — a named struct reads at call sites instead of two easily
transposed booleans.
Fields§
§is_reasoning: boolWhether the model carries gglib’s reasoning capability tag. Selects
the coupled-trio floor — see InferenceConfig::reasoning_floor.
defaults_origin: Option<DefaultsOrigin>Whether the model’s inference_defaults were user-set or
auto-detected. None when the model has no stored
inference_defaults at all, in which case it has no effect either
way. See DefaultsOrigin.
Trait Implementations§
Source§impl Clone for ModelSamplingContext
impl Clone for ModelSamplingContext
Source§fn clone(&self) -> ModelSamplingContext
fn clone(&self) -> ModelSamplingContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelSamplingContext
impl Debug for ModelSamplingContext
Source§impl Default for ModelSamplingContext
impl Default for ModelSamplingContext
Source§fn default() -> ModelSamplingContext
fn default() -> ModelSamplingContext
Source§impl PartialEq for ModelSamplingContext
impl PartialEq for ModelSamplingContext
Source§fn eq(&self, other: &ModelSamplingContext) -> bool
fn eq(&self, other: &ModelSamplingContext) -> bool
self and other values to be equal, and is used by ==.