fix past-kv in general LLM exporter (#18529)
### Description
<!-- Describe your changes. -->
For some models, we need to re run model.forward to get past-kv
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->