RuntimeError with Shared Tensors in DNABERT-2-117M Configuration Using run_mlm.py
RuntimeError: The weights trying to be saved contained shared tensors [{'cls.predictions.decoder.weight', 'bert.embeddings.word_embeddings.weight'}] that are mismatching the transformers base configuration. Try saving using safe_serialization=False or remove this tensor sharing.
When I run run_mlm.py, the following error occurs during train_result = trainer.train(resume_from_checkpoint=checkpoint): I’m using the configuration zhihan1996/DNABERT-2-117M and the BertForMaskedLM model from bert_layers.py.
Did you ever figure this out? I'm running into the same issue.
I'm also hitting the same error. Anyone find a solution?
I seem to have found a workaround by including the --save_safetensors False argument for the run_mlm-mod.py script