Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T5rpe #141

Merged
merged 7 commits into from
Feb 28, 2021
Merged

T5rpe #141

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update to work with args 1.
  • Loading branch information
MicPie committed Feb 21, 2021
commit 5b9792f916c44911a2e9e24bbe8e8b0037b7ad7b
9 changes: 7 additions & 2 deletions megatron/model/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,16 @@ class ParallelTransformer(MegatronModule):
"""Transformer class."""

def __init__(self, attention_mask_func,
init_method, output_layer_init_method,
rpe=True, rpe_causal=False, rpe_num_buckets=32, rpe_max_distance=128):
init_method, output_layer_init_method):
# rpe=True, rpe_causal=False, rpe_num_buckets=32, rpe_max_distance=128):
super(ParallelTransformer, self).__init__()
args = get_args()

self.rpe = args.rpe # True
self.rpe_causal = args.rpe_causal # False
self.rpe_num_buckets =.args.rpe_num_buckets # 32
self.rpe_max_distance = args.rpe_max_distance # 128

# Store activation checkpoiting flag.
self.checkpoint_activations = args.checkpoint_activations
self.checkpoint_num_layers = args.checkpoint_num_layers
Expand Down