pub struct GraphDsa<'a> {
pub index_q: GraphW<'a>,
pub index_k: GraphW<'a>,
pub pool_gate: GraphW<'a>,
pub index_weights: GraphW<'a>,
pub k_norm: &'a [f32],
pub k_bias: &'a [f32],
pub ape: &'a [f32],
pub kv_b: &'a [f32],
pub ih: usize,
pub id: usize,
pub topk: usize,
pub kpool: usize,
}Expand description
A DSA layer’s indexer (GLM-5.3, glm5_next::dsa_forward): the index
query over the normed low-rank query, the index key, pool gate and head
weights over the layer input, the key’s LayerNorm, the pools’ position
embedding, kv_b in f32 for the absorbed attention, and the geometry. The
incomplete tail is always selected.
Fields§
§index_q: GraphW<'a>[ih·id, q_rank].
index_k: GraphW<'a>[id, hidden].
pool_gate: GraphW<'a>[id, hidden].
index_weights: GraphW<'a>[ih, hidden].
k_norm: &'a [f32]§k_bias: &'a [f32]§ape: &'a [f32][kpool, id].
kv_b: &'a [f32]kv_b [nh·(nope + v), lora] in f32.
ih: usize§id: usize§topk: usize§kpool: usizeAuto Trait Implementations§
impl<'a> Forget for GraphDsa<'a>
impl<'a> Freeze for GraphDsa<'a>
impl<'a> Move for GraphDsa<'a>
impl<'a> RefUnwindSafe for GraphDsa<'a>
impl<'a> Send for GraphDsa<'a>
impl<'a> Sync for GraphDsa<'a>
impl<'a> Unpin for GraphDsa<'a>
impl<'a> UnsafeUnpin for GraphDsa<'a>
impl<'a> UnwindSafe for GraphDsa<'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