pub struct V2Layer {Show 14 fields
pub norm_in: Vec<f32>,
pub q_proj: CqWeight,
pub k_proj: CqWeight,
pub v_proj: CqWeight,
pub gate_proj: CqWeight,
pub out_proj: CqWeight,
pub q_norm: Vec<f32>,
pub k_norm: Vec<f32>,
pub post_norm: Vec<f32>,
pub attn_gate: f32,
pub pre_hada: Vec<f32>,
pub d1: Vec<f32>,
pub d2: Vec<f32>,
pub d3: Vec<f32>,
}Expand description
One transformer layer’s weights.
Fields§
§norm_in: Vec<f32>ZCRMSNorm scale before attention (ZCRMSNorm_0).
q_proj: CqWeight§k_proj: CqWeight§v_proj: CqWeight§gate_proj: CqWeightProduces the sigmoid gate applied to the attention output.
out_proj: CqWeight§q_norm: Vec<f32>Per-head ZCRMSNorm scales, head_dim long.
k_norm: Vec<f32>§post_norm: Vec<f32>ZCRMSNorm scale after attention (post_attn_norm).
attn_gate: f32Pre-sigmoid scalar gating the attention residual.
pre_hada: Vec<f32>ZCRMSNorm scale before HadamardMLP.
d1: Vec<f32>HadamardMLP diagonals, hada_n long each.
d2: Vec<f32>§d3: Vec<f32>Auto Trait Implementations§
impl Freeze for V2Layer
impl RefUnwindSafe for V2Layer
impl Send for V2Layer
impl Sync for V2Layer
impl Unpin for V2Layer
impl UnsafeUnpin for V2Layer
impl UnwindSafe for V2Layer
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