Closed M1n9X closed 1 year ago
I met this error, too. The error is caused by the change of config.vocab_size
. Just reload the config again before initializing the model_finetuned
.
You can copy line 213 and paste it before line 219.
I met this error, too. The error is caused by the change of
config.vocab_size
. Just reload the config again before initializing themodel_finetuned
. You can copy line 213 and paste it before line 219.
Thanks for the info. Now it works.
Based on your suggestion, i find that the root cause is in the get_model
method, i use a variable to hold the original value of config.vocab_size
and reset it after tokenizer related operation.
Hi,
I tried to reproduce the whole process on a 8xV100 server with following command:
After successfully finetuning the model in step 1, i tried to evaluate the model, but an error occurred:
Then i tried different configurations, but the error still exists.
--model_name_or_path_baseline
and--model_name_or_path_finetune
tofacebook/opt-1.3b
orfacebook/opt-13b
, with exactly the same error as above;After adding
ignore_mismatched_sizes=True
in the modelfrom_pretrained
method, the evaluation--model_name_or_path_baseline
and--model_name_or_path_finetune
are set tofacebook/opt-1.3b
--model_name_or_path_baseline
and--model_name_or_path_finetune
are set tofacebook/opt-13b
--model_name_or_path_baseline
tofacebook/opt-13b
and--model_name_or_path_finetune
to the sft model path:this time, the same error occurred for above two failure cases
Packages' versions:
BTW, i noticed some info for step 2 about
--num_padding_at_beginning
argument, is there anything similar in step 1, e.g. padding or something else that could result in the size mismatch error (50272 vs 50265)?So how should i evaluate the sft model? Thanks in advance.