pub struct ModelCard {
pub name: String,
pub backend: Option<Backend>,
pub footprint_gib: Option<f64>,
pub gated: Option<bool>,
pub family: Option<String>,
pub vllm: Option<VllmProfile>,
pub ollama: Option<OllamaProfile>,
pub tuning: Option<Tuning>,
pub capability: Option<Capability>,
}Expand description
A model card: everything needed to stand up one model. name is required (it
is the merge key); every other field is Option so a partial overlay overrides
only what it sets.
Fields§
§name: StringModel identity, e.g. Ornith-1.0-35B. The merge / drop-in key.
backend: Option<Backend>Which backend setup stands up.
footprint_gib: Option<f64>Approximate resident footprint (GiB) — a serving knob (like
ModelVariant.gib), not a machine id; used by the hardware-fit gate.
gated: Option<bool>Likely exceeds a typical node (e.g. the 397B) — setup warns / requires
--force.
family: Option<String>The model family this card belongs to (e.g. "qwen3"), if any — looks
up family_defaults as the base layer UNDER this card’s own [vllm]
table in resolve, so cards in the same family (different sizes of
the same tokenizer/parser lineage) don’t each duplicate
reasoning_parser/tool_call_parser/etc. None means no family layer
applies — today’s pre-family behavior, unchanged.
vllm: Option<VllmProfile>§ollama: Option<OllamaProfile>§tuning: Option<Tuning>§capability: Option<Capability>Implementations§
Source§impl ModelCard
impl ModelCard
Sourcepub fn merge(self, overlay: Self) -> Self
pub fn merge(self, overlay: Self) -> Self
Overlay self under overlay — overlay wins field-by-field, deep-merging
the nested tables. Pure. Precedence chains left-to-right:
builtin.merge(dropin).merge(one_off).merge(flags).
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Reject a structurally-invalid card loudly (never silently): empty name,
no backend, a backend whose serving block is absent, or a family naming
no known family defaults (almost always a typo — silently applying no
defaults would be a quieter, harder-to-notice version of the same
mistake deny_unknown_fields guards against elsewhere in this module).
§Errors
Returns a human-readable reason when the card cannot be stood up.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ModelCard
impl<'de> Deserialize<'de> for ModelCard
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>,
impl StructuralPartialEq for ModelCard
Auto Trait Implementations§
impl Freeze for ModelCard
impl RefUnwindSafe for ModelCard
impl Send for ModelCard
impl Sync for ModelCard
impl Unpin for ModelCard
impl UnsafeUnpin for ModelCard
impl UnwindSafe for ModelCard
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more