Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Jan 6, 2025
1 parent d00520c commit 962cf42
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,12 @@ def prepare_inputs_for_generation(self, input_ids, past_key_values=None, attenti
if position_ids is not None:
position_ids = position_ids[:, remove_prefix_length:]

return {"input_ids": input_ids, "attention_mask": attention_mask, "position_ids": position_ids, "past_key_values": past_key_values}
return {
"input_ids": input_ids,
"attention_mask": attention_mask,
"position_ids": position_ids,
"past_key_values": past_key_values,
}

def _reorder_cache(self, past_key_values, beam_idx):
reordered_past = ()
Expand Down

0 comments on commit 962cf42

Please sign in to comment.