pub enum CacheRamHealth {
LlamaDefault,
DisabledByUser,
DisabledInsufficientRam,
Low {
mb: u64,
},
Healthy {
mb: u64,
},
}Expand description
How healthy a resolved --cache-ram budget is, for user-facing display.
Exists so surfaces (dashboard, CLI) don’t re-derive the thresholds from
magic numbers. In particular, a 0 budget is genuinely ambiguous at the
call site — compute_auto_cache_ram_mb returns 0 when the machine
can’t afford a cache, and a user can also pass --cache-ram-mb 0 — and
those need different messages, since only one of them is a problem.
Variants§
LlamaDefault
No --cache-ram flag emitted; llama-server’s built-in default applies.
DisabledByUser
The user asked for 0. Working as intended — not a warning.
DisabledInsufficientRam
Auto-sizing found no room after weights, KV, and headroom. The machine cannot afford a prompt cache at this model and context size.
Low
Working, but at or under CACHE_RAM_LOW_WATERMARK_BYTES — expect
conversation switches to re-prefill more often than not.
Healthy
Comfortably sized.
Implementations§
Source§impl CacheRamHealth
impl CacheRamHealth
Sourcepub const fn needs_attention(&self) -> bool
pub const fn needs_attention(&self) -> bool
Whether this state is worth drawing the user’s attention to.
false for both healthy budgets and a deliberately disabled one —
warning someone about a setting they chose is noise.
Trait Implementations§
Source§impl Clone for CacheRamHealth
impl Clone for CacheRamHealth
Source§fn clone(&self) -> CacheRamHealth
fn clone(&self) -> CacheRamHealth
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 CacheRamHealth
impl Debug for CacheRamHealth
Source§impl PartialEq for CacheRamHealth
impl PartialEq for CacheRamHealth
Source§fn eq(&self, other: &CacheRamHealth) -> bool
fn eq(&self, other: &CacheRamHealth) -> bool
self and other values to be equal, and is used by ==.