Table of Contents

Method GetTokenCandidateTextChunkByRank

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

GetTokenCandidateTextChunkByRank(int)

Retrieves the text representation of a candidate token based on its rank order in terms of likelihood.

public string GetTokenCandidateTextChunkByRank(int rankIndex)

Parameters

rankIndex int

The rank index of the candidate token. Must be within [0, number_of_tokens - 1].

Returns

string

A string representing the textual value of the token at the specified rank.

Remarks

This method allows you to examine alternative tokens the model considered, which can be useful for debugging, analysis, or adjusting generation strategies.

Exceptions

ArgumentOutOfRangeException

Thrown if rankIndex is outside the valid range.