Skip to main content

ModelFamily

Trait ModelFamily 

Source
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§

Source

fn family_name() -> &'static str
where Self: Sized,

Get the family name (e.g., “LLaMA”, “BERT”, “GPT”)

Source

fn available_sizes() -> Vec<&'static str>
where Self: Sized,

Get available model sizes

Source

fn available_variants() -> Vec<&'static str>
where Self: Sized,

Get available variants (base, instruct, chat, etc.)

Source

fn create_config( size: &str, variant: Option<&str>, ) -> Result<Box<dyn DynConfig>>
where Self: Sized,

Create configuration for a specific size and variant

Source

fn use_cases() -> Vec<&'static str>
where Self: Sized,

Get recommended use cases for this family

Source

fn metadata() -> ModelFamilyMetadata
where Self: Sized,

Get model family metadata

Implementors§