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
a29890c3
Commit
a29890c3
authored
Feb 26, 2021
by
Mostofa Patwary
Browse files
added threads
parent
90c9e3f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tools/openwebtext/filter_ngrams.py
tools/openwebtext/filter_ngrams.py
+1
-1
No files found.
tools/openwebtext/filter_ngrams.py
View file @
a29890c3
...
@@ -284,7 +284,7 @@ if __name__ == '__main__':
...
@@ -284,7 +284,7 @@ if __name__ == '__main__':
dedup_key
=
args
.
dedup_dataset
[
1
]
dedup_key
=
args
.
dedup_dataset
[
1
]
# Setup multi-processing.
# Setup multi-processing.
num_workers
=
1
#
40
num_workers
=
40
fin
=
open
(
dedup_file
,
'r'
,
encoding
=
'utf-8'
)
fin
=
open
(
dedup_file
,
'r'
,
encoding
=
'utf-8'
)
pool
=
multiprocessing
.
Pool
(
num_workers
)
pool
=
multiprocessing
.
Pool
(
num_workers
)
free_ngram_x
=
partial
(
free_ngram
,
args
=
args
,
key
=
dedup_key
,
ngrams
=
ngrams
,
\
free_ngram_x
=
partial
(
free_ngram
,
args
=
args
,
key
=
dedup_key
,
ngrams
=
ngrams
,
\
...
...
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