AIL. - AI-Local Systems (GPT4All)

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIL. -  AI-Local Systems (GPT4All) >

AIL. - AI-Local Systems (GPT4All)

AIL.Set Repeat Last

Previous Top Next


MiniRobotLanguage (MRL)

 

AIL.Set Repeat Last

Modifies the scope of the repeat penalty in the GPT4All AI model's generation history

 

clip0821

 

Intention

 

The AIL.Set Repeat Last command allows users to manipulate the "repeat_last_n" parameter that determines how far back in the model's generation history the repeat penalty is applied.

The parameter P1 is an integer specifying the number of the most recent tokens to consider when applying the repeat penalty:

 

Higher P1 values expand the scope of the repeat penalty, making the model consider more of its recent outputs when evaluating for repetition. This can help generate more varied and less repetitive outputs.

 

Lower P1 values limit the scope of the repeat penalty, only penalizing repetition in a smaller subset of the model's most recent outputs. This can be useful if allowing some level of repetition is desirable for your specific task.

 

If P1 is missing or omitted, a default value of 10 is used.

 

USAGE EXAMPLES

 

'Set "repeat_last_n" to a larger value to discourage repetitive output:

AIL.Set Repeat Last|10

 
This command makes the model consider its last 10 tokens when applying the repeat penalty, helping to ensure diverse and less repetitive outputs.

 

' Set "repeat_last_n" to a lower value to allow some level of repetition:

AIL.Set Repeat Last|2

 
This command restricts the repeat penalty to the model's last 2 tokens, allowing a greater level of repetition in the generated output.The repeat_last_n parameter controls how far back in the model's generation history the repeat penalty is applied. A higher value of the repeat_last_n parameter will result in a lower chance of the model repeating itself, but it will also make the model less creative.

 

The default value of the repeat_last_n parameter is 10.
This means that the model will not generate a token that is the same as any of the last 10 tokens that it has generated. However, you can adjust the value of the repeat_last_n parameter to achieve the desired balance between creativity and repetition.

 

For example, if you want to generate text that is very free of repetition, you can set the value of the repeat_last_n parameter to a higher value, such as 20 or 30. This will ensure that the model is very unlikely to repeat itself.

 

On the other hand, if you want to generate text that is more creative and allows for some repetition, you can set the value of the repeat_last_n parameter to a lower value, such as 5 or 3. This will allow the model to generate more text that is similar to the prompt, even if it repeats itself occasionally.

 

The best way to determine the optimal value of the repeat_last_n parameter for your needs is to experiment with different values and see what works best for you.

 

Here are some additional things to keep in mind about the repeat_last_n parameter:

 

The repeat_last_n parameter does not affect the quality of the generated text. The model will still try to generate the best possible text, even if it is penalized for repeating itself.

The repeat_last_n parameter can be used to control the diversity of the generated text. The model will be more diverse if the repeat_last_n parameter is set to a higher value, as it will be less likely to repeat itself.

The repeat_last_n parameter can be used to control the length of the generated text. The model will be longer if the repeat_last_n parameter is set to a lower value, as it will be more likely to repeat itself.

The range of the repeat_last_n parameter in GPT-4All is from 1 to 1024. A value of 1 means that the repeat penalty will only be applied to the last token that the model has generated, while a value of 1024 means that the repeat penalty will be applied to all of the tokens that the model has generated.

 

 

 

Syntax

 

 

AIL.Set Repeat Last[|P1]
AIL.srl[|P1]

 

Parameter Explanation

 

P1 - (optional) This is an integer representing the desired "repeat_last_n" value. If P1 is missing or omitted, the default value of 10 is used.

 

 

 

Example

 

'***********************************

'

'***********************************

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: