THUDM / P-tuning

A novel method to tune language models. Codes and datasets for paper ``GPT understands, too''.
MIT License
912 stars 111 forks source link

P-tuning中模型参数冷冻的问题 #42

Open YCC-324 opened 1 year ago

YCC-324 commented 1 year ago

您好,我理解的p-tuning的原理是冷冻后面大语言模型,只调整前面的prompt embedding模型。但是在您代码的实现中(https://github.com/THUDM/P-tuning/blob/main/PT-Fewshot/pet/wrapper.py 中optimizer部分) 同时对后面大语言模型的参数进行了微调,想问下这部分是我理解错了吗

Deerkangkang commented 1 year ago

我理解意义上也是需要对整体模型进行微调

qiuwenbogdut commented 1 year ago

您好,我理解的p-tuning的原理是冷冻后面大语言模型,只调整前面的prompt embedding模型。但是在您代码的实现中(https://github.com/THUDM/P-tuning/blob/main/PT-Fewshot/pet/wrapper.py 中optimizer部分) 同时对后面大语言模型的参数进行了微调,想问下这部分是我理解错了吗

可以参考一下之前的一个issue https://github.com/THUDM/P-tuning/issues/4

image