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
b0c824d9
Commit
b0c824d9
authored
Feb 04, 2022
by
rprenger
Browse files
Adding message to ValueError
parent
42982fc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
megatron/text_generation/generation.py
megatron/text_generation/generation.py
+1
-1
No files found.
megatron/text_generation/generation.py
View file @
b0c824d9
...
@@ -136,7 +136,7 @@ def generate_tokens_probs_and_return_on_first_stage(
...
@@ -136,7 +136,7 @@ def generate_tokens_probs_and_return_on_first_stage(
# If the context is too big, this happens
# If the context is too big, this happens
if
min_prompt_length
>=
max_sequence_length
:
if
min_prompt_length
>=
max_sequence_length
:
raise
ValueError
raise
ValueError
(
"context length + tokens_to_generate too large"
)
# forward step.
# forward step.
forward_step
=
ForwardStep
(
model
,
batch_size
,
max_sequence_length
)
forward_step
=
ForwardStep
(
model
,
batch_size
,
max_sequence_length
)
...
...
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