pub struct ModelLaunchSpec {
pub id: u32,
pub name: String,
pub file_path: PathBuf,
pub tags: Vec<String>,
pub architecture: Option<String>,
pub quantization: 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,
pub model_sampling: ModelSamplingDefaults,
}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).
quantization: Option<String>Quantization label (Q4_K_M), when the catalog recorded one.
Carried purely so the launch can name what it loaded — see
crate::domain::LaunchNarration. None for models whose GGUF
metadata did not identify a quantization.
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.
model_sampling: ModelSamplingDefaultsWhat this model’s own GGUF declares about sampler defaults (see
crate::domain::ModelSamplingDefaults).
llama.cpp applies these over its own build defaults for every field no
CLI flag sets, and reports the result as /props’s
default_generation_settings. Carried to the running target so the
proxy’s baseline check can tell a model’s own recommendation from a pin
bump, rather than reporting the first as the second.
Derived from the metadata already on the catalog row, the same way
kv_elems_per_token and kv_memory_is_partial are.
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