XiangLi1999 / PrefixTuning

Prefix-Tuning: Optimizing Continuous Prompts for Generation
887 stars 161 forks source link

The evaluation code of train.bart #6

Closed probe2 closed 3 years ago

probe2 commented 3 years ago

I noticed that the line of 572 in your seq2seq.finetune use the generate method which is implemented from bart model (huggingface). And the paramaters for generate method is input_ids. I think the self.model.generate only use the part of bartmodel which didn't contain the prompt part and the input of this method also didn't contain the prompt embeddin. And we know that the bartmodel parameters were not been updated during the prefix-tuning process.

Therefore, I am confused about how do you bring the prompt embedding to the evaluation process.