Skip to main content

ParamSource

Enum ParamSource 

Source
pub enum ParamSource {
    Layer(usize),
    Floor,
    FloorCoupled,
    SuppressedByTemplate,
    Unset,
}
Expand description

Which rung of a sampling ladder supplied one resolved parameter.

Layer carries an index into the ladder that was resolved, rather than a name, because the ladders differ. SamplingLayer describes the five-rung ladder resolve_with_profile_explained builds; the request pipeline builds a six-rung one, adding cli and client above the rest. Callers map the index back to whatever names their own ladder used.

Variants§

§

Layer(usize)

The layer at this index in the resolved ladder named the value.

§

Floor

The class floor, because no layer named a value at all.

§

FloorCoupled

A layer claimed temperature and this parameter is tuned against it, so no layer beneath was eligible to supply one.

Distinct from Floor in the fact that matters: here a lower layer may well have named a value and was deliberately passed over. That is what the coupling rule does, and it is the one thing a bare resolved number can never explain.

§It does not imply a value was supplied

The name predates ADR 0003, when the floor filled all seven parameters and being passed over always meant landing on a floor value. Six of those are now deferred to llama.cpp, so a coupled parameter can resolve to None: the rule fired, nothing beneath was eligible, and the floor had nothing to offer either.

The variant still reports the rule rather than degrading to Unset, because “a value was discarded here” and “nobody ever named one” are different explanations and only the first tells a reader where to look. Check the resolved value for whether anything was ultimately sent.

§

SuppressedByTemplate

A layer named a value, and a later stage suppressed it because the model’s observed template capabilities say the template never reads the field. Nothing was sent.

Only reasoning_effort can carry this today — it is the one modelled field delivered by a chat template reading a variable rather than by the sampler (ADR 0007 decision 3). The suppressed level and the rung that supplied it are in the pipeline’s own record; see request_pipeline::effort_gate::SuppressedEffort.

§

Unset

Nothing named it and the class floor carries none either, so no value is sent and llama.cpp’s own default applies. Which fields those are is whatever InferenceConfig::with_hardcoded_defaults leaves unset — deliberately not restated here, because the last restatement said “max_tokens is the only one” and stayed that way through #741 adding three floorless DRY fields.

Implementations§

Source§

impl ParamSource

Source

pub const fn is_deliberate_choice(self, auto_detected_rung: usize) -> bool

Whether a person actually chose this value.

auto_detected_rung is the index of the auto-detected per-model rung in the ladder being asked about — a recipe written at import time is a guess, not a choice, which is why it already ranks below global settings.

§Why this is a method and not a matches! at the call site

It was a matches! in request_pipeline::sampling, listing the variants that count as unchosen. That shape fails open in the worst direction: a new ParamSource variant is not in the list, so it reads as “deliberately chosen”, and the agentic temperature ceiling silently stops firing for it. No compile error, no test failure, and the symptom is a ceiling that quietly does nothing — which is exactly how #741’s floor and #744’s ceiling both shipped inert.

Here the match is exhaustive and the arms are the positive case, so a new variant breaks the build at the one place that defines what “deliberate” means, and whoever adds it has to decide.

Trait Implementations§

Source§

impl Clone for ParamSource

Source§

fn clone(&self) -> ParamSource

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ParamSource

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ParamSource

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ParamSource

Source§

fn eq(&self, other: &ParamSource) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ParamSource

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for ParamSource

Source§

impl Eq for ParamSource

Source§

impl StructuralPartialEq for ParamSource

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,