Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the special tokens of XLNet is different from BERT #265

Open
lytum opened this issue May 19, 2020 · 2 comments
Open

the special tokens of XLNet is different from BERT #265

lytum opened this issue May 19, 2020 · 2 comments

Comments

@lytum
Copy link

lytum commented May 19, 2020

hallo everyone,

may i ask you, if the special tokens of XLNet are same as BERT? We all know, the special tokens of BERT are [CLS] and [SEP]. and many public introduction of XLNet also use [CLS] and [SEP] as the special tokens. but I noticed that the official documents of XLNet which use and as their classification and seperate tokens. which is right?

@wangcongcong123
Copy link

Have a look at this.
https://huggingface.co/transformers/model_doc/xlnet.html#xlnettokenizer
Hope it helps.

@lytum
Copy link
Author

lytum commented May 19, 2020

Have a look at this.
https://huggingface.co/transformers/model_doc/xlnet.html#xlnettokenizer
Hope it helps.

Thanks for your information. yes, I also looked at this official documentation. They use
sep_token='< sep >', cls_token='< cls >', as the XLNet special tokens. However, there are many public introduction for fine tuning XLNet, which they still use the same tokens as BERT. such as:

https://github.com/Shivampanwar/Bert-text-classification/blob/master/XLNet/xlnet_experimentation.ipynb

https://mccormickml.com/2019/09/19/XLNet-fine-tuning/

so i am confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants