We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dacb0a commit 23a3b54Copy full SHA for 23a3b54
optimum/exporters/ipex/modeling_utils.py
@@ -312,9 +312,7 @@ def _falcon_model_forward(
312
device = input_ids.device if input_ids is not None else inputs_embeds.device
313
314
if cache_position is None:
315
- cache_position = torch.arange(
316
- past_key_values_length, past_key_values_length + seq_length, device=device
317
- )
+ cache_position = torch.arange(past_key_values_length, past_key_values_length + seq_length, device=device)
318
319
if position_ids is None:
320
position_ids = cache_position.unsqueeze(0).repeat_interleave(input_ids.shape[0], 0)
0 commit comments