Apply attention weights to prompt tokens
mainYou can increase or decrease the importance of specific words or phrases in a prompt using attention weights. Weights can be applied to single words or groups of words enclosed in parentheses.
Weighting Methods
- Incremental Symbols: Use
+to increase importance and-to decrease it. Multiple symbols stack multiplicatively (e.g.,++is more powerful than+).+is equivalent to a weight of1.1.-is equivalent to a weight of0.9.
- Explicit Numerical Weights: Use a number between
0and2(where1is the default) to set an exact importance level.(token)0.5reduces importance to half.(token)1.5increases importance by 1.5x.
Syntax Rules
- Single words:
word+orword-. - Phrases: Use parentheses to group words before applying the weight, e.g.,
(picking apricots)+. - Nesting: You can nest weights. For example,
(picking (apricots)1.3)1.1applies a 1.3 weight to apricots, and then applies a 1.1 weight to the entire group.
a tall thin man (picking apricots)1.5
a tall thin man (picking apricots)++
apricot++
apricot--
a tall thin man (picking (apricots)1.3)1.1