pub struct SweepSpec {
pub temperature: Vec<f32>,
pub top_p: Vec<f32>,
pub top_k: Vec<i32>,
pub min_p: Vec<f32>,
pub repeat_penalty: Vec<f32>,
pub dry_multiplier: Vec<f32>,
pub dynatemp_range: Vec<f32>,
pub dynatemp_exponent: Vec<f32>,
pub top_n_sigma: Vec<f32>,
}Expand description
Sampling-parameter values to sweep.
Each field is a list of candidate values for that dimension. The full candidate grid is the cartesian product of all non-empty dimensions; an empty list means “don’t vary this dimension” (the resolved default from the normal inference-config fallback chain is used instead).
Fields§
§temperature: Vec<f32>Candidate temperature values.
top_p: Vec<f32>Candidate top-p (nucleus sampling) values.
top_k: Vec<i32>Candidate top-k values.
min_p: Vec<f32>Candidate min-p values.
repeat_penalty: Vec<f32>Candidate repeat-penalty values.
dry_multiplier: Vec<f32>Candidate DRY multiplier values. 0.0 disables DRY, so a sweep of
0.0,0.4,0.8 measures “off” against two strengths in one run.
Only the multiplier is a dimension. dry_base, dry_allowed_length
and dry_penalty_last_n keep llama.cpp’s defaults (1.75, 2, 64):
varying all four would multiply the grid by 81 for parameters whose
shipped values are already reasonable.
dynatemp_range: Vec<f32>Candidate dynatemp half-range values. 0.0 disables dynamic
temperature, so 0.0,0.4 measures “off” against one strength — the
direct comparison of a flat temperature against an entropy-adaptive
band around the same base.
dynatemp_exponent: Vec<f32>Candidate dynatemp exponent values. Only meaningful in a grid that
also sweeps (or fixes) a non-zero dynatemp_range; llama.cpp’s
default is 1.0.
top_n_sigma: Vec<f32>Candidate top-n-sigma values. -1.0 disables the truncation, so
-1.0,1.0 measures “off” against the paper’s lower bound in one run.