thunlp/Prompt-Transferability

Report Bug in cross-model transfer

Celine-hxy opened this issue · 2 comments

crossPrompt.py line317
mask_logits = logits[:, 0] should be modified to mask_logits = logits[:, 100] because there are 100 prompt tokens in the front.

crossPromptT5.py line 96~98:
self.encoder.prompt_embeddings.weight.data = target_prompt
self.encoder.encoder.prompt_tokens.weight.data = target_prompt
self.encoder.decoder.prompt_tokens.weight.data = target_prompt

Assigning weights in this way will result in grad_ fn lost. Hence gradient cannot be backpropagated.

@Celine-hxy these bugs are already fixed.