Expand description
2026-09-25: Qwen3SsmLayer, the Gated DeltaNet (linear-attention) layer,
and the submodules its constructor, forward paths and tests live in.
Owner: model-layers (qwen3_ssm). Invariants: none beyond the types.
Re-exports§
pub use gdn_flags::GdnFlags;pub use gdn_flags::MAX_F16_TWIN_DFLASH_GAMMA;pub use gdn_flags::MAX_F16_TWIN_K;pub use gdn_flags::UNRESOLVED_DFLASH_GAMMA;pub use gdn_flags::default_dflash_gamma;pub use gdn_flags::gdn_fused_norm_enabled;pub use gdn_flags::resolve_dflash_gamma;pub use gdn_flags::ssm_batched_recurrent_enabled;pub use gdn_flags::ssm_h_dtype_bits;pub use gdn_flags::ssm_h_f16_pool_enabled;pub use gdn_flags::ssm_h_fp16_enabled;pub use gdn_flags::verify_exact_enabled;
Modules§
- gdn_
flags - 2026-09-25: GDN / SSM decode-path flags, resolved once per process from the serve command line or, failing that, the environment.
Structs§
- Qwen3
SsmLayer - 2026-09-25: The Gated DeltaNet layer. Its QKVZ projection comes in two
layouts: interleaved per key-head group, which
deinterleave_qkvz(or the fusedw4a16_gemv_qkvz) turns into[Q | K | V | Z], and sequential (sequential_qkvz), already in that order.
Functions§
- carry_
flush_ kernel - 2026-10-01: The fold of pending rows (
gdn_carry_flush), or under the exact verify the model directory’s twin (gdn_exact_carry_flush), which every directory with the exact twins defines: one whose strided decode clamps the state after each update folds with the same clamp. Shared by the layer’s fold and the model’s (model-enginegdn_carry.rs).