diff --git a/neural_compressor/adaptor/pytorch.py b/neural_compressor/adaptor/pytorch.py index b1ee706a41d..0f9e47d394e 100644 --- a/neural_compressor/adaptor/pytorch.py +++ b/neural_compressor/adaptor/pytorch.py @@ -2508,6 +2508,8 @@ def get_example_inputs(self, dataloader): if "label" in example_inputs.keys(): example_inputs.pop("label") for key, value in example_inputs.items(): + if key == "start_positions" or key == "end_positions": + continue input_tensor.append(value) return input_tensor if isinstance(example_inputs, list) or isinstance(example_inputs, tuple):