-
Notifications
You must be signed in to change notification settings - Fork 206
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
How to implement fine-tuned model by myself? #137
Comments
I used followed function to load pre-trained model, and got some errors en2zh = TransformerModel.from_pretrained("./", <in fairseq 0.71, same as MASS>NotImplementedError Traceback (most recent call last) /opt/conda/lib/python3.7/site-packages/fairseq/models/fairseq_model.py in from_pretrained(cls, model_name_or_path, checkpoint_file, data_name_or_path, **kwargs) /opt/conda/lib/python3.7/site-packages/fairseq/hub_utils.py in init(self, args, task, models) /opt/conda/lib/python3.7/site-packages/fairseq/tasks/fairseq_task.py in source_dictionary(self) NotImplementedError: <fairseq 0.9.0>RuntimeError Traceback (most recent call last) ~/fairseq/fairseq/models/fairseq_model.py in from_pretrained(cls, model_name_or_path, checkpoint_file, data_name_or_path, **kwargs) ~/fairseq/fairseq/hub_utils.py in from_pretrained(model_name_or_path, checkpoint_file, data_name_or_path, archive_map, **kwargs) ~/fairseq/fairseq/checkpoint_utils.py in load_model_ensemble_and_task(filenames, arg_overrides, task, strict, suffix) ~/fairseq/fairseq/models/fairseq_model.py in load_state_dict(self, state_dict, strict, args) ~/miniconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict) RuntimeError: Error(s) in loading state_dict for XTransformerModel: Any help please? |
Hello, thanks for sharing this awesome project at first :)
I have fine-tuned the supNMT pre-trained model and save the checkpoint out there. Now I want to build a model out of MASS directory and implement it on a chatbot to use with my friends. I'm not familiar with fairseq module. How should I do, any suggestion?
e.g. I have the weights but I don't know how to build the model and load it. I found the build_model function in xmasked_seq2seq.py but I don't know how to do next.
The text was updated successfully, but these errors were encountered: