Example

Visual Diagram of Soft Prompt Training

The training process for a soft prompt can be visualized as follows: A set of trainable prompt embeddings (p0, p1, ...) is prepended to the standard embeddings of the user's input text (e0, e1, ...). This combined sequence is then processed through the layers of a Large Language Model to generate a prediction. For a given task, such as translating 'Look out!' to '小心!', a loss is calculated by comparing the model's prediction to the ground truth. This loss is then used exclusively to update the trainable prompt embeddings, refining them to better steer the model for the specific task.

0

1

Updated 2025-10-09

Contributors are:

Who are from:

Tags

Ch.4 Alignment - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences