YouTokenToMe icon indicating copy to clipboard operation
YouTokenToMe copied to clipboard

Add an option to predefine special tokens

Open Kyeongpil opened this issue 4 years ago • 4 comments

I want to use this yttm model.

However, I want to add [MASK] token to the vocabulary.

In this case, How can I predefine special tokens?

Kyeongpil avatar Nov 15 '19 07:11 Kyeongpil

We don't support this feature right now. Maybe it will be added later.

You can use the following workaround. Just append this special token in the end of your training text many times (for example 1000). In this case the model will definitely add it to vocabulary.

xbelonogov avatar Nov 15 '19 09:11 xbelonogov

@xbelonogov Thank you for your kind response.

I'll be looking forward this feature to be added. Because many language models such as BERT needs special tokens such as cls, sep, mask.

Kyeongpil avatar Nov 15 '19 09:11 Kyeongpil

We would also find this option very useful 👍 The workaround to have 1000 special tokens at the beginning is fine if there are just a few tokens, but is inconvenient when we want to provide a large set of words that should never be split.

glample avatar Sep 11 '20 08:09 glample

Any progress on this ? 😊

miguelvictor avatar Mar 10 '21 10:03 miguelvictor