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 function
reduce_row_mean_of_squares_qk_shape
def reduce_row_mean_of_squares_qk_shape(q: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=q.static_spec], k: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=k.static_spec]) -> IndexList[Int(2)]
Computes the output shape for the mo.reduce.row_mean_of_squares_qk graph op.
Args:
- q (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=q.static_spec]): Query tensor of shape[M, Nq]whose per-row mean of squares forms output column 0. - k (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=k.static_spec]): Key tensor of shape[M, Nk]whose per-row mean of squares forms output column 1; must share row count withq.
Returns:
IndexList[Int(2)]: The output shape [M, 2] with per-row mean of squares
for q and k.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!