What is suitable max_predictions_per_seq size when max_seq_length set to 512?
I'm trying to pre-train BERT on my own language.
I am aware that:
The max_predictions_per_seq is the maximum number of masked LM predictions per sequence. You should set this to around max_seq_length * masked_lm_prob (the script doesn't do that automatically because the exact value needs to be passed to both scripts).
In this case, I could set the max_predictions_per_seq=~77 when max_seq_length=512. But it's not clearly mentioned neither on the original paper nor on this documentation. I'm wondering if anyone created TFrecords with max_predictions_per_seq=77 and max_seq_length=512 and trained in this setting, whether it was better than max_predictions_per_seq=20 when max_seq_length=128. @jacobdevlin-google can you share the details please?
Hello @enod, I also have the same query. Did you get any answers?
@jicksonp I didn't. Ended up with setting max_predictions_per_seq=~77
This is explained in the README from this repo in the Pre-training with BERT part:

If the rule is clear, then what does the max_predictions_per_seq do? Why do we need to manually set it?