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

Missing weights in model checkpoint #33995

Closed
4 tasks
uililo opened this issue Oct 6, 2024 · 6 comments
Closed
4 tasks

Missing weights in model checkpoint #33995

uililo opened this issue Oct 6, 2024 · 6 comments

Comments

@uililo
Copy link

uililo commented Oct 6, 2024

System Info

When trying to load a pretrained wav2vec2 checkpoint, I got the following warning:

warnings.warn(
Some weights of Wav2Vec2Model were not initialized from the model checkpoint at facebook/wav2vec2-base and are newly initialized: ['wav2vec2.encoder.pos_conv_embed.conv.parametrizations.weight.original0', 'wav2vec2.encoder.pos_conv_embed.conv.parametrizations.weight.original1']
You should probably TRAIN this model on a downstream task to be able to use it for predictions and inference.

Theoretically it should be possible to extract embeddings from this pre-trained model without fine-tuning on downstream tasks, however it seems that some weights are missing. I'm not sure whether the problem is with the Wav2Vec2Model class or the checkpoint.
I got the same warning when I tried to load some other checkpoints of wav2vec2 models published by facebook.

Thanks

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

model_name = "facebook/wav2vec2-base"
feature_extractor = Wav2Vec2FeatureExtractor.from_pretrained(model_name)
model = Wav2Vec2Model.from_pretrained(model_name)

Expected behavior

The pretrained model is successfully loaded into "model" without needing to initialize some of the weights

@uililo uililo added the bug label Oct 6, 2024
@akshit397a
Copy link

Hey @uililo ,
i want to work on this issue.

@akshit397a
Copy link

-can you tell the file location

@uililo
Copy link
Author

uililo commented Oct 6, 2024

location of which file?

@subasine1
Copy link

Hello @uililo,

Don't worry about it. This is a harmless warning. It's because of the migration of parameter names between different versions of the transformers library.
You can see a similar issue here: #26796 (comment)

Take care

@narnia24
Copy link

hey @uililo can i work on this issue?

Copy link

github-actions bot commented Nov 6, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

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

No branches or pull requests

5 participants