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
Megatron-LM
Commits
5b7736ca
Commit
5b7736ca
authored
Apr 03, 2023
by
Mostofa Patwary
Browse files
addressing more comments
parent
07ffa1b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
megatron/model/language_model.py
megatron/model/language_model.py
+2
-3
No files found.
megatron/model/language_model.py
View file @
5b7736ca
...
...
@@ -362,7 +362,8 @@ class TransformerLanguageModel(MegatronModule):
self
.
_embedding_key
=
'embedding'
# Rotary positional embeddings
self
.
use_rotary_position_embeddings
=
False
self
.
use_rotary_position_embeddings
=
\
args
.
use_rotary_position_embeddings
if
args
.
use_rotary_position_embeddings
:
self
.
seq_length
=
args
.
seq_length
rotary_dim
=
args
.
hidden_size
//
args
.
num_attention_heads
\
...
...
@@ -375,8 +376,6 @@ class TransformerLanguageModel(MegatronModule):
# Wang and Komatsuzaki et al
# https://github.com/kingoflolz/mesh-transformer-jax/
self
.
rotary_pos_emb
=
RotaryEmbedding
(
rotary_dim
)
self
.
use_rotary_position_embeddings
=
\
args
.
use_rotary_position_embeddings
# Retriever (bi-directional transformer with cross attention)
if
args
.
retro_add_retriever
:
...
...
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