Enum LiteRtSamplerType
- Namespace
- LiteRtLmSharp
- Assembly
- LiteRtLmSharp.dll
Token sampling strategy. Mirrors LiteRT-LM's LiteRtLmSamplerType.
public enum LiteRtSamplerType
Fields
Greedy = 3Always pick the highest-probability token (argmax).
TopK = 1Sample probabilistically among the top-k tokens.
TopP = 2Nucleus (top-p) sampling after a top-k cut.
Unspecified = 0Let the engine choose its default: the binding sends no sampler parameters at all, so the executor's internal default sampling applies and the other LiteRtSamplerParams fields are not forwarded. (Native v0.14.0 removed its unspecified sampler type, and v0.18.0 declares it again; not sending parameters preserves the pre-v0.14.0 behavior, where the unspecified type also deferred to the executor.)