pub struct KdaConfig {
pub num_heads: usize,
pub head_dim: usize,
pub short_conv_kernel_size: usize,
pub gate_lower_bound: f32,
pub use_full_rank_gate: bool,
}Expand description
KDA (Kimi Delta Attention) hyperparameters, verified against Kimi
K3’s real config.json linear_attn_config block and the real
gated delta-rule reference implementation in
fla-org/flash-linear-attention’s fla/ops/kda/naive.py (the
exact recurrence: decay state by exp(g), then add a rank-1
beta * k ⊗ (v - kᵀS) correction, then read o = qᵀS) and
fla/ops/kda/gate.py (the lower-bounded gate:
g = gate_lower_bound * sigmoid(exp(A_log) * (raw_g + dt_bias)),
and beta = sigmoid(raw_beta)).
Fields§
§num_heads: usize§head_dim: usize§short_conv_kernel_size: usize§gate_lower_bound: f32§use_full_rank_gate: boolTrait 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 UnsafeUnpin 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
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> ⓘ
Converts
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> ⓘ
Converts
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