flâneur — a map of the web's best reading

Prompt Tuning and Prefix Tuning

ericwiener.github.io · 594 words · saved by 1 readers

The original concept of prompt tuning refers to changing the prompt to the LLM to achieve better modeling results. However, it now means adding learnable prompt tokens to pre-trained models, which are inserted either to input embeddings only or to multiple intermediate layers. The following is an example of hard prompt tuning to achieve a better translation result: Hard prompt tuning is where you directly change the discrete input tokens which are not differentiable. Soft prompt tuning concatenates the embeddings of the input tokens with a trainable tensor that can be optimized via backprop to improve the modeling performance on a target task. You can train a small model for a specific task that learns to generate an output that performs the model’s overall performance. After learning a soft prompt, you have to supply it as a prefix when performing the specific task you finetuned the model on. This allows the model to tailor its responses to that particular task. Moreover, we can have

The original concept of prompt tuning refers to changing the prompt to the LLM to achieve better modeling results. However, it now means adding learnable prompt tokens to pre-trained models, which are inserted either to input embeddings only or to multiple intermediate layers. Hard Prompt Tuning § The following is an example of hard prompt tuning to achieve a better translation result: 1) "Translate the English sentence '{english_sentence}' into German: {german_translation)" 2) "English: '{english_sentence}' | German: (german_translation}" 3) "From English to German: '{english_sentence}' -> {g

Explore this link on the map →

related reading