pub struct GraphMlaHy<'a> {
pub gate: GraphW<'a>,
pub sinks: &'a [f32],
pub window: Option<usize>,
pub invf: &'a [f32],
pub indexer: Option<GraphHyIndexer<'a>>,
}Expand description
Hy4-flash’s additions to MLA (hy4::Attn): heads [rope | nope] with
the rotary pairs half-split, rotated by invf (rope / 2 frequencies);
a sliding window (positions a query sees, its own included) or, on the
sparse layers, the compressed indexer past group_topk · ratio
positions; one learned sink logit a head; the attention output scaled by
sigmoid(gate · x) element-wise before the O projection.
Fields§
§gate: GraphW<'a>[nh·v, hidden] over the layer’s normed input.
sinks: &'a [f32]§window: Option<usize>§invf: &'a [f32]§indexer: Option<GraphHyIndexer<'a>>Auto Trait Implementations§
impl<'a> Forget for GraphMlaHy<'a>
impl<'a> Freeze for GraphMlaHy<'a>
impl<'a> Move for GraphMlaHy<'a>
impl<'a> RefUnwindSafe for GraphMlaHy<'a>
impl<'a> Send for GraphMlaHy<'a>
impl<'a> Sync for GraphMlaHy<'a>
impl<'a> Unpin for GraphMlaHy<'a>
impl<'a> UnsafeUnpin for GraphMlaHy<'a>
impl<'a> UnwindSafe for GraphMlaHy<'a>
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