Add ONNX support for Blenderbot and BlenderbotSmall
Author: lewtun
Pull request: yes

# What does this PR do?

This PR adds support to export `blenderbot` and `blenderbot-small` model types.

For the `blenderbot` case, I found that I had to adapt the `_generate_dummy_examples()` functions that we implemented for `bart` to exclude the number of encoder layers when we create the `past_key_values` inputs. 

Without this change, the `past_key_values` shapes between the exported and reference model disagree. I am not 100% sure why this isn't needed for `blenderbot-small` (and other models copied from `bart`), but that's a separate discussion :)

Closes #15757 


Comments:
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_15875). All of your documentation changes will be reflected on that endpoint.

How's the work going for this PR?

> How's the work going for this PR?

The export for `BlenderbotSmall` works well, but `Blenderbot` has some quirks in the way we generate dummy inputs that I'm still trying to iron out. I'll be tackling it again later this week

_The documentation is not available anymore as the PR was closed or merged._

@Darth-Carrotpie feel free to test the `blenderbot` export in this PR. For now you'll need to roll your own decoding (e.g. beam search), but we're currently working making this simple in our `optimum` [library](https://github.com/huggingface/optimum)

Gently pinging @LysandreJik or @sgugger for a final review 🤗 

> @Darth-Carrotpie feel free to test the `blenderbot` export in this PR. For now you'll need to roll your own decoding (e.g. beam search), but we're currently working making this simple in our `optimum` [library](https://github.com/huggingface/optimum)

Hey, it's first time for me trying to test a PR and obviously I'm stuck on an error.
<details>
  <summary>
import tr2 as transformers
</summary>
  
  ```---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
/tmp/ipykernel_33/486683697.py in <module>
      1 #del transformers
----> 2 import tr2 as transformers

/kaggle/working/tr2/__init__.py in <module>
     28 
     29 # Check the dependencies satisfy the minimal versions required.
---> 30 from . import dependency_versions_check
     31 from .utils import (
     32     _LazyModule,

/kaggle/working/tr2/dependency_versions_check.py in <module>
     15 
     16 from .dependency_versions_table import deps
---> 17 from .utils.versions import require_version, require_version_core
     18 
     19 

/kaggle/working/tr2/utils/__init__.py in <module>
     42     to_py_obj,
     43 )
---> 44 from .hub import (
     45     CLOUDFRONT_DISTRIB_PREFIX,
     46     DISABLE_TELEMETRY,

/kaggle/working/tr2/utils/hub.py in <module>
     39 from huggingface_hub import HfFolder, Repository, create_repo, list_repo_files, whoami
     40 from requests.exceptions import HTTPError
---> 41 from transformers.utils.logging import tqdm
     42 
     43 from . import __version__, logging

ImportError: cannot import name 'tqdm' from 'transformers.utils.logging' (/opt/conda/lib/python3.7/site-packages/transformers/utils/logging.py)
  ```
  
</details>

If you could point me to the right direction on what's the best practice to test  🤗 transformers, it'd be much appreciated.

Attempt can be seen in [Kaggle notebook](https://www.kaggle.com/code/danieliusv/blenderbot1-0-test-and-export).

## Import transformers PR to test blenderbot export
1. clone transformers package from https://github.com/huggingface/transformers
2. check out to pr which adds blenderbot support for onnx https://github.com/huggingface/transformers/pull/15875 via commands:
- git fetch origin pull/15875/head
- git checkout -b pullrequest FETCH_HEAD
3. zip it and upload as dataset
4. import...
5. see error....

Hey @Darth-Carrotpie I think the simplest way to test a branch is to install as follows:

```
pip install git+https://github.com/huggingface/transformers.git@add-blenderbot-onnx#egg=transformers[onnx]
```

In any case, all this is getting merged to `main` so you can also just run:

```
pip install git+https://github.com/huggingface/transformers.git#egg=transformers[onnx]
```