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
PositionSummary
struct PositionSummary
Fieldsβ
- βnum_keys (
UInt32): - βscore_row (
UInt32):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Movable,
RegisterPassable,
TrivialRegisterPassable
Methodsβ
__init__β
def __init__(num_keys: UInt32, score_row: UInt32) -> Self
get_start_posβ
static def get_start_pos[KVLUTType: MHAOperand, //, ragged: Bool, _is_cache_length_accurate: Bool](kv_lut: KVLUTType, seq_info: SeqInfo, num_keys_arg: UInt32) -> UInt32
Returns:
get_num_keysβ
static def get_num_keys[MaxSeqLenType: OptionallyStaticInt, KVInputRowOffsetsType: OptionalPointer, //, ragged: Bool, _is_cache_length_accurate: Bool](kv_input_row_offsets: KVInputRowOffsetsType, seq_info: SeqInfo, max_seq_len: MaxSeqLenType, num_keys_arg: UInt32, start_pos: UInt32) -> UInt32
Returns:
get_score_rowβ
static def get_score_row[*, ragged: Bool, _is_cache_length_accurate: Bool, decoding: Bool](seq_info: SeqInfo, num_keys: UInt32, start_pos: UInt32) -> UInt32
Returns:
createβ
static def create[KVLUTType: MHAOperand, KVRowOffsetsType: OptionalPointer, MaxSeqLenType: OptionallyStaticInt, //, ragged: Bool, _is_cache_length_accurate: Bool](kv_lut: KVLUTType, seq_info: SeqInfo, num_keys_arg: UInt32, kv_input_row_offsets: KVRowOffsetsType, max_seq_len: MaxSeqLenType) -> Self
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!