Fix a bug in t5 beamsearch with half precision (#14436)
the CreateEncoderInputs functor was passed to the ctor as nullptr when
type is MLFloat16.
### Description
<!-- Describe your changes. -->
### 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. -->