pub struct LtxAttn<'a> {
pub q: LtxLin<'a>,
pub k: LtxLin<'a>,
pub v: LtxLin<'a>,
pub o: LtxLin<'a>,
pub q_norm: &'a [f32],
pub k_norm: &'a [f32],
pub gate: Option<LtxLin<'a>>,
pub heads: usize,
pub dh: usize,
}Expand description
One attention of an LTX-2.5 block: the query reads the tokens, the keys
and values read the context (the tokens again for self-attention), q and
k take an RMS norm over the whole inner width, and every head’s output
is scaled by 2 * sigmoid(gate(x)) where the block has gate logits.
Fields§
§q: LtxLin<'a>§k: LtxLin<'a>§v: LtxLin<'a>§o: LtxLin<'a>§q_norm: &'a [f32]§k_norm: &'a [f32]§gate: Option<LtxLin<'a>>§heads: usize§dh: usizeTrait Implementations§
Auto Trait Implementations§
impl<'a> Forget for LtxAttn<'a>
impl<'a> Freeze for LtxAttn<'a>
impl<'a> Move for LtxAttn<'a>
impl<'a> RefUnwindSafe for LtxAttn<'a>
impl<'a> Send for LtxAttn<'a>
impl<'a> Sync for LtxAttn<'a>
impl<'a> Unpin for LtxAttn<'a>
impl<'a> UnsafeUnpin for LtxAttn<'a>
impl<'a> UnwindSafe for LtxAttn<'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