IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

Struct_indexer_score_ragged_paged

struct Struct_indexer_score_ragged_paged

Registers the mo.indexer_score.ragged.paged graph op with the graph compiler.

DeepSeek-V4 lightning-indexer scores: every query row against the live entries of one layer of a paged compressed leaf, relu'd, weighted per head and summed over the given heads. See nn.attention.indexer_score.

Implemented traitsโ€‹

AnyType, Deinitable, Movable

Methodsโ€‹

executeโ€‹

static def execute[q_type: DType, kv_type: DType, //, num_heads: Int, target: StringSpan[ImmStaticOrigin]](output: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=output.static_spec], q: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=q.static_spec], weights: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=weights.static_spec], input_row_offsets: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input_row_offsets.static_spec], base: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=base.static_spec], cutoff: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=cutoff.static_spec], kv_blocks: ManagedTensorSlice[IOSpec[_, _].MutableInput, static_spec=kv_blocks.static_spec], page_stride: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=page_stride.static_spec], cache_lengths: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=cache_lengths.static_spec], kv_lookup_table: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=kv_lookup_table.static_spec], max_prompt_length: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=max_prompt_length.static_spec], max_cache_length: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=max_cache_length.static_spec], layer: UInt32, context: DeviceContext)

Was this page helpful?