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 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,
Deinitable,
DevicePassable,
ImplicitlyCopyable,
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