Newly trained tokenizers not adding [CLS] and [SEP] tokens
Author: fgaim
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->

- `transformers` version: 4.10.0.dev0 (installed from source)
- Platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic (Google Colab)
- Python version: 3.7.11
- PyTorch version (GPU?): 1.9.0+cu102 (True)
- Tensorflow version (GPU?): 2.5.0 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No
- `tokenizers` version: 0.10.3

### Who can help
 @patrickvonplaten, @LysandreJik

## Information

Running into an issue with the newly trained tokenizers not being able to add the '[CLS]' and '[SEP]' special tokens, even after explicitly setting `add_special_tokens=True`.

The problem arises when using:
* [x] the official example scripts: `run_qa.py`
* [x] my own modified scripts: (see snippets below)

The tasks I am working on is:
* [x] an official GLUE/SQUaD task: SQuAD
* [ ] my own task or dataset: (give details below)

## To reproduce

Steps to reproduce the behavior:

```python
from transformers import AutoTokenizer
swahili_tokenizer = AutoTokenizer.from_pretrained("flax-community/bert-base-uncased-swahili")
swahili_tokenizer.tokenize('Si kila mwenye makucha simba.', add_special_tokens=True)

# Output:
['si', 'kila', 'mwenye', 'makucha', 'simba', '.']

# Expected:
['[CLS]', 'si', 'kila', 'mwenye', 'makucha', 'simba', '.', '[SEP]']
```

This is not only happening to this specific BERT tokenizer, the same was observed to RoBERTa tokenizers, and potentially other models as well.

The issue crashes fine-tuning for QA using the official `run_qa.py` script.

For example,
```sh
cd transformers/examples/pytorch/question-answering
python run_qa.py \
  --model_name_or_path 'flax-community/bert-base-uncased-swahili' \
  --dataset_name squad_v2 \
  --do_train \
  --do_eval \
  --per_device_train_batch_size 4 \
  --learning_rate 3e-5 \
  --num_train_epochs 2 \
  --max_seq_length 128 \
  --doc_stride 32 \
  --output_dir /tmp/debug_squad/
```

... halts by throwing an exception:

```python
Traceback (most recent call last):
  File "run_qa.py", line 645, in <module>
    main()
  File "run_qa.py", line 433, in main
    desc="Running tokenizer on train dataset",
  File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py", line 1682, in map
    desc=desc,
  File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py", line 185, in wrapper
    out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/datasets/fingerprint.py", line 397, in wrapper
    out = func(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py", line 2020, in _map_single
    offset=offset,
  File "/usr/local/lib/python3.7/dist-packages/datasets/arrow_dataset.py", line 1906, in apply_function_on_filtered_inputs
    function(*fn_args, effective_indices, **fn_kwargs) if with_indices else function(*fn_args, **fn_kwargs)
  File "run_qa.py", line 375, in prepare_train_features
    cls_index = input_ids.index(tokenizer.cls_token_id)
ValueError: 2 is not in list
```

The script that was used to train the tokenizer could be found [here](https://huggingface.co/flax-community/bert-base-uncased-swahili/blob/main/train_tokenizer.py).

For more example, see this [colab notebook](https://colab.research.google.com/drive/1cjof6VJYwXIijwqW7kFcjo4IrjY08xkT?usp=sharing).

## Expected behavior

When setting `add_special_tokens=True` the tokenizer is expected to add `'[CLS]'` and `'[SEP]'` tokens.

Here is an old tokenizer that behaves as expected:
```python
from transformers import AutoTokenizer

bert_tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
bert_tokenizer.tokenize('Si kila mwenye makucha simba.', add_special_tokens=True)

# Output:
['[CLS]', 'si', 'ki', '##la', 'mw', '##en', '##ye', 'ma', '##ku', '##cha', 'sim', '##ba', '.', '[SEP]']
```

Thank you!

Comments:
Hello! Looking at your `train_tokenizer.py` file, I see no post-processor. Without a post-processor, the tokenizer is unaware of what tokens it should add after tokenizing.

See the quick tour of the tokenizers library here: https://huggingface.co/docs/tokenizers/python/latest/quicktour.html#post-processing

@LysandreJik, thank you for the answer. That was on point. 

I trained a new tokenizer with pos_processor and it worked as expected.