Ignore small batches of examples for CLM training
# What does this PR do?

Fix #17875.

In https://github.com/huggingface/transformers/blob/a5d504834d01dd1c7edf7c46d93c080cb5274eec/examples/pytorch/language-modeling/run_clm.py#L440

we drop remainder when `if total_length >= block_size`. However, If a batch of examples is too small to have long enough length, that batch will be used. If the whole dataset has only that batch, it is fine. Otherwise, we might get examples of different lengths, and get an error `expected sequence of length X at dim 1 (got Y) during training`.

The same question is also asked on [StackOverflow](https://stackoverflow.com/questions/71166789/huggingface-valueerror-expected-sequence-of-length-165-at-dim-1-got-128).

With this fix, an edge case is that the whole dataset is dropped (if it contains only small batches that are all dropped) - but this is very unlikely. **We can throw an error in this case however**.

**Once the fix is approved, I can apply the same change to TF/Flax example scripts too (if relevant there)**
_The documentation is not available anymore as the PR was closed or merged._<|||||>I was thinking to throw an error with some information. But since this has been discussed several times and the decision is made, I am going to close this PR.<|||||>If you throw an error later on if the dataset is empty, that fix then works for me (but there is a simpler way which is just to remove the test).