Skip to content
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

For the error of running the command 'bash ./scripts/local/job.sh ./projects/PLATO-2/pretrain/24L_infer.conf' #138

Open
kiseliu opened this issue May 18, 2022 · 5 comments

Comments

@kiseliu
Copy link

kiseliu commented May 18, 2022

For the following parameters in the config of https://github.com/PaddlePaddle/Knover/blob/develop/projects/PLATO-2/pretrain/24L_infer.conf:

16 init_params="./24L/Plato"
17 nsp_init_params="./24L/NSP"

How can I get these two models? Do I need transform from the model https://dialogue.bj.bcebos.com/Knover/projects/PLATO-2/24L.tar to get them by myself.

@kiseliu kiseliu changed the title For the error of running the script of https://github.com/PaddlePaddle/Knover/blob/develop/projects/PLATO-2/pretrain/24L_infer.conf For the error of running the command bash ./scripts/local/job.sh ./projects/PLATO-2/pretrain/24L_infer.conf May 18, 2022
@kiseliu kiseliu changed the title For the error of running the command bash ./scripts/local/job.sh ./projects/PLATO-2/pretrain/24L_infer.conf For the error of running the command 'bash ./scripts/local/job.sh ./projects/PLATO-2/pretrain/24L_infer.conf' May 18, 2022
@sserdoubleh
Copy link
Collaborator

You need to download the models from this url.

@kiseliu
Copy link
Author

kiseliu commented May 19, 2022

Sorry, I just found that the model file I used is from PaddleNLP

wget https://bj.bcebos.com/paddlenlp/models/transformers/plato2/24L.pdparams.

This problem is solved, thanks a lot.

But there has another question. Could you provide me a script to transform the model file "./24L/Plato" to dygraph format?

@sserdoubleh
Copy link
Collaborator

Dygraph branch cannot support PLATO-2 now.

@kiseliu
Copy link
Author

kiseliu commented Jun 9, 2022

I found that I can use the following code to transform the model file "./24L/Plato" to dygraph format.

282        fluid.io.load_vars(
283            self.exe,
284            model_path,
285            main_program=self.program,
286            predicate=__predicate__)
287        fluid.io.save(self.program.static_dict(), 'outputs/PLATO')    # For stage 2.1, we transform the PLATO model.

Adding the line 287 to the file of https://github.com/PaddlePaddle/Knover/blob/develop/knover/core/model.py.

Then we can have three files saved in 'outputs/PLATO':

PLATO.pdmodel
PLATO.pddot
PLATO.pdparams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants