pub enum SecondarySlotDecision {
Grant {
footprint_bytes: u64,
headroom_bytes: u64,
},
RefuseTooLarge {
footprint_bytes: u64,
ceiling_bytes: u64,
},
RefuseNoHeadroom {
footprint_bytes: u64,
free_bytes: u64,
},
RefuseUnknownFootprint,
RefuseUnknownBudget,
}Expand description
Whether a candidate may take the second resident slot, and why not when it may not.
A reason-carrying enum rather than a bool for the same reason
CacheRamHealth is one: the dashboard has
to explain an empty second slot to a user who can see they have 12 GB free,
and “no” on its own is the least useful answer available.
Variants§
Grant
The candidate fits with headroom to spare and may be co-loaded.
Fields
RefuseTooLarge
The candidate exceeds SECONDARY_MAX_BYTES. The second slot is for
auxiliary models; this one belongs in the swap path.
Fields
RefuseNoHeadroom
Small enough in principle, but there is not enough free VRAM right now.
Fields
RefuseUnknownFootprint
The candidate’s KV footprint could not be estimated, so its true cost is unknown. Refused rather than guessed: an under-estimate co-loads a model that then OOMs the primary mid-generation.
RefuseUnknownBudget
gglib cannot read this machine’s free VRAM — every non-NVIDIA, non-Apple-Silicon GPU, and every CPU-only host. Single-slot behaviour is preserved exactly.
Implementations§
Trait Implementations§
Source§impl Clone for SecondarySlotDecision
impl Clone for SecondarySlotDecision
Source§fn clone(&self) -> SecondarySlotDecision
fn clone(&self) -> SecondarySlotDecision
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 SecondarySlotDecision
impl Debug for SecondarySlotDecision
Source§impl PartialEq for SecondarySlotDecision
impl PartialEq for SecondarySlotDecision
Source§fn eq(&self, other: &SecondarySlotDecision) -> bool
fn eq(&self, other: &SecondarySlotDecision) -> bool
self and other values to be equal, and is used by ==.