huggingface/pytorch-openai-transformer-lm

help to understand bpe logic

BogdanDidenko opened this issue · 2 comments

Hello. Sorry, but i can't understand how this function work. In my tests in most cases the result is equal to original token parameter value.
https://github.com/openai/finetune-transformer-lm/blob/master/text_utils.py#L49

Same question.

Hi, so all these bpe logic is taken from Sennrich's work.

For more information you should:

Related and a bit more recent: https://github.com/google/sentencepiece