IDEA-Research / IDEA-Research/TOSS

Error when loading pretrained weights

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
24
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Hello, thank you for your great work.

I’m trying to run the model using python app.py, but I encounter the following error when loading the pretrained weights:
RuntimeError: Error(s) in loading state_dict for TOSS: Unexpected key(s) in state_dict: "cond_stage_model.transformer.text_model.embeddings.position_ids"

It seems that the checkpoint contains a key that is not expected by the current model implementation.
Could you please advise how to resolve this issue (e.g., required dependency versions or a recommended workaround)?

Thank you in advance for your help.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running python app.py and inspect the pretrained checkpoint loading path for the TOSS model. Compare the checkpoint's unexpected cond_stage_model.transformer.text_model.embeddings.position_ids key with the current model state dictionary and check the required dependency versions; done means the pretrained weights load without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.