pub struct Qwen35LinearLayer {
pub attn_norm: Vec<f32>,
pub attn_post_norm: Vec<f32>,
pub attn_qkv: MatWeight,
pub attn_gate: MatWeight,
pub ssm_conv1d: Vec<f32>,
pub ssm_dt_bias: Vec<f32>,
pub ssm_a: Vec<f32>,
pub ssm_beta: MatWeight,
pub ssm_alpha: MatWeight,
pub ssm_norm: Vec<f32>,
pub ssm_out: MatWeight,
pub ffn: Qwen35LayerFfn,
}Expand description
Gated DeltaNet (“linear attention”) trunk layer. Mirrors
qwen35.cpp::load_block_trunk for the is_recurrent(il) branch.
Fields§
§attn_norm: Vec<f32>[n_embd]
attn_post_norm: Vec<f32>[n_embd]
attn_qkv: MatWeightFused [gate, x, k, B, C]-style projection:
[n_embd, 2*key_dim + value_dim] with key_dim = ssm_state*group_count, value_dim = ssm_state*dt_rank.
attn_gate: MatWeight[n_embd, value_dim] — z gating projection.
ssm_conv1d: Vec<f32>Depthwise 1-D conv weights over the fused channels:
[ssm_conv_kernel, key_dim*2 + value_dim]. Kept dense —
Op::Conv has no packed variant and the conv kernel is
tiny vs the projections.
ssm_dt_bias: Vec<f32>[dt_rank] — delta-t bias.
ssm_a: Vec<f32>[dt_rank] — A (no-scan; used directly as scalar gate
multiplier per head).
ssm_beta: MatWeight[n_embd, dt_rank] — β projection.
ssm_alpha: MatWeight[n_embd, dt_rank] — α projection.
ssm_norm: Vec<f32>[ssm_state] — per-state-row RMS norm gate.
ssm_out: MatWeight[value_dim, n_embd] — output projection.
ffn: Qwen35LayerFfnTrait Implementations§
Source§impl Clone for Qwen35LinearLayer
impl Clone for Qwen35LinearLayer
Source§fn clone(&self) -> Qwen35LinearLayer
fn clone(&self) -> Qwen35LinearLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Qwen35LinearLayer
impl RefUnwindSafe for Qwen35LinearLayer
impl Send for Qwen35LinearLayer
impl Sync for Qwen35LinearLayer
impl Unpin for Qwen35LinearLayer
impl UnsafeUnpin for Qwen35LinearLayer
impl UnwindSafe for Qwen35LinearLayer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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