pub struct ModelMetadata {
pub id: ModelId,
pub architecture: ModelArchitecture,
pub source: ModelSource,
pub context_length: u32,
pub vocab_size: u32,
pub hidden_size: u32,
pub num_layers: u32,
pub num_attention_heads: u32,
pub num_kv_heads: Option<u32>,
pub quantization: Option<QuantizationType>,
pub size_bytes: Option<u64>,
pub description: Option<String>,
}Expand description
Model metadata and capabilities.
Fields§
§id: ModelIdUnique model identifier.
architecture: ModelArchitectureModel architecture.
source: ModelSourceModel source location.
context_length: u32Maximum context length in tokens.
vocab_size: u32Vocabulary size.
Hidden dimension size.
num_layers: u32Number of layers.
num_attention_heads: u32Number of attention heads.
num_kv_heads: Option<u32>Number of key-value heads (for GQA).
quantization: Option<QuantizationType>Quantization applied to the model.
size_bytes: Option<u64>Model size in bytes.
description: Option<String>Human-readable description.
Implementations§
Source§impl ModelMetadata
impl ModelMetadata
Sourcepub fn builder(
id: impl Into<ModelId>,
architecture: ModelArchitecture,
) -> ModelMetadataBuilder
pub fn builder( id: impl Into<ModelId>, architecture: ModelArchitecture, ) -> ModelMetadataBuilder
Creates a new ModelMetadata builder.
Trait Implementations§
Source§impl Clone for ModelMetadata
impl Clone for ModelMetadata
Source§fn clone(&self) -> ModelMetadata
fn clone(&self) -> ModelMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelMetadata
impl Debug for ModelMetadata
Source§impl<'de> Deserialize<'de> for ModelMetadata
impl<'de> Deserialize<'de> for ModelMetadata
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelMetadata
impl RefUnwindSafe for ModelMetadata
impl Send for ModelMetadata
impl Sync for ModelMetadata
impl Unpin for ModelMetadata
impl UnwindSafe for ModelMetadata
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
Mutably borrows from an owned value. Read more