pub struct ModelMetadata {
pub architecture: ModelArchitecture,
pub hidden_size: usize,
pub intermediate_size: usize,
pub num_layers: usize,
pub num_heads: usize,
pub num_key_value_heads: Option<usize>,
pub vocab_size: usize,
pub max_position_embeddings: usize,
pub quantization: Option<QuantizationType>,
pub rope_theta: Option<f32>,
pub rope_scaling: Option<RopeScaling>,
}Expand description
Model metadata extracted from GGUF or other formats
Fields§
§architecture: ModelArchitecture§intermediate_size: usize§num_layers: usize§num_heads: usize§num_key_value_heads: Option<usize>§vocab_size: usize§max_position_embeddings: usize§quantization: Option<QuantizationType>§rope_theta: Option<f32>§rope_scaling: Option<RopeScaling>Implementations§
Source§impl ModelMetadata
impl ModelMetadata
Sourcepub fn from_gguf(model: &GgufModel) -> Result<Self, SparseInferenceError>
pub fn from_gguf(model: &GgufModel) -> Result<Self, SparseInferenceError>
Extract metadata from GGUF model
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
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