pub trait ModelFamily: Send + Sync {
// Required methods
fn family_name() -> &'static str
where Self: Sized;
fn available_sizes() -> Vec<&'static str>
where Self: Sized;
fn available_variants() -> Vec<&'static str>
where Self: Sized;
fn create_config(
size: &str,
variant: Option<&str>,
) -> Result<Box<dyn DynConfig>>
where Self: Sized;
fn use_cases() -> Vec<&'static str>
where Self: Sized;
fn metadata() -> ModelFamilyMetadata
where Self: Sized;
}Expand description
Model family trait for grouping related models
Required Methods§
Sourcefn family_name() -> &'static strwhere
Self: Sized,
fn family_name() -> &'static strwhere
Self: Sized,
Get the family name (e.g., “LLaMA”, “BERT”, “GPT”)
Sourcefn available_sizes() -> Vec<&'static str>where
Self: Sized,
fn available_sizes() -> Vec<&'static str>where
Self: Sized,
Get available model sizes
Sourcefn available_variants() -> Vec<&'static str>where
Self: Sized,
fn available_variants() -> Vec<&'static str>where
Self: Sized,
Get available variants (base, instruct, chat, etc.)
Sourcefn create_config(
size: &str,
variant: Option<&str>,
) -> Result<Box<dyn DynConfig>>where
Self: Sized,
fn create_config(
size: &str,
variant: Option<&str>,
) -> Result<Box<dyn DynConfig>>where
Self: Sized,
Create configuration for a specific size and variant
Sourcefn use_cases() -> Vec<&'static str>where
Self: Sized,
fn use_cases() -> Vec<&'static str>where
Self: Sized,
Get recommended use cases for this family
Sourcefn metadata() -> ModelFamilyMetadatawhere
Self: Sized,
fn metadata() -> ModelFamilyMetadatawhere
Self: Sized,
Get model family metadata