For the error of running the command 'bash ./scripts/local/job.sh ./projects/PLATO-2/pretrain/24L_infer.conf'
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.
You need to download the models from this url.
Follow this : https://github.com/PaddlePaddle/Knover/blob/develop/projects/PLATO-2/README.md#pre-trained-dialogue-generation-model
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?
Dygraph branch cannot support PLATO-2 now.
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