A dynamic mask method randomly masked approximately 15% of the tokens in the input ID tensor. The number of masked tokens was rounded based on the number of tokens in the reaction SMILES. To avoid using the same masks for every epoch of training, the method randomly masked the reaction SMILESs iteratively in every epoch, to increase the exposure of every token as a mask.