Method GetTokenCandidateProbabilityByRank
- Namespace
- LMKit.TextGeneration.Events
- Assembly
- LM-Kit.NET.dll
GetTokenCandidateProbabilityByRank(int)
Retrieves the probability of a candidate token based on its rank order in terms of likelihood.
public float GetTokenCandidateProbabilityByRank(int rankIndex)
Parameters
rankIndex
intThe rank index of the candidate token. Must be within [0, number_of_tokens - 1].
Returns
- float
A float in [0, 1] representing the probability of the token at the given rank index.
Remarks
This method provides insight into how probability mass is distributed among top-ranked tokens.
Exceptions
- ArgumentOutOfRangeException
Thrown if
rankIndex
is outside the valid range.