Adding option to truncation from beginning instead of end, for both longest_first and longest_second
# 🚀 Feature request

<!-- A clear and concise description of the feature proposal.
     Please provide a link to the paper and code in case they exist. -->

The current [truncation strategies](https://huggingface.co/transformers/preprocessing.html#everything-you-always-wanted-to-know-about-padding-and-truncation) only provide truncation from end of the input sentence. This may be enough for most cases, but is not applicable for dialog tasks.

Say, you are concatenating an input dialog context to BERT. If the input length > max_length (256/ 512), then the tokens are truncated from the ending i.e. the most recent utterances in the dialog.

In some cases, you want the most recent utterances to be included in the input and if truncation needs to be done, then the oldest utterances be truncated i.e. truncation from the beginning.

This can be done manually in own code base outside of Transformers library, but it's not ideal.

Truncation outside of model will be done most likely on full words to truncate from beginning and fit them to model max length (say you truncate from beginning and reduce input to 254 words). But, these words will be converted to subwords when fed to BertTokenizer and the final input will be > 256, thus resulting in words being dropped from the last utterance again.

To do this properly outside of the Transformers library, one would need to instantiate the same Tokenizer object, tokenize each input and then truncate from beginning, then convert ids back to tokens and then either reconstruct the input from the truncated tokenized version or skip the tokenizer call inside the Transformers library.

## Motivation

<!-- Please outline the motivation for the proposal. Is your feature request
     related to a problem? e.g., I'm always frustrated when [...]. If this is related
     to another GitHub issue, please link here too. -->

## Your contribution

<!-- Is there any way that you could help, e.g. by submitting a PR?
     Make sure to read the CONTRIBUTING.MD readme:
     https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md -->

Previous mention of this idea
https://github.com/huggingface/transformers/issues/4476#issuecomment-677823688<|||||>Here's my workaround (from the previous issue): https://github.com/huggingface/transformers/issues/4476#issuecomment-951445067<|||||>May be of interest to @SaulLu @NielsRogge <|||||>This is indeed a feature that is requested and would make sense to have!

To my knowledge @NielsRogge has started a [PR to add this feature](https://github.com/huggingface/transformers/pull/12913). Unfortunately, the feature requires development also in the Tokenizers library and nobody has yet got the bandwidth to support [the dedicated issue](https://github.com/huggingface/tokenizers/issues/779) for this feature.<|||||>> the feature requires development

Links provided show that only fast tokenizers are stopping this ("requested and would make sense to have" feature) to be implemented ("since july.... July, Karl!"). May this be implemented for ordinary tokenizers faster, and for faster tokenizers later, when they solve dedicated issues?

In my opinion, having left truncation for "slow" tokenizers now, is better than not having one at all (or in distant future releases). It is awaited (https://github.com/huggingface/transformers/issues/4476#event-3364051747) for more than a year now at least.<|||||>Seems this was added in  #14947 about a month ago, so hopefully it will be in a near-future release!