For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
MLA_Decode_Pack
struct MLA_Decode_Pack[ValidLengthType: OptionalPointer, MaskType: MHAMask, SplitAccumType: OptionalPointer]
Bundles the mask, valid-length, and split-K accumulator pointers passed to decode kernels.
Parametersβ
- βValidLengthType (
OptionalPointer):OptionalPointertype wrapping the per-batch valid-sequence-length tensor (may beNullwhen unused). - βMaskType (
MHAMask):MHAMasktype applied to the attention scores. - βSplitAccumType (
OptionalPointer):OptionalPointertype wrapping the split-K LSE accumulator buffer (may beNullwhen split-K is unused).
Fieldsβ
- βmask (
MaskType): - βvalid_length (
ValidLengthType): - βlse_accum_split_ptr (
SplitAccumType): - βnum_partitions (
Int):
Implemented traitsβ
AnyType,
Copyable,
DevicePassable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
device_typeβ
comptime device_type = MLA_Decode_Pack[ValidLengthType, MaskType, SplitAccumType]
Methodsβ
__init__β
def __init__(mask: MaskType, valid_length: ValidLengthType, lse_accum_split_ptr: SplitAccumType, num_partitions: Int) -> Self
get_type_nameβ
get_device_type_nameβ
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!