Method GetTokenCandidateProbability
- Namespace
- LMKit.TextGeneration.Events
- Assembly
- LM-Kit.NET.dll
GetTokenCandidateProbability(int)
Retrieves the probability of occurrence for a given token. This method evaluates the likelihood of a specific token being the next in the sequence, based on the model's current predictions.
public float GetTokenCandidateProbability(int token)
Parameters
token
intThe unique identifier of the token for which the probability is requested. Must be an integer between 0 and
Model.Vocabulary.Size - 1
.
Returns
- float
A float between 0 and 1 representing the probability of the specified token being the next in the sequence. A higher value indicates a higher likelihood.
Exceptions
- ArgumentOutOfRangeException
Thrown when the
token
is outside the valid range.