SamplerConfig class final

How the next token is drawn: LiteRT-LM's Kotlin/Swift SamplerConfig.

Every field is set, as there. A conversation that names none uses the sampler the model file carries, field by field, else 0.8 / 40 / 0.95 / seed 1.

Annotations
  • @immutable

Constructors

SamplerConfig({required int topK, required double topP, required double temperature, int seed = 0})
Throws ArgumentError for a value no engine samples with: a negative or non-finite temperature, a topK below 1, a topP outside (0, 1].

Properties

hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seed → int
final
temperature → double
final
topK → int
final
topP → double
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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