THUDM / P-tuning-v2

An optimized deep prompt tuning strategy comparable to fine-tuning across scales and tasks
Apache License 2.0
1.98k stars 202 forks source link

past_key_values=past_key_values #14

Closed Coding-Zuo closed 2 years ago

Coding-Zuo commented 2 years ago

Hi, I found in the official huggingface documentation that this “past_key_values=past_key_values” parameter is only useful for accelerating precompute. Can you please explain which is p-tuning v2, prefix or prompt?

Why do I think Deep Prompt Tuning is --prompt instead of --prefix?

Thank you for your code contributions.

Xiao9905 commented 2 years ago

Hi, You need to understand how past_key_values really functions in the attention computation, which is an implementation trick we inherit from prefix tuning. --prefix does refer to deep prompt tuning, and --prompt refer to prompt tuning.