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 function

reduce_row_mean_of_squares_qk_shape

def reduce_row_mean_of_squares_qk_shape(q: T, k: T) -> IndexList[Int(2)]

Computes the output shape for the mo.reduce.row_mean_of_squares_qk graph op.

Args:

  • ​q (T): Query tensor of shape [M, Nq] whose per-row mean of squares forms output column 0.
  • ​k (T): Key tensor of shape [M, Nk] whose per-row mean of squares forms output column 1; must share row count with q.

Returns:

IndexList[Int(2)]: The output shape [M, 2] with per-row mean of squares for q and k.

Was this page helpful?