Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Sep 19, 2023
1 parent 52c1745 commit 1e9ba7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/onnxruntime/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def forward(
if "position_ids" in self.inputs_names:
if position_ids is None:
raise ValueError("position_ids was not passed but is a required input for this ONNX model.")
onnx_inputs["position_ids"] = position_ids.cpu().detach().numpy() if use_torch else position_ids
inputs["position_ids"] = position_ids.cpu().detach().numpy() if use_torch else position_ids

# Add the past_key_values to the decoder inputs
if past_key_values is not None:
Expand Down

0 comments on commit 1e9ba7e

Please sign in to comment.