RMSNorm#
General#
RMSNorm (Root Mean Square Layer Normalization) operation performs normalization on the input tensor using the root mean square statistic.
The RMSNorm operation performs the following transformation of the input tensor:
where
Operation attributes#
Attribute Name |
Description |
Value Type |
Supported Values |
Required or Optional |
|---|---|---|---|---|
The constant to improve numerical stability. |
f32 |
Arbitrary positive f32 value, |
Optional |
|
|
s64 |
[-r,r-1],where r=rank(src). -1 is default |
Optional |
Execution arguments#
The inputs and outputs must be provided according to below index order when constructing an operation.
Inputs#
Index |
Argument Name |
Required or Optional |
|---|---|---|
0 |
|
Required |
1 |
|
Optional |
Note
gamma is scaling for the normalized value. gamma shape should be broadcastable to the src shape.
Outputs#
Index |
Argument Name |
Required or Optional |
|---|---|---|
0 |
|
Required |
Supported data types#
RMSNorm operation supports the following data type combinations.
Src / Dst |
Gamma |
|---|---|
f32 |
f32 |
bf16 |
f32, bf16 |
f16 |
f32, f16 |