Skip to main content

V3Layer

Struct V3Layer 

Source
pub struct V3Layer {
Show 15 fields pub norm_in: Vec<f32>, pub q_proj: CqWeight, pub k_proj: CqWeight, pub v_proj: CqWeight, pub q_taps: Vec<f32>, pub k_taps: Vec<f32>, pub v_taps: Vec<f32>, pub q_norm: Vec<f32>, pub k_norm: Vec<f32>, pub gate_proj: CqWeight, pub out_proj: CqWeight, pub post_norm: Vec<f32>, pub attn_gate: f32, pub pre_hada: Vec<f32>, pub mlp: HadaMlp,
}
Expand description

One transformer layer’s weights.

Fields§

§norm_in: Vec<f32>§q_proj: CqWeight§k_proj: CqWeight§v_proj: CqWeight§q_taps: Vec<f32>

(taps, dim) each; empty when the model declares no conv.

§k_taps: Vec<f32>§v_taps: Vec<f32>§q_norm: Vec<f32>

Per-head-dim ZCRMSNorm scales, qk_head_dim long.

§k_norm: Vec<f32>§gate_proj: CqWeight§out_proj: CqWeight§post_norm: Vec<f32>§attn_gate: f32

Stored pre-sigmoid, as upstream stores it.

§pre_hada: Vec<f32>§mlp: HadaMlp

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.