From 1e9ba7e466d7dda80cc10f578afa556daad637ab Mon Sep 17 00:00:00 2001 From: Ella Charlaix Date: Tue, 19 Sep 2023 11:03:56 +0200 Subject: [PATCH] fix --- optimum/onnxruntime/modeling_decoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimum/onnxruntime/modeling_decoder.py b/optimum/onnxruntime/modeling_decoder.py index 1f18f70078c..bcb8f042279 100644 --- a/optimum/onnxruntime/modeling_decoder.py +++ b/optimum/onnxruntime/modeling_decoder.py @@ -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: