Herbert polish model
The HerBERT model is a transformer model pretrained using masked language modeling (MLM) and Sentence Structural (SSO) objectives for the Polish language. 

It was added to the library in PyTorch with the following checkpoints:

- `allegro/herbert-base-cased`
- `allegro/herbert-large-cased`


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dimiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md#start-contributing-pull-requests), 
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to the it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/master/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/master/docs#writing-source-documentation).
- [x] Did you write any new necessary tests? 


## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors which may be interested in your PR.
@patrickvonplaten
@julien-c
@LysandreJik 

Great point! I've already simplified the code and left only the tokenizer. Ideally, `XLMTokenizer` should have a converter to the appropriate `Fast` class. On second thought, I can see the problem would be to program the Moses pretokenization in the `tokenizers` library.<|||||>Hi @rmroczkowski 

As far as I know, you employed fastBPE to train a tokenizer: https://github.com/huggingface/transformers/tree/b23d3a5ad4aa08decd10671f85be5950767dd052/model_cards/allegro/herbert-klej-cased-tokenizer-v1

I also employed fastBPE for the Vietnamese BERT-based tokenizer (i.e. PhoBERTTokenizer https://github.com/huggingface/transformers/pull/6129 ), but I am still struggling to implement a fast tokenizer based on fastBPE, e.g. handling the suffix "@@" of subword tokens. In particular, given https://huggingface.co/vinai/phobert-base/tree/main I can convert "bpe.codes" into a "merge.txt"-style file, but I am not sure about how to convert our "vocab.txt" into your "vocab.json"-style file.

How can you convert your fastBPE's code and vocab outputs into HuggingFace's tokenizers? So that you can call the tokenizer with the use_fast=True option.  

cc: @LysandreJik  is there any idea for implementing a fast version of a fastBPE-based slow one?

Thank you both.



