pub struct ModelLaunchSpec {
pub id: u32,
pub name: String,
pub file_path: PathBuf,
pub tags: Vec<String>,
pub architecture: Option<String>,
pub context_length: Option<u64>,
pub server_defaults: Option<ServerConfig>,
pub file_size_bytes: u64,
pub kv_elems_per_token: Option<KvElemsPerToken>,
pub kv_memory_is_partial: bool,
}Expand description
Launch specification for running a model.
Contains all information needed to actually launch a model,
including the file path. Separate from ModelSummary to avoid
leaking filesystem details in catalog operations.
Fields§
§id: u32Database ID of the model.
name: StringModel name.
file_path: PathBufAbsolute path to the GGUF file.
Tags/labels associated with the model.
architecture: Option<String>Model architecture (for runtime configuration).
context_length: Option<u64>Maximum context length the model supports.
server_defaults: Option<ServerConfig>Per-model server defaults (e.g., context_length for launch).
file_size_bytes: u64Total on-disk size of the model weights in bytes, summed across all shards for multi-part GGUFs.
Used to budget host memory at launch (see
crate::server_config::compute_auto_cache_ram_mb). 0 when the
size could not be determined — callers must treat that as “unknown”
rather than “free”.
kv_elems_per_token: Option<KvElemsPerToken>Estimated K/V element counts consumed per token of context, derived
from the model’s GGUF metadata (see
crate::domain::estimate_kv_elems_per_token). Type-agnostic —
callers convert to bytes via crate::domain::kv_bytes_per_token
once the launch’s resolved K/V cache types are known.
None when the metadata doesn’t carry the layer/head counts needed;
callers substitute a conservative allowance.
kv_memory_is_partial: boolTrue when the model’s KV memory retains only part of the token history
— sliding-window, hybrid, or recurrent attention (see
crate::domain::kv_memory_is_partial).
Such models cannot be resumed from llama-server’s disk slot files: the save/restore path does not carry the context checkpoints they need, so a “successful” restore still forces a full prompt re-prefill. Callers disable the disk slot layer for these models and rely on the in-RAM prompt cache, which does preserve checkpoints.
Trait Implementations§
Source§impl Clone for ModelLaunchSpec
impl Clone for ModelLaunchSpec
Source§fn clone(&self) -> ModelLaunchSpec
fn clone(&self) -> ModelLaunchSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more