pub struct CatalogEntry {
pub spec: ModelSpec,
pub purpose: Purpose,
pub quant: String,
pub params_b: f32,
pub active_params_b: f32,
pub kv_bytes_per_token: u64,
pub context: u32,
}Expand description
A catalog model with what it needs in memory.
Fields§
§spec: ModelSpec§purpose: Purpose§quant: String§params_b: f32Total and active parameters, in billions (they differ for mixture-of-experts models).
active_params_b: f32§kv_bytes_per_token: u64KV cache bytes per token at f16 (layers x KV heads x head dim x 2 x 2).
context: u32Context the sizing assumes per slot.
Implementations§
Source§impl CatalogEntry
impl CatalogEntry
pub fn id(&self) -> &str
Sourcepub fn footprint(&self, slots: u32) -> u64
pub fn footprint(&self, slots: u32) -> u64
Weights (and the projector’s, for entries that need one) plus KV for slots concurrent
requests at the entry’s context, plus 10% for compute buffers.
Sourcepub fn projector(&self) -> Option<ModelSpec>
pub fn projector(&self) -> Option<ModelSpec>
The multimodal projector (llama.cpp --mmproj) the entry needs to take its input, pinned
like the model file: the audio encoder for VOXTRAL_MINI_3B. None for text models.
Download it with the same consent gate as the model.
Sourcepub fn transcribes(&self) -> bool
pub fn transcribes(&self) -> bool
Whether this is a speech-to-text model (Purpose::Transcribe).
Trait Implementations§
Source§impl Clone for CatalogEntry
impl Clone for CatalogEntry
Source§impl Debug for CatalogEntry
impl Debug for CatalogEntry
Source§impl<'de> Deserialize<'de> for CatalogEntry
impl<'de> Deserialize<'de> for CatalogEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CatalogEntry
impl PartialEq for CatalogEntry
Source§impl Serialize for CatalogEntry
impl Serialize for CatalogEntry
impl StructuralPartialEq for CatalogEntry
Auto Trait Implementations§
impl Forget for CatalogEntry
impl Freeze for CatalogEntry
impl Move for CatalogEntry
impl RefUnwindSafe for CatalogEntry
impl Send for CatalogEntry
impl Sync for CatalogEntry
impl Unpin for CatalogEntry
impl UnsafeUnpin for CatalogEntry
impl UnwindSafe for CatalogEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more