|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIO. - OpenRouter AI > AIO Commands |
MiniRobotLanguage (MRL)
AIO.SetFreqPen
Sets the frequency penalty to reduce token repetition in AI-generated responses. The frequency penalty decreases the likelihood of tokens appearing based on how frequently they have already appeared in the generated text.
AIO.SetFreqPen|$$PENALTY
$$PENALTY (Required)
Penalty value ranging from -2.0 to 2.0. This parameter controls how strongly token repetition is penalized based on the frequency of token appearance.
Default: 0.0
Set frequency penalty to 0.3 to reduce moderate repetition:
AIO.SetFreqPen|0.3
The frequency penalty reduces repetition by penalizing tokens based on how often they appear in the generated text.
Unlike presence penalty (which applies a fixed penalty once a token appears), frequency penalty scales with token frequency - the more a token appears, the stronger the penalty.
Higher positive values result in less repetition and more diverse vocabulary usage.
Negative values can encourage repetition and may be useful when you want the AI to stay on topic or emphasize key concepts.
A value of 0.0 disables frequency penalty (default behavior).
This setting works in combination with other sampling parameters like temperature and Top-P.