Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The code could not run #1

Open
accum-dai opened this issue May 29, 2024 · 1 comment
Open

The code could not run #1

accum-dai opened this issue May 29, 2024 · 1 comment

Comments

@accum-dai
Copy link

When I download the checkpoints from the Google Drive, and run python main_noref.py --filename en-common.csv --modelname self_super.ckpt

I got the following error:

UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  return self.fget.__get__(instance, owner)()
Some weights of XLMRobertaModel were not initialized from the model checkpoint at nreimers/mMiniLMv2-L12-H384-distilled-from-XLMR-Large and are newly initialized: ['roberta.pooler.dense.bias', 'roberta.pooler.dense.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
Traceback (most recent call last):
  File "/share5/users/bruce/asr_projects/asr_metric_research/NoRefER/main_noref.py", line 58, in <module>
    model.load_state_dict(model_weights)
  File "/share5/users/bruce/miniconda3/envs/tts/lib/python3.9/site-packages/torch/nn/modules/module.py", line 2152, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for aiXER:
	Unexpected key(s) in state_dict: "model.embeddings.position_ids".
@nicholasneo78
Copy link

try adding this line before model.load_state_dict(model_weights) in main_noref.py line 58:

del checkpoint["state_dict"]['model.embeddings.position_ids']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants