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
SeqInfo
struct SeqInfo
Describes a sequence's length and starting offset for a work tile.
Carries the sequence length, start-of-sequence offset, and the originating
WorkInfo coordinates used by the attention kernel to index into the KV
cache.
Fields
- seq_len (
UInt32): - start_of_seq (
UInt32): - prompt_offset (
UInt32): - head_idx (
UInt32): - prompt_idx (
UInt32):
Implemented traits
AnyType,
Copyable,
Deinitable,
ImplicitlyCopyable,
Movable,
RegisterPassable,
TrivialRegisterPassable
Methods
__init__
def __init__(seq_len: UInt32, start_of_seq: UInt32, work: WorkInfo) -> Self
is_valid
create
static def create[ValidLengthType: OptionalPointer, //](work: WorkInfo, valid_length: ValidLengthType, max_seq_len: UInt32) -> Self