# What does this PR do?
Fixes #22312.
After internal discussions, it appears that adding the possibility to pad with `-1`  to `tokenizers` is not really feasible ( nor is it desirable). 
However, what we can do is by default resize the embedding layer to the nearest size that is optimal for the dtype of the model [following this](https://docs.nvidia.com/deeplearning/performance/dl-performance-matrix-multiplication/index.html#requirements-tc).

Motivations:
- the `_get_resized_embeddings` is not exposed, and thus making this automatic can be a big silent win. 
- if properly documented, should not really have issues. 

Cons:
- it is not backward compatible, so some kind of `config.optimise_resize` might be needed? 
- it is hidden and people might not really get why tokenizer.vocab_size will be different than the model's embedding dimension. 
[`resize_embedding`] Introduce `pad_to_multiple_of` and guidance. # What does this PR do?
Fixes #22312.
After internal discussions, it appears that adding the possibility to pad with `-1`  to `tokenizers` is not really feasible ( nor is it desirable). 
However, what we can do is by default resize the embedding layer to the nearest size that is optimal for the dtype of the model [following this](https://docs.nvidia.com/deeplearning/performance/dl-performance-matrix-multiplication/index.html#requirements-tc).

Motivations:
- the `_get_resized_embeddings` is not exposed, and thus making this automatic can be a big silent win. 
- if properly documented, should not really have issues. 

Cons:
- it is not backward compatible, so some kind of `config.optimise_resize` might be needed? 
- it is hidden and people might not really get why tokenizer.vocab_size will be different than the model's embedding dimension. 
- sections:
  - local: index
    title: 🤗 Transformers
  - local: quicktour
    title: Schnellstart
  - local: installation
    title: Installation
  title: Erste Schritte
- sections:
  - local: pipeline_tutorial
    title: Pipelines für Inferenzen
  - local: autoclass_tutorial
    title: Laden von vortrainierten Instanzen mit einer AutoClass
  - local: preprocessing
    title: Vorverarbeiten
  - local: training
    title: Optimierung eines vortrainierten Modells
  - local: accelerate
    title: Verteiltes Training mit 🤗 Accelerate
  - local: model_sharing
    title: Ein Modell teilen
  title: Tutorials

- sections:
  - local: index
    title: 🤗 Transformers
  - local: quicktour
    title: Schnellstart
  - local: installation
    title: Installation
  title: Erste Schritte
- sections:
  - local: pipeline_tutorial
    title: Pipelines für Inferenzen
  - local: autoclass_tutorial
    title: Laden von vortrainierten Instanzen mit einer AutoClass
  - local: preprocessing
    title: Vorverarbeiten
  - local: training
    title: Optimierung eines vortrainierten Modells
  - local: accelerate
    title: Verteiltes Training mit 🤗 Accelerate
  - local: model_sharing
    title: Ein Modell teilen
  title: Tutorials
