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
Geometry and the config values that MUST be read from the checkpoint.
gate_lower_bound, rms_norm_eps and hidden_act coincide with a library default on
GLM-5.3-Flash by accident — vLLM looks up the legacy key lower_bound, misses it, and
falls back to a matching -5.0; it never passes rms_norm_eps; it hardcodes "silu".
Inheriting any of those defaults is a latent bug on the next checkpoint.
Fields§
§heads: usize§head_dim: usize§conv_kernel: usize§gate_lower_bound: f32linear_attn_config.gate_lower_bound.
rms_norm_eps: f32rms_norm_eps, consumed by o_norm.
l2_eps: f32FLA convention 1/sqrt(sum + eps), not max(norm, eps). Not a config key.
chunk: usizePrefill tiling width. A tiling parameter only — results are identical at C = 2..32, and
agree with HF’s C = 64 — but bounded by SMEM_CEILING.
Implementations§
Source§impl Glm5NextKdaConfig
impl Glm5NextKdaConfig
pub fn qkv_dim(&self) -> usize
Sourcepub fn qk_channels(&self) -> usize
pub fn qk_channels(&self) -> usize
Only q | k are L2-normalised. V never is.
Sourcepub fn recurrent_state_elems(&self) -> usize
pub fn recurrent_state_elems(&self) -> usize
FP32 [heads, head_dim, head_dim], K-major. Mandatory dtype, not a policy choice.
Sourcepub fn conv_state_elems(&self) -> usize
pub fn conv_state_elems(&self) -> usize
FP32 [conv_dim, conv_kernel] — Atlas’s width, one slot wider than HF’s.
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more