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
impl ParamSource
Sourcepub const fn is_deliberate_choice(self, auto_detected_rung: usize) -> bool
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
impl Clone for ParamSource
Source§fn clone(&self) -> ParamSource
fn clone(&self) -> ParamSource
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 ParamSource
impl Debug for ParamSource
Source§impl<'de> Deserialize<'de> for ParamSource
impl<'de> Deserialize<'de> for ParamSource
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>,
Source§impl PartialEq for ParamSource
impl PartialEq for ParamSource
Source§fn eq(&self, other: &ParamSource) -> bool
fn eq(&self, other: &ParamSource) -> bool
self and other values to be equal, and is used by ==.