Open madaanpulkit opened 5 months ago
It's totally safe to turn it to True
. It's just in our examples we generally worked with unidirectional language models and we constructed this DataCollator
for "Causal Language Modeling", hence mlm
parameter is hardcoded to False
. But you can totally use mlm=True
for Masked Language Modeling. You may not even need this particular DataCollator
if you don't have the similar issue with position_ids
. I guess we could have been more comprehensive by calling it DataCollatorForPrivateLanguageModeling
and let the user input the parameter mlm
:)
Why is the
mlm
parameter hardcoded toFalse
inDataCollatorForPrivateCausalLanguageModeling
's implementation? I intend to use theDPCallback
for Masked Language Modeling. Is it unsafe to turn it toTrue
?dp_utils.py#L99