AIO Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIO. - OpenRouter AI >

AIO Commands

AIO.SetFreqPen

Previous Top Next


MiniRobotLanguage (MRL)

 

AIO.SetFreqPen

 

Description

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.

 

Syntax

AIO.SetFreqPen|$$PENALTY

 

Parameters

$$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

 

Example

Set frequency penalty to 0.3 to reduce moderate repetition:

AIO.SetFreqPen|0.3

 

See Also

AIO.SetPresPen

AIO.SetTemp

AIO.SetTopP

AIO.Init

 

Remarks

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.