---
title: "qkLayerNorm"
sidebar_label: "qkLayerNorm"
description: "Kotlin binding reference: qkLayerNorm."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[qkLayerNorm](qkLayerNorm.md)

# qkLayerNorm

[common]\
fun [qkLayerNorm](qkLayerNorm.md)(query: [Tensor](../Tensor/index.md), key: [Tensor](../Tensor/index.md)? = null, value: [Tensor](../Tensor/index.md)? = null, queryWeight: [Tensor](../Tensor/index.md)? = null, queryBias: [Tensor](../Tensor/index.md)? = null, keyWeight: [Tensor](../Tensor/index.md)? = null, keyBias: [Tensor](../Tensor/index.md)? = null, headDim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0, eps: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)? = null): [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[Tensor](../Tensor/index.md)&gt;

`qkLayerNorm(query: Tensor, key: Tensor? = null, value: Tensor? = null, queryWeight: Tensor? = null, queryBias: Tensor? = null, keyWeight: Tensor? = null, keyBias: Tensor? = null, headDim: Long = 0L, eps: Double? = null)`: the `qk_layer_norm` operator. Per-head LAYER norm over packed attention projections, the mean-subtracting sibling of `qk_rms_norm`. Each contiguous `head_dim` run of `query` (and `key`, when present) is normalized as `(x - mean) / sqrt(var + eps) * w + b`; `value`, when given, is normalized the same way with no weight and no bias (it has no affine slots).