Table of Contents

Property TopK

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

TopK

Gets or sets the number of candidate tokens to consider (TopK) before applying the Top-nσ filter.

This parameter limits the token selection process to the TopK tokens with the highest pre-softmax logits, thereby reducing computational overhead and focusing the sampling on the most relevant candidates.

Valid values are integers in the range [1, 1000].

public int TopK { get; set; }

Property Value

int