For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo module
operand_masks
Attention masks built from graph operands.
Each mask reads its operands only through load, so the graph compiler may
fuse an operand's producer into it. The view parameters default to NoView;
make returns the mask instantiated with the operands' real views.
Structs
-
AdditiveMask: Addsbias[b, q - p, k](rank 3) orbias[b, h, q - p, k](rank 4) to the score, wherepis the bias's key length minus its query length. Positions outside the bias are masked. -
RelativeLogitsMask: Causal (or sliding-window causal whenwindow_size > 0) visibility, plus an additive bias by relative distance. -
SegmentMask: Segment mask over ragged sequences: a query sees a key iff either token's segment id is -1 or the two ids are equal.
Functions
-
aligned_load: Loadswidthelements ofviewatidx, as one aligned vector when it can on GPU.