Table of Contents

Property NoRepeatNgramSize

Namespace
LMKit.TextGeneration.Sampling
Assembly
LM-Kit.NET.dll

NoRepeatNgramSize

Specifies the length of n-gram that may never be repeated.

public int NoRepeatNgramSize { get; set; }

Property Value

int

The default value is 0 (disabled).

Remarks

This is an absolute constraint rather than a penalty: once an n-gram of this length has been emitted, no token that would replay it can be selected. Effective against loops in structured output, and heavy-handed for prose, where a repeated phrase is often correct. Use 0 to disable.

Share