pub struct ModelSizeConfig {
pub parameters: String,
pub hidden_dim: usize,
pub num_layers: usize,
pub num_heads: usize,
pub num_kv_heads: usize,
pub intermediate_dim: usize,
pub vocab_size: usize,
pub max_position_embeddings: usize,
pub head_dim: usize,
pub rope_theta: f64,
pub norm_eps: f64,
}Expand description
Configuration for a specific model size within a family.
Fields§
§parameters: StringHuman-readable parameter count (e.g., “0.5B”, “7B”)
Hidden dimension
num_layers: usizeNumber of transformer layers
num_heads: usizeNumber of attention heads
num_kv_heads: usizeNumber of key-value heads (for GQA)
intermediate_dim: usizeIntermediate (FFN) dimension
vocab_size: usizeVocabulary size
max_position_embeddings: usizeMaximum position embeddings
head_dim: usizePer-head dimension (hidden_dim / num_heads)
rope_theta: f64RoPE theta frequency (0.0 if not using RoPE)
norm_eps: f64Normalization epsilon
Trait Implementations§
Source§impl Clone for ModelSizeConfig
impl Clone for ModelSizeConfig
Source§fn clone(&self) -> ModelSizeConfig
fn clone(&self) -> ModelSizeConfig
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 moreAuto Trait Implementations§
impl Freeze for ModelSizeConfig
impl RefUnwindSafe for ModelSizeConfig
impl Send for ModelSizeConfig
impl Sync for ModelSizeConfig
impl Unpin for ModelSizeConfig
impl UnsafeUnpin for ModelSizeConfig
impl UnwindSafe for ModelSizeConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more