Improving generation
Fix #2554 

TODO:
- add tests on generation

TODO potential:
- this PR could be used to fix #2415 and fix #2482 as well
- add TF 2.0 support for generation
It would be great if this PR could handle the padding index for the models that do not have one. For example, GPT-2 doesn't have a padding index and therefore can't use the `generate` method, nor can it use the `batch_encode_plus` method.<|||||>PR #2885 added the proposed changes.