pub struct ModelInfo {
pub path: PathBuf,
pub arch: String,
pub context_len: u32,
pub vocab_size: u32,
pub hidden_dim: u32,
pub num_heads: u32,
pub num_kv_heads: u32,
pub ffn_dim: u32,
pub num_layers: u32,
pub per_layer_bits: Vec<u8>,
pub pruning_mask: Option<Vec<Vec<u32>>>,
}Expand description
Metadata extracted from the GGUF or TPTF file header.
Fields§
§path: PathBuf§arch: StringArchitecture tag (e.g. "llama3", "qwen2").
context_len: u32Maximum sequence length supported by this model.
vocab_size: u32Vocabulary size (number of tokens).
Width of hidden state vectors.
num_heads: u32Number of query attention heads.
num_kv_heads: u32Number of key/value attention heads (GQA; equals num_heads for MHA).
ffn_dim: u32Intermediate dimension of the FFN block.
num_layers: u32Number of transformer layers (blocks).
per_layer_bits: Vec<u8>Per-layer quantization bit depths from tpt-gpu-model-optimizer (2/4/6/8/16).
Empty means all layers use f32. Indexed [layer_idx].
pruning_mask: Option<Vec<Vec<u32>>>Neuron indices zeroed by the surgical pruner, one Vec<u32> per layer.
None means no pruning was applied.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelInfo
impl RefUnwindSafe for ModelInfo
impl Send for ModelInfo
impl Sync for ModelInfo
impl Unpin for ModelInfo
impl UnsafeUnpin for ModelInfo
impl UnwindSafe for ModelInfo
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