pub struct Gemma4Weights {
pub token_embd: WeightMatrix,
pub per_layer_token_embd: Option<WeightMatrix>,
pub per_layer_model_proj: Option<WeightMatrix>,
pub per_layer_proj_norm: Option<Vec<f32>>,
pub layers: Vec<Gemma4LayerWeights>,
pub output_norm: Vec<f32>,
pub output_head: WeightMatrix,
pub rope_freqs: Option<Vec<f32>>,
}Fields§
§token_embd: WeightMatrix§per_layer_token_embd: Option<WeightMatrix>§per_layer_model_proj: Option<WeightMatrix>§per_layer_proj_norm: Option<Vec<f32>>§layers: Vec<Gemma4LayerWeights>§output_norm: Vec<f32>§output_head: WeightMatrix§rope_freqs: Option<Vec<f32>>Full-attn RoPE frequency factors (rope_freqs.weight), length head_dim_full/2.
Auto Trait Implementations§
impl Freeze for Gemma4Weights
impl RefUnwindSafe for Gemma4Weights
impl Send for Gemma4Weights
impl Sync for Gemma4Weights
impl Unpin for Gemma4Weights
impl UnsafeUnpin for Gemma4Weights
impl UnwindSafe for Gemma4Weights
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> 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