pub struct GraphAttnGeom<'a> {
pub nkv: usize,
pub dv: usize,
pub rd: usize,
pub invf: &'a [f32],
pub window: Option<usize>,
pub sink: Option<&'a [f32]>,
}Expand description
Per-layer attention geometry for the wgpu graphs (see
GraphAttn::Full::geom). The layer’s CPU cache keeps K rows hd wide
and V rows zero-padded to hd; the device mirror stores V dv wide,
and a windowed layer keeps a ring of the last positions only.
Fields§
§nkv: usizeKV heads of this layer (divides the Q heads).
dv: usizeV head width, 4 <= dv <= head_dim, a multiple of 4.
rd: usizeRotary width of this layer (NeoX half-split over [0, rd)).
invf: &'a [f32]This layer’s RoPE inverse frequencies (rd / 2 of them).
window: Option<usize>Positions a query sees, its own included (MiMo-V2 SWA: 128); None = the whole context.
sink: Option<&'a [f32]>Learned per-Q-head sink logits (gpt-oss / MiMo-V2): they join the softmax max and denominator and carry no value row.
Trait Implementations§
Source§impl<'a> Clone for GraphAttnGeom<'a>
impl<'a> Clone for GraphAttnGeom<'a>
impl<'a> Copy for GraphAttnGeom<'a>
Auto Trait Implementations§
impl<'a> Freeze for GraphAttnGeom<'a>
impl<'a> RefUnwindSafe for GraphAttnGeom<'a>
impl<'a> Send for GraphAttnGeom<'a>
impl<'a> Sync for GraphAttnGeom<'a>
impl<'a> Unpin for GraphAttnGeom<'a>
impl<'a> UnsafeUnpin for GraphAttnGeom<'a>
impl<'a> UnwindSafe for GraphAttnGeom<'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