bert icon indicating copy to clipboard operation
bert copied to clipboard

Training WordPiece vocabulary

Open okgrammer opened this issue 8 years ago • 1 comments

Hello, thanks for releasing this code! I need to pretrain a BERT model for non-English language using my own (domain-specific) data. I noticed that the training code for WordPiece vocabulary is not released, although there are a couple open source implementations mentioned in the README. It is however stated that "these are not compatible with our tokenization.py library". May I know whether this means I can't simply feed in the vocab file generated by an external WordPiece library (e.g. tensor2tensor's) as an argument for --vocab_file?

okgrammer avatar Nov 01 '18 05:11 okgrammer

Correct, you can't use tokenizer.py with any of the three libraries I mentioned. You should use the code included in the library to do the tokenization instead. You will also have to do the [CLS] and [SEP] insertion, but that isn't done in tokenizer.py right now anyways.

jacobdevlin-google avatar Nov 01 '18 13:11 jacobdevlin-google