pub struct LayerWeights {Show 13 fields
pub input_ln_w: Vec<f32>,
pub q_proj_w: Vec<f32>,
pub k_proj_w: Vec<f32>,
pub v_proj_w: Vec<f32>,
pub o_proj_w: Vec<f32>,
pub q_norm_w: Vec<f32>,
pub k_norm_w: Vec<f32>,
pub post_ln_w: Vec<f32>,
pub gate_proj_w: Vec<f32>,
pub up_proj_w: Vec<f32>,
pub down_proj_w: Vec<f32>,
pub attn_layer_scale: Option<Vec<f32>>,
pub mlp_layer_scale: Option<Vec<f32>>,
}Expand description
Per-layer weights as flat f32 vectors (extracted from safetensors once at init).
Fields§
§input_ln_w: Vec<f32>§q_proj_w: Vec<f32>§k_proj_w: Vec<f32>§v_proj_w: Vec<f32>§o_proj_w: Vec<f32>§q_norm_w: Vec<f32>§k_norm_w: Vec<f32>§post_ln_w: Vec<f32>§gate_proj_w: Vec<f32>§up_proj_w: Vec<f32>§down_proj_w: Vec<f32>§attn_layer_scale: Option<Vec<f32>>Optional layer_scale for attention (vocoder transformer uses this, talker doesn’t)
mlp_layer_scale: Option<Vec<f32>>Optional layer_scale for MLP
Auto Trait Implementations§
impl Freeze for LayerWeights
impl RefUnwindSafe for LayerWeights
impl Send for LayerWeights
impl Sync for LayerWeights
impl Unpin for LayerWeights
impl UnsafeUnpin for LayerWeights
impl UnwindSafe for LayerWeights
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