pub struct CausalMask {
pub batch_size: usize,
}Expand description
Causal (autoregressive) attention mask
Prevents positions from attending to subsequent positions. mask[i, j] = 1 if i >= j, else 0
Fields§
§batch_size: usizeBatch size
Implementations§
Trait Implementations§
Source§impl AttentionMask for CausalMask
impl AttentionMask for CausalMask
Source§impl Clone for CausalMask
impl Clone for CausalMask
Source§fn clone(&self) -> CausalMask
fn clone(&self) -> CausalMask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CausalMask
impl RefUnwindSafe for CausalMask
impl Send for CausalMask
impl Sync for CausalMask
impl Unpin for CausalMask
impl UnwindSafe for CausalMask
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