Unable to export pix2struct-docvqa-base to ONNX
Author: rish-hyun
Pull request: no

I'm trying to export `pix2struct-docvqa-base` to ONNX, but getting error - 
```
/usr/local/lib/python3.10/dist-packages/transformers/convert_graph_to_onnx.py:379: FutureWarning: The `transformers.convert_graph_to_onnx` package is deprecated and will be removed in version 5 of Transformers
  warnings.warn(
ONNX opset version set to: 19
Loading pipeline (model: google/pix2struct-docvqa-base, tokenizer: google/pix2struct-docvqa-base)
Creating folder onnx
Using framework PyTorch: 2.0.1+cu118
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[<ipython-input-20-e9c32366d928>](https://localhost:8080/#) in <cell line: 5>()
      3 
      4 # Handles all the above steps for you
----> 5 convert(framework="pt", model='google/pix2struct-docvqa-base', output=Path("onnx/model.onnx"), opset=19)

3 frames
[/usr/local/lib/python3.10/dist-packages/transformers/convert_graph_to_onnx.py](https://localhost:8080/#) in convert(framework, model, output, opset, tokenizer, use_external_format, pipeline_name, **model_kwargs)
    395     # Export the graph
    396     if framework == "pt":
--> 397         convert_pytorch(nlp, opset, output, use_external_format)
    398     else:
    399         convert_tensorflow(nlp, opset, output)

[/usr/local/lib/python3.10/dist-packages/transformers/convert_graph_to_onnx.py](https://localhost:8080/#) in convert_pytorch(nlp, opset, output, use_external_format)
    279 
    280     with torch.no_grad():
--> 281         input_names, output_names, dynamic_axes, tokens = infer_shapes(nlp, "pt")
    282         ordered_input_names, model_args = ensure_valid_input(nlp.model, tokens, input_names)
    283 

[/usr/local/lib/python3.10/dist-packages/transformers/convert_graph_to_onnx.py](https://localhost:8080/#) in infer_shapes(nlp, framework)
    197     tokens = nlp.tokenizer("This is a sample output", return_tensors=framework)
    198     seq_len = tokens.input_ids.shape[-1]
--> 199     outputs = nlp.model(**tokens) if framework == "pt" else nlp.model(tokens)
    200     if isinstance(outputs, ModelOutput):
    201         outputs = outputs.to_tuple()

[/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in _call_impl(self, *args, **kwargs)
   1499                 or _global_backward_pre_hooks or _global_backward_hooks
   1500                 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1501             return forward_call(*args, **kwargs)
   1502         # Do not call functions when jit is used
   1503         full_backward_hooks, non_full_backward_hooks = [], []

TypeError: Pix2StructForConditionalGeneration.forward() got an unexpected keyword argument 'input_ids'
```
### Reproduction

```python
from pathlib import Path
from transformers.convert_graph_to_onnx import convert

# Handles all the above steps for you
convert(framework="pt", model='google/pix2struct-docvqa-base', output=Path("onnx/model.onnx"), opset=19)
```

Comments:
Hi @rish-hyun

The ONNX stuff is now migrated to [huggingface/optimum](https://github.com/huggingface/optimum). Could you use the tools provided there? If there is still problem, you can open an issue there.

Thank you for your comprehension.


Okay! By the way, I used this [notebook ](https://github.com/huggingface/notebooks/blob/main/examples/onnx-export.ipynb)