Discrepancy in tokenization results using HF's AlbertTokenizer and sentencepiece library
Hi -

I recently noticed that tokenized results from AlbertTokenizer and sentencepiece library differ for some inputs. Check below:

```
!pip install sentencepiece

import sentencepiece as spm
sp = spm.SentencePieceProcessor()
sp.load('<SPM_MODEL>')
print(sp.encode_as_pieces('3.0,'))
print(sp.encode_as_ids('3.0,'))

Output:
['▁3.0,']
[72369]
```


```
! pip install transformers

from transformers import AlbertTokenizer
tokenizer = AlbertTokenizer.from_pretrained('<SPM_MODEL>')
print(tokenizer._tokenize("3.0,"))
print(tokenizer._convert_token_to_id(tokenizer._tokenize("3.0,")))

Output:
['▁3.0', ',']
[16047, 254713]
```

After looking at AlbertTokenizer codebase, I see that the if condition here is leading to the differences in the outputs above. https://github.com/huggingface/transformers/blob/master/src/transformers/models/albert/tokenization_albert.py#L218

Could you explain the intuition behind having this additional steps in AlbertTokenizer and what purpose do they serve here?


Thanks!
Hello! We strive for perfect reproducibility between the original code and the HF code. This part originates from the original codebase: https://github.com/google-research/albert/blob/master/tokenization.py#L67

I would open an issue there instead. <|||||>Thank you @LysandreJik for the pointer. I wasn't aware that HF implementation is based on google's albert repo. 

Opened a question there: https://github.com/google-research/albert/issues/249

Resolving this issue.

