pub struct ModelDimensions {
pub vocab_size: usize,
pub hidden_size: usize,
pub num_layers: usize,
pub num_heads: usize,
pub num_kv_heads: Option<usize>,
pub intermediate_size: Option<usize>,
pub max_sequence_length: usize,
}Expand description
Model dimensions and hyperparameters
Fields§
§vocab_size: usizeVocabulary size
Hidden/embedding dimension
num_layers: usizeNumber of layers
num_heads: usizeNumber of attention heads
num_kv_heads: Option<usize>Number of key-value heads (for GQA/MQA)
intermediate_size: Option<usize>Intermediate/FFN dimension
max_sequence_length: usizeMaximum sequence length
Trait Implementations§
Source§impl Clone for ModelDimensions
impl Clone for ModelDimensions
Source§fn clone(&self) -> ModelDimensions
fn clone(&self) -> ModelDimensions
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 ModelDimensions
impl Debug for ModelDimensions
Source§impl<'de> Deserialize<'de> for ModelDimensions
impl<'de> Deserialize<'de> for ModelDimensions
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 ModelDimensions
impl RefUnwindSafe for ModelDimensions
impl Send for ModelDimensions
impl Sync for ModelDimensions
impl Unpin for ModelDimensions
impl UnsafeUnpin for ModelDimensions
impl UnwindSafe for ModelDimensions
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