pub struct Glm5NextKdaConfig {
pub hidden: usize,
pub heads: usize,
pub head_dim: usize,
pub conv_kernel: usize,
pub gate_lower_bound: f32,
pub rms_norm_eps: f32,
pub l2_eps: f32,
pub chunk: usize,
}Expand description
2026-09-25: KDA geometry and the two numeric config values the block uses. The loader fills
every field from ModelConfig except l2_eps and chunk; there is no Default.
Fields§
§heads: usize§head_dim: usize§conv_kernel: usize§gate_lower_bound: f322026-09-25: linear_attn_config.gate_lower_bound.
rms_norm_eps: f322026-09-25: rms_norm_eps, read by o_norm.
l2_eps: f322026-09-25: The L2 epsilon, applied as 1/sqrt(sum + eps) rather than max(norm, eps).
Not a config key.
chunk: usize2026-09-25: Prefill chunk width, bounded by SMEM_CEILING through validate.
Implementations§
Source§impl Glm5NextKdaConfig
impl Glm5NextKdaConfig
pub fn qkv_dim(&self) -> usize
Sourcepub fn conv_dim(&self) -> usize
pub fn conv_dim(&self) -> usize
2026-09-25: q | k | v concatenated: the channel count the depthwise conv sees.
Sourcepub fn qk_channels(&self) -> usize
pub fn qk_channels(&self) -> usize
2026-09-25: The q | k channels, the only ones L2-normalised.
Sourcepub fn recurrent_state_elems(&self) -> usize
pub fn recurrent_state_elems(&self) -> usize
2026-09-25: Elements of the FP32 [heads, head_dim, head_dim] K-major recurrent state.
Sourcepub fn conv_state_elems(&self) -> usize
pub fn conv_state_elems(&self) -> usize
2026-09-25: Elements of the FP32 [conv_dim, conv_kernel] conv state (see KdaSeqState).
pub fn smem_prepare(&self) -> usize
pub fn smem_scan(&self) -> usize
pub fn validate(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for Glm5NextKdaConfig
impl Clone for Glm5NextKdaConfig
Source§fn clone(&self) -> Glm5NextKdaConfig
fn clone(&self) -> Glm5NextKdaConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Glm5NextKdaConfig
impl Debug for Glm5NextKdaConfig
impl Copy for Glm5NextKdaConfig
Auto Trait Implementations§
impl Freeze for Glm5NextKdaConfig
impl RefUnwindSafe for Glm5NextKdaConfig
impl Send for Glm5NextKdaConfig
impl Sync for Glm5NextKdaConfig
impl Unpin for Glm5NextKdaConfig
impl UnwindSafe for Glm5NextKdaConfig
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