Table of Contents

Property TopP

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

TopP

Specifies diversity through nucleus sampling method.
The TopP algorithm computes the cumulative probability distribution and cuts off as soon as that distribution exceeds the value of TopP.
For example, a value of 0.8 implies that 80% of all likelihood-weighted options are considered.
This sampling strategy aims to strike a balance between diversity and quality, taking into account both the probability of tokens and the quantity of tokens to be sampled.
Use a floating-point value within the range [0 (more conservative), 1 (more diverse)].
Use 1 to disable TopP sampling.

public float TopP { get; set; }

Property Value

float

The default value is 0.95.

Remarks

This parameter has no effect when Temperature property is set to 0.

Nucleus sampling described in academic paper "The Curious Case of Neural Text Degeneration" https://arxiv.org/abs/1904.09751