Open DZ9 opened 4 months ago
anybody can please help with this?
Did you try with strict=False
?
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 common.pt
and metadata.json
Did you try with
strict=False
?
yes, it didn't work either
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
common.pt
andmetadata.json
yes it is a mcore based model
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.
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?
Running into similar issue here - Any leads? Removing the rm head will damage the model itself no?
Running into similar issue here - Any leads? Removing the rm head will damage the model itself no?
It would help to share exact steps (including which container is used and version of NeMo-Aligner) so as to be able to reproduce this issue.
I'm not actually sure what you mean by "removing the RM head" either -- obviously without the head you wouldn't be able to use the model, but if it's just a temporary hack to skip trying to restore the head during loading of the model, it shouldn't matter (because the RM head doesn't exist in the SFT checkpoint anyway, it's supposed to get initialized randomly when initializing from an SFT model).
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?