Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
apex
Commits
4506a687
"vscode:/vscode.git/clone" did not exist on "020f02498c090b80b690a22bde5cae6bf46c3375"
Unverified
Commit
4506a687
authored
Feb 24, 2022
by
Masaki Kozuki
Committed by
GitHub
Feb 24, 2022
Browse files
skip FastLayerNorm (#1305)
parent
199fa834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
apex/transformer/pipeline_parallel/schedules/common.py
apex/transformer/pipeline_parallel/schedules/common.py
+1
-2
No files found.
apex/transformer/pipeline_parallel/schedules/common.py
View file @
4506a687
...
...
@@ -3,7 +3,6 @@ from typing import Any, Callable, Dict, List, Tuple, Union, Optional, Sequence
import
torch
from
torch.autograd.variable
import
Variable
from
apex.contrib.layer_norm.layer_norm
import
FastLayerNorm
from
apex.normalization.fused_layer_norm
import
FusedLayerNorm
from
apex.transformer
import
parallel_state
from
apex.transformer.enums
import
ModelType
...
...
@@ -122,7 +121,7 @@ def _calc_number_of_params(model: List[torch.nn.Module]) -> int:
def
_get_params_for_weight_decay_optimization
(
model
:
Union
[
torch
.
nn
.
Module
,
List
[
torch
.
nn
.
Module
]],
*
,
no_weight_decay_modules
=
(
FastLayerNorm
,
FusedLayerNorm
),
no_weight_decay_modules
=
(
FusedLayerNorm
,
),
)
->
Dict
[
str
,
torch
.
nn
.
Parameter
]:
"""Divide params into with-weight-decay and without-weight-decay groups.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment