bert icon indicating copy to clipboard operation
bert copied to clipboard

if we only use mask LM in training and disable the'next sentence', how should I modify the create_pretraining_data.py

Open SeekPoint opened this issue 7 years ago • 1 comments

in pre-training code, I figure out just disable the 'next sentence loss' code

SeekPoint avatar Apr 06 '19 08:04 SeekPoint

change line 274 from "if len(current_chunk) == 1 or rng.random() < 0.5" to "if len(current_chunk) == 1" may help your problem. all next_sentence labels are 0 now.

vincehxb avatar Apr 10 '19 07:04 vincehxb