Skip to main content

try_load_probe_cache

Function try_load_probe_cache 

Source
pub(crate) fn try_load_probe_cache(
    cache_dir: &Path,
    model_variant: &str,
    max_seq: usize,
) -> Option<(f64, f64)>
Expand description

Attempts to load cached probe coefficients from {cache_dir}/probe-coefficients.json.

Returns Some((a, b)) when a valid, fingerprint-matching cache file exists. Returns None when the file is absent, unreadable, or the fingerprint does not match the current (server_version, model_variant, max_seq, arch).