Architectural Edge: Deeper Adaptation of Prefix Tuning

While Prompt Tuning adds learnable vectors solely to input embeddings, Prefix Tuning injects trainable parameters into the key and value matrices of *each* transformer attention layer, granting more granular control over the model's internal representations.

The top 3

  1. P-tuning v2: Layer-Wise Prompt Injection for Deep Adaptation: P-tuning v2 significantly enhances prefix tuning by injecting continuous, trainable prompts at every transformer layer, rather than just the input layer. This 'deep prompt tuning' allows for more direct and pervasive influence over the model's internal computations, achieving fine-tuning comparable performance across various NLU tasks and model scales.
  2. Architectural Mechanism: Prefix Injection in Attention Layers: To achieve deeper adaptation, techniques like P-tuning v2 implement layer-wise prefix injection by prepending learnable continuous vectors directly to the key and value tensors within the self-attention mechanism of each transformer layer. This method allows the prefixes to influence the model's contextual understanding at multiple processing stages.
  3. Performance Edge: Matching Fine-Tuning with Minimal Parameters: Deeper prefix adaptation, exemplified by P-tuning v2, demonstrates a significant performance edge by matching the capabilities of full fine-tuning. It achieves this on diverse tasks, including complex NLU and sequence tagging, and across models ranging from 300M to 10B parameters, while only optimizing a tiny fraction (0.1% to 3%) of the total model parameters.

Sources

Open the full topic