BertTokenizerFast can not tokenize [MASK] to 4 id
I'm training a bert model and  bert tokenizer from scratch on my custom dataset. I'm using BertWordPieceTokenizer to train and BertTokenizerFast to load it. But BertTokenizerFast cannot convert [MASK] token to 4 id. When I try to use BertTokenizer, it works but the process of training model is very slow. Here is my code:

```py
from tokenizers import BertWordPieceTokenizer
tokenizer = BertWordPieceTokenizer(
    clean_text=True,
    strip_accents=False,
    lowercase=False,
)
tokenizer.train(
    "./data/bert/training_data.txt",
    vocab_size=30000,
    min_frequency=2,
    show_progress=True,
    special_tokens=["[PAD]", "[UNK]", "[CLS]", "[SEP]", "[MASK]"],
    limit_alphabet=1000,
    wordpieces_prefix="##",
)
from transformers import BertTokenizerFast
tokenizer = BertTokenizerFast(
    vocab_file= "bert_tokenizer/vocab.txt",
    do_lower_case = False,
    max_len=128
)
```
After that I try encode a string with [MASK] token like this
```
tokenizer.encode("Hapi [MASK] cá thát lát rút xương ướp sả 250g")
[2, 5656, 55, 5078, 56, 608, 1829, 730, 789, 906, 1527, 1150, 644, 3]
```
It returns a result that not including id 4 for [MASK] token

Could you please tell me how to fix this problem? Because i'd like to use BertTokenizerFast to boost speed of my training process Thank you.
You're loading the `vocab.txt` file and nothing else into the `BertTokenizerFast` so it is unaware of what the special tokens are.

Did you try saving the `tokenizers`' tokenizer object (as a `tokenizer.json` file) and loading that in the `BertTokenizerFast`?<|||||>> You're loading the `vocab.txt` file and nothing else into the `BertTokenizerFast` so it is unaware of what the special tokens are.
> 
> Did you try saving the `tokenizers`' tokenizer object (as a `tokenizer.json` file) and loading that in the `BertTokenizerFast`?

Thanks for your response. It works well if I use `BertTokenizerFast.from_pretrained()`