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
chenpangpang
transformers
Commits
d12ae816
Unverified
Commit
d12ae816
authored
Jan 31, 2022
by
Stas Bekman
Committed by
GitHub
Jan 31, 2022
Browse files
[generate] fix synced_gpus default (#15446)
parent
d4f201b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/transformers/generation_utils.py
src/transformers/generation_utils.py
+6
-6
No files found.
src/transformers/generation_utils.py
View file @
d12ae816
...
@@ -835,7 +835,7 @@ class GenerationMixin:
...
@@ -835,7 +835,7 @@ class GenerationMixin:
forced_bos_token_id
:
Optional
[
int
]
=
None
,
forced_bos_token_id
:
Optional
[
int
]
=
None
,
forced_eos_token_id
:
Optional
[
int
]
=
None
,
forced_eos_token_id
:
Optional
[
int
]
=
None
,
remove_invalid_values
:
Optional
[
bool
]
=
None
,
remove_invalid_values
:
Optional
[
bool
]
=
None
,
synced_gpus
:
Optional
[
bool
]
=
Non
e
,
synced_gpus
:
Optional
[
bool
]
=
Fals
e
,
**
model_kwargs
,
**
model_kwargs
,
)
->
Union
[
GreedySearchOutput
,
SampleOutput
,
BeamSearchOutput
,
BeamSampleOutput
,
torch
.
LongTensor
]:
)
->
Union
[
GreedySearchOutput
,
SampleOutput
,
BeamSearchOutput
,
BeamSampleOutput
,
torch
.
LongTensor
]:
r
"""
r
"""
...
@@ -1338,7 +1338,7 @@ class GenerationMixin:
...
@@ -1338,7 +1338,7 @@ class GenerationMixin:
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
synced_gpus
:
Optional
[
bool
]
=
Non
e
,
synced_gpus
:
Optional
[
bool
]
=
Fals
e
,
**
model_kwargs
,
**
model_kwargs
,
)
->
Union
[
GreedySearchOutput
,
torch
.
LongTensor
]:
)
->
Union
[
GreedySearchOutput
,
torch
.
LongTensor
]:
r
"""
r
"""
...
@@ -1564,7 +1564,7 @@ class GenerationMixin:
...
@@ -1564,7 +1564,7 @@ class GenerationMixin:
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
synced_gpus
:
Optional
[
bool
]
=
Non
e
,
synced_gpus
:
Optional
[
bool
]
=
Fals
e
,
**
model_kwargs
,
**
model_kwargs
,
)
->
Union
[
SampleOutput
,
torch
.
LongTensor
]:
)
->
Union
[
SampleOutput
,
torch
.
LongTensor
]:
r
"""
r
"""
...
@@ -1807,7 +1807,7 @@ class GenerationMixin:
...
@@ -1807,7 +1807,7 @@ class GenerationMixin:
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
synced_gpus
:
Optional
[
bool
]
=
Non
e
,
synced_gpus
:
Optional
[
bool
]
=
Fals
e
,
**
model_kwargs
,
**
model_kwargs
,
)
->
Union
[
BeamSearchOutput
,
torch
.
LongTensor
]:
)
->
Union
[
BeamSearchOutput
,
torch
.
LongTensor
]:
r
"""
r
"""
...
@@ -2118,7 +2118,7 @@ class GenerationMixin:
...
@@ -2118,7 +2118,7 @@ class GenerationMixin:
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
synced_gpus
:
Optional
[
bool
]
=
Non
e
,
synced_gpus
:
Optional
[
bool
]
=
Fals
e
,
**
model_kwargs
,
**
model_kwargs
,
)
->
Union
[
BeamSampleOutput
,
torch
.
LongTensor
]:
)
->
Union
[
BeamSampleOutput
,
torch
.
LongTensor
]:
r
"""
r
"""
...
@@ -2437,7 +2437,7 @@ class GenerationMixin:
...
@@ -2437,7 +2437,7 @@ class GenerationMixin:
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_hidden_states
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
output_scores
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
return_dict_in_generate
:
Optional
[
bool
]
=
None
,
synced_gpus
:
Optional
[
bool
]
=
Non
e
,
synced_gpus
:
Optional
[
bool
]
=
Fals
e
,
**
model_kwargs
,
**
model_kwargs
,
):
):
r
"""
r
"""
...
...
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