Skip to main content

ModelConfigEntry

Struct ModelConfigEntry 

Source
pub struct ModelConfigEntry {
Show 19 fields pub model: String, pub mmproj: Option<String>, pub ctx_size: Option<u32>, pub gpu_id: Option<String>, pub parallel: Option<usize>, pub cache_type_k: Option<String>, pub cache_type_v: Option<String>, pub batch: Option<u32>, pub ubatch: Option<u32>, pub flash_attention: Option<FlashAttentionType>, pub model_fit: Option<ModelFitConfig>, pub hardware: Option<HardwareConfig>, pub throughput: Option<ThroughputConfig>, pub skippy: Option<SkippyConfig>, pub speculative: Option<SpeculativeConfig>, pub request_defaults: Option<RequestDefaultsConfig>, pub multimodal: Option<MultimodalConfig>, pub advanced: Option<AdvancedConfig>, pub gpu_id_from_legacy_shim: bool,
}

Fields§

§model: String§mmproj: Option<String>§ctx_size: Option<u32>§gpu_id: Option<String>§parallel: Option<usize>§cache_type_k: Option<String>§cache_type_v: Option<String>§batch: Option<u32>§ubatch: Option<u32>§flash_attention: Option<FlashAttentionType>§model_fit: Option<ModelFitConfig>§hardware: Option<HardwareConfig>§throughput: Option<ThroughputConfig>§skippy: Option<SkippyConfig>§speculative: Option<SpeculativeConfig>§request_defaults: Option<RequestDefaultsConfig>§multimodal: Option<MultimodalConfig>§advanced: Option<AdvancedConfig>§gpu_id_from_legacy_shim: bool

Implementations§

Source§

impl ModelConfigEntry

Source

pub fn derived_profile(&self) -> String

Compute a derived profile hash from the runtime-shaping fields of this entry.

The profile is derived from the fields that materially affect runtime behavior: ModelFitConfig (ctx_size, batch, ubatch, cache_type_k, cache_type_v, flash_attention), HardwareConfig (model_runtime, device, gpu_layers, tensor_split, split_mode, main_gpu, cpu_moe, n_cpu_moe, fit_target_mib, mmap, mlock), and ThroughputConfig (parallel, continuous_batching, threads, threads_batch).

Returns an 8-hex-character string (e.g. “a3f2b9c1”), or empty string if all profile-input fields are at their defaults. Derive a stable profile string from the runtime-shaping config fields.

Returns an 8-hex-char hash when any profile-input field is set, or an empty string (profile = default) when all inputs are at defaults.

Trait Implementations§

Source§

impl Clone for ModelConfigEntry

Source§

fn clone(&self) -> ModelConfigEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ModelConfigEntry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ModelConfigEntry

Source§

fn default() -> ModelConfigEntry

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ModelConfigEntry

Source§

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 Serialize for ModelConfigEntry

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.