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
73af1290
Commit
73af1290
authored
Oct 29, 2019
by
Mohammad Shoeybi
Committed by
Raul Puri
Oct 29, 2019
Browse files
Major refactoring, combining gpt2 and bert
parent
ebbe40cd
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
446 deletions
+22
-446
pretrain_gpt2.py
pretrain_gpt2.py
+19
-443
scripts/run_gpt2_eval.py
scripts/run_gpt2_eval.py
+3
-3
No files found.
pretrain_gpt2.py
View file @
73af1290
This diff is collapsed.
Click to expand it.
scripts/run_gpt2_eval.py
View file @
73af1290
...
...
@@ -28,8 +28,8 @@ parser.add_argument('--data-path', type=str, required=True,
help
=
'Data path for evaluation data'
)
parser
.
add_argument
(
'--cloze-eval'
,
action
=
'store_true'
,
help
=
'Run lambada cloze eval instead of perplexity eval.'
)
parser
.
add_argument
(
'--
strict
-lambada'
,
action
=
'store_true'
,
help
=
'use
more difficult
formulation of lambada'
)
parser
.
add_argument
(
'--
easy
-lambada'
,
action
=
'store_true'
,
help
=
'use
easier
formulation of lambada'
)
parser
.
add_argument
(
'--webtext-eval'
,
action
=
'store_true'
,
help
=
'Run webtext PPL eval instead of wikitext PPL eval.'
)
parser
.
add_argument
(
'--eval-iters'
,
default
=
5000
,
type
=
int
,
...
...
@@ -80,7 +80,7 @@ if args.load_openai:
if
args
.
cloze_eval
:
CMD
+=
' --valid-data {} '
.
format
(
args
.
data_path
)
CMD
+=
' --cloze-eval '
if
args
.
strict
_lambada
:
if
not
args
.
easy
_lambada
:
CMD
+=
' --strict-lambada '
CMD
=
'evaluate_gpt2.py'
+
CMD
print
(
'Running Lambada Eval Command:'
,
flush
=
True
)
...
...
Prev
1
2
Next
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