SamplingMode class sealed

How the model picks each next token.

Implementers
Annotations

Constructors

SamplingMode.greedy()
Always take the most likely token.
const
factory
SamplingMode.topK(int k, {int? seed})
Sample from the k most likely tokens.
const
factory
SamplingMode.topP(double threshold, {int? seed})
Sample from the smallest set of tokens whose probabilities sum to threshold. Also known as nucleus or top-p sampling.
const
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Wire representation.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited