pub struct ModelCard {
pub id: &'static str,
pub family: Family,
pub source: WeightSource,
pub file: &'static str,
pub tokenizer: TokenizerSpec,
pub specials: SpecialTokenLayout,
pub metadata: ModelMetadata,
pub approx_bytes_f32: u64,
pub parity: ParityStatus,
pub unsupported: Option<&'static str>,
}Expand description
Everything needed to identify, fetch, and load one model.
Fields§
§id: &'static strStable kebab-case identifier, unique across the registry.
family: FamilyArchitecture family.
source: WeightSourceWhich repo and revision the weights live in, and their on-disk format.
file: &'static strPath of the weight file within the repo.
tokenizer: TokenizerSpecWhere the tokenizer comes from.
specials: SpecialTokenLayoutHow many special tokens the tokenizer wraps a sequence in.
metadata: ModelMetadataArchitecture dimensions.
For the non-embedding families these are the nearest analogue rather
than a literal reading: d_model is the model’s hidden width and
vocab_size its output alphabet.
approx_bytes_f32: u64Rough in-memory footprint at F32, from the published parameter count.
Approximate on purpose — it exists to tier CI and to warn before a
machine starts swapping, not to be exact. Load at F16 to roughly halve
it; see LoadOptions::with_dtype.
parity: ParityStatusWhether anything checks this model’s numerics.
unsupported: Option<&'static str>Set when the model cannot currently be loaded, saying why.
Three ported models are in this state, each for a recorded reason. A row that carries this is present because the model is part of the public API, not because it works.
Implementations§
Source§impl ModelCard
impl ModelCard
Sourcepub const fn is_loadable(&self) -> bool
pub const fn is_loadable(&self) -> bool
Whether this model can actually be loaded today.
Sourcepub const fn is_embedding_model(&self) -> bool
pub const fn is_embedding_model(&self) -> bool
Sourcepub const fn family_str(&self) -> &'static str
pub const fn family_str(&self) -> &'static str
Lowercase family name, for matching against string-keyed tables.
Trait Implementations§
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> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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