pub struct KdaConfig {
pub heads: usize,
pub head_dim: usize,
pub conv_kernel: usize,
pub gate_lower_bound: Option<f32>,
pub use_full_rank_gate: bool,
}Expand description
KDA geometry. Tiny dims are legal for CPU tests; production is 128/4.
Fields§
§heads: usize§head_dim: usize§conv_kernel: usize§gate_lower_bound: Option<f32>Production JSON is -5. None is the FLA default (twin omits the key).
use_full_rank_gate: boolImplementations§
Source§impl KdaConfig
impl KdaConfig
Sourcepub fn production() -> KdaConfig
pub fn production() -> KdaConfig
Official K3 KDA. Twin matches except head/heads and omitted gate_lower_bound.
Sourcepub fn twin_0_40b() -> KdaConfig
pub fn twin_0_40b() -> KdaConfig
inference-optimization/Kimi-K3-0.40B linear_attn_config (gate key omitted).
pub fn qkv_dim(&self) -> usize
pub fn conv_dim(&self) -> usize
pub fn recurrent_elems(&self) -> usize
pub fn conv_elems(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KdaConfig
impl RefUnwindSafe for KdaConfig
impl Send for KdaConfig
impl Sync for KdaConfig
impl Unpin for KdaConfig
impl UnwindSafe for KdaConfig
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