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

Cannot load quantized Multimodal_audio model using whisper.load_model("quantized-model-path) #1204

Open
Bakht-Ullah opened this issue Feb 27, 2025 · 1 comment
Assignees

Comments

@Bakht-Ullah
Copy link

I quantized whisper medium model using the GPTQ method and saved it. When I want to load the model it through the following error.

RuntimeError: Error(s) in loading state_dict for Whisper:
Missing key(s) in state_dict: "encoder.blocks.0.attn.query.weight", "encoder.blocks.0.attn.key.weight", "encoder.blocks.0.attn.value.weight", "encoder.blocks.0.attn.out.weight", "encoder.blocks.0.mlp.0.weight", "encoder.blocks.0.mlp.2.weight", "encoder.blocks.1.attn.query.weight", "encoder.blocks.1.attn.key.weight", "encoder.blocks.1.attn.value.weight", "encoder.blocks.1.attn.out.weight", "encoder.blocks.1.mlp.0.weight", "encoder.blocks.1.mlp.2.weight", "encoder.blocks.2.attn.query.weight", "encoder.blocks.2.attn.key.weight", "encoder.blocks.2.attn.value.weight", "encoder.blocks.2.attn.out.weight", "encoder.blocks.2.mlp.0.weight", "encoder.blocks.2.mlp.2.weight", "encoder.blocks.3.attn.query.weight", "encoder.blocks.3.attn.key.weight", "encoder.blocks.3.attn.value.weight", "encoder.blocks.3.attn.out.weight", "encoder.blocks.3.mlp.0.weight", "encoder.blocks.3.mlp.2.weight", "encoder.blocks.4.attn.query.weight", "encoder.blocks.4.attn.key.weight", "encoder.blocks.4.attn.value.weight", "encoder.blocks.4.attn.out.weight", "encoder.blocks.4.mlp.0.weight", "encoder.blocks.4.mlp.2.weight", "encoder.blocks.5.attn.query.weight", "encoder.blocks.5.attn.key.weight", "encoder.blocks.5.attn.value.weight", "encoder.blocks.5.attn.out.weight", "encoder.blocks.5.mlp.0.weight", "encoder.blocks.5.mlp.2.weight", "encoder.blocks.6.attn.query.weight", "encoder.blocks.6.attn.key.weight", "encoder.blocks.6.attn.value.weight", "encoder.blocks.6.attn.out.weight", "encoder.blocks.6.mlp.0.weight", "...
Unexpected key(s) in state_dict: "encoder.blocks.0.attn.query.weight_scale", "encoder.blocks.0.attn.query.weight_packed", "encoder.blocks.0.attn.query.weight_shape", "encoder.blocks.0.attn.key.weight_scale", "encoder.blocks.0.attn.key.weight_packed", "encoder.blocks.0.attn.key.weight_shape", "encoder.blocks.0.attn.value.weight_scale", "encoder.blocks.0.attn.value.weight_packed", "encoder.blocks.0.attn.value.weight_shape", "encoder.blocks.0.attn.out.weight_scale", "encoder.blocks.0.attn.out.weight_packed", "encoder.blocks.0.attn.out.weight_shape", "encoder.blocks.0.mlp.0.weight_scale", "encoder.blocks.0.mlp.0.weight_packed", "encoder.blocks.0.mlp.0.weight_shape", "encoder.blocks.0.mlp.2.weight_scale", "encoder.blocks.0.mlp.2.weight_packed", "encoder.blocks.0.mlp.2.weight_shape", "encoder.blocks.1.attn.query.weight_scale", "encoder.blocks.1.attn.query.weight_packed", "encoder.blocks.1.attn.query.weight_shape", "encoder.blocks.1.attn.key.weight_scale", "encoder.blocks.1.attn.key.weight_packed", "encoder.blocks.1.attn.key.weight_shape", "encoder.blocks.1.attn.value.weight_scale", "encoder.blocks.1.attn.value.weight_packed", "encoder.blocks.1.attn.value.weight_shape", "encoder.blocks.1.attn.out.weight_scale", "encoder.blocks.1.attn.out.weight_packed", "encoder.blocks.1.attn.out.weight_shape", "encoder.blocks.1.mlp.0.weight_scale", "encoder.blocks.1.mlp.0.weight_packed", "encoder.blocks.1.mlp.0.weight_shape", "encoder.blocks.1.mlp.2.weight_scale", "encoder.blocks.1.mlp.2.weight...

@brian-dellabetta
Copy link
Collaborator

brian-dellabetta commented Feb 28, 2025

@rahul-tuli is this the error you resolved with this PR into huggingface transformers? If so, @Bakht-Ullah I think you'll have to install transformers from source until a new version is released

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