pub struct SlotFootprint {
pub weights_bytes: u64,
pub kv_bytes: u64,
}Expand description
What one resident model is expected to occupy in VRAM.
Weights and KV are tracked separately rather than pre-summed because they come from different places and fail differently: weights are a measured file size, KV is an estimate from GGUF metadata that may be missing entirely. A caller reporting a refusal wants to say which half was the problem.
Fields§
§weights_bytes: u64Model weights on disk, summed across shards. 0 when unknown.
kv_bytes: u64KV cache at the context this launch will use.
Implementations§
Source§impl SlotFootprint
impl SlotFootprint
Sourcepub const fn new(
weights_bytes: u64,
kv_elems_per_token: Option<KvElemsPerToken>,
cache_type_k: KvCacheType,
cache_type_v: KvCacheType,
context_size: u64,
) -> Option<Self>
pub const fn new( weights_bytes: u64, kv_elems_per_token: Option<KvElemsPerToken>, cache_type_k: KvCacheType, cache_type_v: KvCacheType, context_size: u64, ) -> Option<Self>
Assemble a footprint from a model’s launch inputs.
kv_elems_per_token is None for models whose GGUF metadata does not
carry the layer/head counts (see
estimate_kv_elems_per_token).
That yields a footprint of weights alone, which understates the true
cost — so decide_secondary_slot treats an unknown KV as
disqualifying rather than free. See
SecondarySlotDecision::RefuseUnknownFootprint.
Trait Implementations§
Source§impl Clone for SlotFootprint
impl Clone for SlotFootprint
Source§fn clone(&self) -> SlotFootprint
fn clone(&self) -> SlotFootprint
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 SlotFootprint
impl Debug for SlotFootprint
Source§impl PartialEq for SlotFootprint
impl PartialEq for SlotFootprint
Source§fn eq(&self, other: &SlotFootprint) -> bool
fn eq(&self, other: &SlotFootprint) -> bool
self and other values to be equal, and is used by ==.