Method GetTokenCandidateProbabilityByRank
- Namespace
- LMKit.TextGeneration.Events
- Assembly
- LM-Kit.NET.dll
GetTokenCandidateProbabilityByRank(int)
Retrieves the probability of a token based on its rank in terms of likelihood of occurrence.
public float GetTokenCandidateProbabilityByRank(int rankIndex)
Parameters
rankIndex
intThe rank of the token whose probability is to be retrieved. Must be an integer between 0 and the total number of tokens minus one.
Returns
- float
A float between 0 and 1 representing the probability of the token at the specified rank. A higher value indicates a higher likelihood.
Exceptions
- ArgumentOutOfRangeException
Thrown when
rankIndex
is outside the valid range.