Skip to content

RuntimeError with Shared Tensors in DNABERT-2-117M Configuration Using run_mlm.py #130

Open
@RobinLi7

Description

@RobinLi7

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions