-
Notifications
You must be signed in to change notification settings - Fork 462
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
size mismatch for encoder.model.layers.1.downsample.norm.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]). #206
Comments
ignore_mismatched_sizes=True |
Hi, thank you for bringing this issue to our attention. It appears that the problem is likely related to the environment configuration. We will resolve this issue, while also updating the repository accordingly. In the meantime, we kindly request you to refer to the recently updated Google Colab demos and verify that the versions of the essential libraries are in alignment. You can find the necessary information at this link: GitHub Issue Comment |
the google colab demo has the same size mismatch issue too. I have reproduced the error in the "colab-demo-for-donut-base-finetuned-docvqa.ipynb" too. /usr/local/lib/python3.10/dist-packages/transformers/modeling_utils.py in _load_pretrained_model(cls, model, state_dict, loaded_keys, resolved_archive_file, pretrained_model_name_or_path, ignore_mismatched_sizes, sharded_metadata, _fast_init, low_cpu_mem_usage, device_map, offload_folder, offload_state_dict, dtype, is_quantized, keep_in_fp32_modules) RuntimeError: Error(s) in loading state_dict for DonutModel: |
any update for this? |
any update on this? Tried multiple versions of timm and transformers and still getting the same error |
Be sure to have the proper version: !pip install transformers==4.25.1 and compare the app code with the corresponding Google Colab notebook |
size mismatch for encoder.model.layers.1.downsample.norm.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
Getting this error at line no: 596 in model.py
model = super(DonutModel, cls).from_pretrained(pretrained_model_name_or_path, revision="official", *model_args, **kwargs)
The text was updated successfully, but these errors were encountered: