Allow override inputs to export recipe
Author: guangy10
Pull request: yes

# What does this PR do?

Enable dynamism at seq_len dim in order to utilize parallel `prefill` in the executorch runtime. In this PR,
 - allow caller side to override example inputs, dynamic shapes and strict flag, but keep the default unchanged for BC
 - add unit test to cover export with dynamic shapes, and strict False as it's the mainstream in latest version of `torch.export`
 - make the unit test non-slow, to avoid being skipped on PRs and causing regressions
 - add test for `HybirdCache`

Tests
`pytest tests/utils/test_cache_utils.py -vv -s -k cache_exportability`
```
collected 23 items / 20 deselected / 3 selected

tests/utils/test_cache_utils.py::CacheExportIntegrationTest::test_dynamic_cache_exportability PASSED                                                             [ 33%]
tests/utils/test_cache_utils.py::CacheExportIntegrationTest::test_hybrid_cache_exportability PASSED                                                              [ 66%]
tests/utils/test_cache_utils.py::CacheExportIntegrationTest::test_static_cache_exportability PASSED                                                              [100%]
```


## Before submitting
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.  Needed by the downstream in [optimum-executorch](https://github.com/huggingface/optimum-executorch). https://github.com/huggingface/optimum-executorch/issues/53
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you add new tests? Yes


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker @ydshieh

CC: @tugsbayasgalan 


Comments:
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the `Ready for review` button (at the bottom of the PR page). This will assign reviewers and trigger CI.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_37508). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Other than the nit comments I left, just a question: so this dynamism is necessary if the exported model want to be used to call prompts (i.e. prefill stage) as well as to use the generation steps (here seq=1)?

just a if/else v.s. if/elif/else question and 2 nits, but overall LGTM.

> just a if/else v.s. if/elif/else question and 2 nits, but overall LGTM.

Shared my thoughts here: https://github.com/huggingface/transformers/pull/37508#discussion_r2047455608. Just in case you missed it. Let me know you thoughts

More comments on this PR? Can we merge it if no?

I will rebase this PR since https://github.com/huggingface/transformers/pull/37728 has been merged

> LGTM ! Please fix the conflits and we are good to merge

Couple updates:
  - Added a non-slow test to cover export for hybird cache
  - Rebased to latest trunk
  
@SunMarc @ydshieh Let me know if there are new comments

Thanks