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
661553f6
Commit
661553f6
authored
Mar 11, 2021
by
Mostofa Patwary
Browse files
made more generic, aligned with other tasks
parent
8b04e0e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
examples/evaluate_ict_zeroshot_nq.sh
examples/evaluate_ict_zeroshot_nq.sh
+3
-1
tasks/main.py
tasks/main.py
+2
-0
tasks/orqa/evaluate_orqa.py
tasks/orqa/evaluate_orqa.py
+1
-5
No files found.
examples/evaluate_ict_zeroshot_nq.sh
View file @
661553f6
...
@@ -12,7 +12,9 @@ CHECKPOINT_PATH=<Specify path of pretrained ICT model>
...
@@ -12,7 +12,9 @@ CHECKPOINT_PATH=<Specify path of pretrained ICT model>
QA_FILE
=
<Path of the natural question
test
dataset>
QA_FILE
=
<Path of the natural question
test
dataset>
python tasks/orqa/evaluate_orqa.py
\
python tasks/main.py
\
--task
ICT-ZEROSHOT-NQ
\
--tokenizer-type
BertWordPieceLowerCase
\
--num-layers
12
\
--num-layers
12
\
--hidden-size
768
\
--hidden-size
768
\
--num-attention-heads
12
\
--num-attention-heads
12
\
...
...
tasks/main.py
View file @
661553f6
...
@@ -62,6 +62,8 @@ if __name__ == '__main__':
...
@@ -62,6 +62,8 @@ if __name__ == '__main__':
from
glue.finetune
import
main
from
glue.finetune
import
main
elif
args
.
task
in
[
'LAMBADA'
,
'WIKITEXT103'
]:
elif
args
.
task
in
[
'LAMBADA'
,
'WIKITEXT103'
]:
from
zeroshot_gpt.evaluate
import
main
from
zeroshot_gpt.evaluate
import
main
elif
args
.
task
in
[
'ICT-ZEROSHOT-NQ'
]:
from
orqa.evaluate_orqa
import
main
else
:
else
:
raise
NotImplementedError
(
'Task {} is not implemented.'
.
format
(
raise
NotImplementedError
(
'Task {} is not implemented.'
.
format
(
args
.
task
))
args
.
task
))
...
...
tasks/orqa/evaluate_orqa.py
View file @
661553f6
...
@@ -18,9 +18,6 @@
...
@@ -18,9 +18,6 @@
import
os
import
os
import
sys
import
sys
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
path
.
join
(
os
.
path
.
pardir
,
os
.
path
.
pardir
))))
from
megatron
import
get_args
from
megatron
import
get_args
from
megatron.initialize
import
initialize_megatron
from
megatron.initialize
import
initialize_megatron
...
@@ -30,8 +27,7 @@ def main():
...
@@ -30,8 +27,7 @@ def main():
"""
"""
Main program
Main program
"""
"""
initialize_megatron
(
extra_args_provider
=
None
,
args_defaults
=
{
'tokenizer_type'
:
'BertWordPieceLowerCase'
})
args
=
get_args
()
args
=
get_args
()
# Set up the model and evaluator
# Set up the model and evaluator
...
...
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