-
Notifications
You must be signed in to change notification settings - Fork 41
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 reward model from SFT model because of missing keys #137
Comments
anybody can please help with this? |
Did you try with |
do you know if this is a mcore based model? and is this SFTed with aligner? you can tell if it's a mcore based model by looking at the model_weights directory it should have |
yes, it didn't work either |
I manually deleted all rm_head related keys during restore and it now works fine. But I think it is a bug imported because of change of megatron. |
ah okay! that's good to know. can you elaborate on the change of megatron? was your model SFTed in a previous container? |
To elaborate, it'd be helpful if you could share the exact steps you used when you said "I converted a llama model to nemo", so that we can reproduce the issue. Which container did you use and which commands did you run? |
I converted a llama model to nemo, with model dirs like below:
When I tried to load it to train a reward model, I got missing keys error. I load it from the default config, set
load_base_model_only=True
, the total load code is as below:ptl_model = load_from_nemo( reward_model_cls, cfg.model, trainer, strict=True, load_base_model_only=True, restore_path=cfg.pretrained_checkpoint.restore_from_path, )
And then I got the error below, any advice on how to load a pretrained non-reward model to train as a reward model in Nemo?
The text was updated successfully, but these errors were encountered: