diff --git a/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py b/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py index a9fa52fc9b8240..0a3e0812a42a96 100644 --- a/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py +++ b/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py @@ -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: