Knover icon indicating copy to clipboard operation
Knover copied to clipboard

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

Open kiseliu opened this issue 3 years ago • 5 comments

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 avatar May 18 '22 14:05 kiseliu

You need to download the models from this url.

sserdoubleh avatar May 19 '22 03:05 sserdoubleh

Follow this : https://github.com/PaddlePaddle/Knover/blob/develop/projects/PLATO-2/README.md#pre-trained-dialogue-generation-model

sserdoubleh avatar May 19 '22 03:05 sserdoubleh

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?

kiseliu avatar May 19 '22 12:05 kiseliu

Dygraph branch cannot support PLATO-2 now.

sserdoubleh avatar May 20 '22 09:05 sserdoubleh

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

kiseliu avatar Jun 09 '22 12:06 kiseliu