Skip to content

Commit be72667

Browse files
committed
remove redundant kwarg
1 parent 44d0844 commit be72667

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/transformers/generation/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,6 @@ def _get_candidate_generator(
904904
assistant_model: "PreTrainedModel",
905905
logits_processor: LogitsProcessorList,
906906
model_kwargs: Dict,
907-
eos_token_id: Union[int, List[int]],
908907
) -> CandidateGenerator:
909908
"""
910909
Returns the candidate generator to be used in `assisted_generation`
@@ -915,7 +914,7 @@ def _get_candidate_generator(
915914
logits_processor=logits_processor,
916915
model_kwargs=model_kwargs,
917916
inputs_tensor=inputs_tensor,
918-
eos_token_id=eos_token_id,
917+
eos_token_id=generation_config.eos_token_id,
919918
)
920919
return candidate_generator
921920

@@ -1709,7 +1708,6 @@ def generate(
17091708
assistant_model=assistant_model,
17101709
logits_processor=logits_processor,
17111710
model_kwargs=model_kwargs,
1712-
eos_token_id=generation_config.eos_token_id,
17131711
)
17141712

17151713
# 12. run assisted generate

0 commit comments

Comments
 (0)