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
8126d777
Commit
8126d777
authored
Oct 13, 2021
by
mshoeybi
Browse files
addressed Jareds comments
parent
b10ca211
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
megatron/inference/api.py
megatron/inference/api.py
+1
-1
megatron/inference/forward_step.py
megatron/inference/forward_step.py
+2
-1
No files found.
megatron/inference/api.py
View file @
8126d777
...
...
@@ -38,7 +38,7 @@ def generate_and_post_process(model,
temperature
=
1.0
,
add_BOS
=
False
,
use_eod_token_for_early_termination
=
True
):
"""Run infere
c
ne and post-process outputs, i.e., detokenize,
"""Run inferen
c
e and post-process outputs, i.e., detokenize,
move to cpu and convert to list."""
# Main inference.
...
...
megatron/inference/forward_step.py
View file @
8126d777
...
...
@@ -61,7 +61,8 @@ class ForwardStep:
max_sequence_len
)
# Pipelining arguments.
args
=
get_args
()
self
.
pipeline_size_larger_than_one
=
args
.
pipeline_model_parallel_size
self
.
pipeline_size_larger_than_one
=
(
args
.
pipeline_model_parallel_size
>
1
)
# Threshold of pipelining.
self
.
pipelining_batch_x_seqlen
=
\
args
.
inference_batch_times_seqlen_threshold
...
...
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