File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -8652,6 +8652,8 @@ def Params(cls):
8652
8652
),
8653
8653
)
8654
8654
p .Define ('use_fused_layernorm' , False , 'Whether to use fused layernorm. ' )
8655
+ p .Define ('ln_use_bias' , True , 'Whether to use bias in layernorm. When bias'
8656
+ 'is not used, it is RMSNorm (https://arxiv.org/abs/1910.07467)' )
8655
8657
p .Define ('layernorm_tpl' , layers .LayerNorm .Params (), 'Template for the '
8656
8658
'LayerNorm layers. use_fused_layernorm param above overrides the '
8657
8659
'layernorm_tpl.use_fused_layernorm for compatibility.' )
@@ -8760,6 +8762,7 @@ def _DefaultLN(self, name):
8760
8762
name = name ,
8761
8763
input_dim = p .model_dim ,
8762
8764
use_fused_layernorm = p .use_fused_layernorm ,
8765
+ bias = p .ln_use_bias ,
8763
8766
fprop_dtype = p .fprop_dtype )
8764
8767
8765
8768
def _ExpandDims (self , name ):
You can’t perform that action at this time.
0 commit comments