Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Jan 6, 2025
1 parent f7d2ae5 commit 3c444a2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,9 @@ def prepare_inputs_for_generation(self, input_ids, past_key_values=None, attenti
# Create missing `position_ids` on the fly
position_ids = None
if model_kwargs.get("position_ids") is None:
position_ids = create_position_ids_from_input_ids(input_ids, padding_idx=self.config.pad_token_id) # placed in kwargs for further processing (see below)
position_ids = create_position_ids_from_input_ids(
input_ids, padding_idx=self.config.pad_token_id
) # placed in kwargs for further processing (see below)

# cut decoder_input_ids if past_key_values is used
if past_key_values is not None:
Expand Down

0 comments on commit 3c444a2

Please sign in to comment.