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
chenpangpang
transformers
Commits
9faa9f9d
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "336116d960e19319767808449ec68ad4f8ee15fa"
Unverified
Commit
9faa9f9d
authored
Sep 12, 2022
by
Shijie Wu
Committed by
GitHub
Sep 12, 2022
Browse files
remove unused activation dropout (#18842)
parent
a2611477
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
6 deletions
+0
-6
src/transformers/models/opt/configuration_opt.py
src/transformers/models/opt/configuration_opt.py
+0
-4
src/transformers/models/opt/modeling_opt.py
src/transformers/models/opt/modeling_opt.py
+0
-2
No files found.
src/transformers/models/opt/configuration_opt.py
View file @
9faa9f9d
...
...
@@ -67,8 +67,6 @@ class OPTConfig(PretrainedConfig):
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
attention_dropout (`float`, *optional*, defaults to 0.0):
The dropout ratio for the attention probabilities.
activation_dropout (`float`, *optional*, defaults to 0.0):
The dropout ratio for activations inside the fully connected layer.
layerdrop: (`float`, *optional*, defaults to 0.0):
The LayerDrop probability. See the [LayerDrop paper](see https://arxiv.org/abs/1909.11556) for more
details.
...
...
@@ -106,7 +104,6 @@ class OPTConfig(PretrainedConfig):
word_embed_proj_dim
=
None
,
dropout
=
0.1
,
attention_dropout
=
0.0
,
activation_dropout
=
0.0
,
num_attention_heads
=
12
,
activation_function
=
"relu"
,
layerdrop
=
0.0
,
...
...
@@ -132,7 +129,6 @@ class OPTConfig(PretrainedConfig):
self
.
num_hidden_layers
=
num_hidden_layers
self
.
dropout
=
dropout
self
.
attention_dropout
=
attention_dropout
self
.
activation_dropout
=
activation_dropout
self
.
activation_function
=
activation_function
self
.
init_std
=
init_std
self
.
layerdrop
=
layerdrop
...
...
src/transformers/models/opt/modeling_opt.py
View file @
9faa9f9d
...
...
@@ -281,8 +281,6 @@ class OPTDecoderLayer(nn.Module):
self
.
dropout
=
config
.
dropout
self
.
activation_fn
=
ACT2FN
[
config
.
activation_function
]
self
.
activation_dropout
=
config
.
activation_dropout
self
.
self_attn_layer_norm
=
nn
.
LayerNorm
(
self
.
embed_dim
)
self
.
fc1
=
nn
.
Linear
(
self
.
embed_dim
,
config
.
ffn_dim
)
self
.
fc2
=
nn
.
Linear
(
config
.
ffn_dim
,
self
.
embed_dim
)
...
...
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