Skip to content

The pre-trained weight file (checkpoint) does not match the model architecture defined by your current code. #6

Open

Description

@LTC232

Thank you for your research contributions and for open-sourcing the code in this field. However, when we tried to run “python run.py --cfg configs/liger_gla.yaml” and “python run.py --cfg configs/liger_gsa.yaml” (https://huggingface.co/linear-moe-hub/Liger-GLA-8B), we encountered the following error for both:
“
raise RuntimeError(
RuntimeError: Error(s) in loading state_dict for Embedding:
size mismatch for weight: copying a param with shape torch.Size([128256, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).”

This seems to indicate a discrepancy between the model configuration provided by the project and the checkpoint weights. Could you please provide a solution?

Looking forward to your reply. Best wishes for your work!

Activity

  1. weigao266 commented on Dec 8, 2025

    @weigao266
    Collaborator

    Thanks for trying our work. Could you checkout to the liger_paper branch and try it again?

  2. LTC232 commented on Dec 9, 2025

    @LTC232
    Author

    Thank you for your reply. We have resolved the model loading issue, but now we're encountering a new problem: When we run the command “python run.py --cfg configs/liger_gla.yaml”, the code executes until the LigerGLADecoderLayer class. Since it lacks a forward method, it proceeds to execute the forward method of its parent class LlamaDecoderLayer, which calls self_attn and causes an error. Could you provide an implementation of the forward method for the LigerGLADecoderLayer class?

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

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