Prompt tuning
Learning a "soft prompt" — a sequence of embedding vectors — instead of hand-writing text instructions.
Think of it like
Instead of typing "Be nice," training the model to recognize a learned signal that means "be nice."
Example
Initialize 20 vectors, train them on your task data, use them as a prefix to the model. Often outperforms hand-crafted prompts.
How it actually works
Soft prompts bypass the discrete token constraint. You optimize vectors end-to-end using gradient descent on your task loss. Pros: often outperforms handwriting, no token budget limits. Cons: less interpretable, not transferable across models, requires labeled data and compute.
For product teams
Better performance for specialized tasks. Faster than fine-tuning.
For engineers
Implement with a trainable embedding layer. Use gradient-based optimization. Save and reload the soft prompt for inference.
Related
- Soft prompts — Related to soft prompts and prefix tuning.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome