Handle padding warning in generation when using `inputs_embeds`
# What does this PR do?

Fixes: #23042
if `input_ids` was given, check if the last id in any sequence is `pad_token_id`
if `inputs_embeds` was given, check if the last embed in any sequence is *all* zeros

- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      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.](https://github.com/huggingface/transformers/issues/23042)
- [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).
- [ ] Did you write any new necessary tests?

cc @gante<|||||>_The documentation is not available anymore as the PR was closed or merged._<|||||>> Why not simply add `and len(inputs_tensor.shape) == 2` to the `if`? Short, clear code is easier to maintain 🙌

Just adding `and len(inputs_tensor.shape) == 2` wouldn't print the warning if using `inputs_embeds`. Would you prefer that behaviour? Also, this logic would fail if the pad token for some embedding is **not** a tensor full of the `pad_token_id`.<|||||>> Just adding and len(inputs_tensor.shape) == 2 wouldn't print the warning if using inputs_embeds. Would you prefer that behaviour? Also, this logic would fail if the pad token for some embedding is not a tensor full of the pad_token_id.

Yeah, I'd prefer the shorter version with the `len(inputs_tensor.shape) == 2` check only. The reason being that although it is less precise, using the embeddings as an input is an advanced use case, for which we tend to be more hands-off. It also makes the code shorter and, therefore, more readable :)

(if we were to make complete checks at all points, the code would quickly become unmaintainable)<|||||>Alright, I've changed the logic to be very simple now. It just doesn't check this condition if `inputs_embeds` was passed.<|||||>@zrthxn this PR needs to be rebased with `main` -- we fixed a dependency issue that's showing up on the CI down here 😬 apologies for the extra work!<|||||>@gante no problem! Just did that. 