SamplerParams constructor

const SamplerParams({
  1. int seed = defaultSeed,
  2. double temperature = 0.8,
  3. int topK = 40,
  4. double topP = 0.95,
  5. double minP = 0.05,
  6. double typicalP = 1.0,
  7. double topNSigma = 0.0,
  8. int minKeep = 1,
  9. double repeatPenalty = 1.0,
  10. int penaltyLastN = 64,
  11. double frequencyPenalty = 0.0,
  12. double presencePenalty = 0.0,
  13. bool greedy = false,
  14. bool infill = false,
  15. MirostatConfig mirostat = MirostatConfig.disabled,
  16. DynamicTempConfig dynamicTemp = DynamicTempConfig.disabled,
  17. XtcConfig xtc = XtcConfig.disabled,
  18. DryConfig dry = DryConfig.disabled,
  19. AdaptivePConfig adaptiveP = AdaptivePConfig.disabled,
  20. GrammarConfig grammar = GrammarConfig.disabled,
  21. List<LogitBiasEntry> logitBias = const [],
})

Implementation

const SamplerParams({
  this.seed = defaultSeed,
  this.temperature = 0.8,
  this.topK = 40,
  this.topP = 0.95,
  this.minP = 0.05,
  this.typicalP = 1.0,
  this.topNSigma = 0.0,
  this.minKeep = 1,
  this.repeatPenalty = 1.0,
  this.penaltyLastN = 64,
  this.frequencyPenalty = 0.0,
  this.presencePenalty = 0.0,
  this.greedy = false,
  this.infill = false,
  this.mirostat = MirostatConfig.disabled,
  this.dynamicTemp = DynamicTempConfig.disabled,
  this.xtc = XtcConfig.disabled,
  this.dry = DryConfig.disabled,
  this.adaptiveP = AdaptivePConfig.disabled,
  this.grammar = GrammarConfig.disabled,
  this.logitBias = const [],
});