pub enum GateMode {
Scalar,
Vector,
}Available on crate feature
alloc only.Expand description
Gate dimensionality for GLA-family variants.
The original GLA paper (Yang et al., 2024) specifies a vector gate
α_t ∈ (0,1)^{d_k} — one decay scalar per key dimension. The simplified
scalar gate (Scalar) uses a single sigmoid output shared across all key
dimensions, which reduces parameter count at the cost of expressivity.
Vector is the mathematically canonical form from the paper.
Scalar is retained for backward compatibility with models trained before
the vector-gate upgrade.
Variants§
Scalar
Single scalar gate shared across all key dimensions (legacy default).
Vector
Per-key-dimension gate vector α_t ∈ (0,1)^{d_k} (paper-canonical).
Trait Implementations§
impl StructuralPartialEq for GateMode
Auto Trait Implementations§
impl Freeze for GateMode
impl RefUnwindSafe for GateMode
impl Send for GateMode
impl Sync for GateMode
impl Unpin for GateMode
impl UnsafeUnpin for GateMode
impl UnwindSafe for GateMode
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