vortex_torch.indexerΒΆ

Indexer-side operator API.

This module collects the core ops used on the indexer path of vFlow pipelines. These operators are typically applied to query tensors or intermediate scoring tensors to construct sparse routing decisions (e.g., top-k page selection, attention scoring, pagewise normalization).

Included components:

  • Matrix operations: GeMM, GeMV for page-tiled GEMM/GEMV used in similarity scoring.

  • Output routing: topK for selecting sparse page indices based on per-token scores.

  • Reductions: Max, Mean, Min, L2Norm, Sum for aggregating scores along query or key dimensions.

  • Scans / normalization: Softmax, Normalize for in-place probability and magnitude normalization.

  • Data layout transforms: Transpose for switching between [B, N, D] and [B, D, N] style views.

  • Binary/unary elementwise ops: Maximum, Minimum, Multiply, Add, Relu, Sigmoid, Silu, Add_Mul, Abs.

  • Utilities: utils_sglang for SGLang-related helpers.

  • Runtime context: Context, get_ctx() for accessing per-step dynamic state (page offsets, head count, max token budget, etc.).

These operators constitute the standard toolkit for building sparse attention indexers in vFlow-compatible systems.

Modules