LlamaController constructor

LlamaController({
  1. required String modelPath,
  2. bool? vocabOnly,
  3. bool? useMmap,
  4. bool? useMlock,
  5. bool? checkTensors,
  6. int? nCtx,
  7. int? nBatch,
  8. int? nUBatch,
  9. int? nSeqMax,
  10. int? nThreads,
  11. int? nThreadsBatch,
  12. RopeScalingType? ropeScalingType,
  13. PoolingType? poolingType,
  14. AttentionType? attentionType,
  15. double? ropeFrequencyBase,
  16. double? ropeFrequencyScale,
  17. double? yarnExtrapolationFactor,
  18. double? yarnAttenuationFactor,
  19. double? yarnBetaFast,
  20. double? yarnBetaSlow,
  21. int? yarnOriginalContext,
  22. double? defragmentationThreshold,
  23. GgmlType? typeK,
  24. GgmlType? typeV,
  25. bool? embeddings,
  26. bool? offloadKqv,
  27. bool? flashAttention,
  28. bool? noPerformance,
  29. bool? greedy,
  30. bool? infill,
  31. int? seed,
  32. int? topK,
  33. double? topP,
  34. int? minKeepTopP,
  35. double? minP,
  36. int? minKeepMinP,
  37. double? typicalP,
  38. int? minKeepTypicalP,
  39. double? temperature,
  40. double? temperatureDelta,
  41. double? temperatureExponent,
  42. double? xtcP,
  43. double? xtcT,
  44. int? minKeepXtc,
  45. int? xtcSeed,
  46. int? mirostatNVocab,
  47. int? mirostatSeed,
  48. double? mirostatTau,
  49. double? mirostatEta,
  50. int? mirostatM,
  51. int? mirostatV2Seed,
  52. double? mirostatV2Tau,
  53. double? mirostatV2Eta,
  54. String? grammarStr,
  55. String? grammarRoot,
  56. int? penaltiesLastN,
  57. double? penaltiesRepeat,
  58. double? penaltiesFrequency,
  59. double? penaltiesPresent,
  60. int? drySamplerNCtxTrain,
  61. double? drySamplerMultiplier,
  62. double? drySamplerDryBase,
  63. int? drySamplerAllowedLength,
})

Creates a new instance of LlamaController.

Implementation

LlamaController({
  required String modelPath,
  bool? vocabOnly,
  bool? useMmap,
  bool? useMlock,
  bool? checkTensors,
  int? nCtx,
  int? nBatch,
  int? nUBatch,
  int? nSeqMax,
  int? nThreads,
  int? nThreadsBatch,
  RopeScalingType? ropeScalingType,
  PoolingType? poolingType,
  AttentionType? attentionType,
  double? ropeFrequencyBase,
  double? ropeFrequencyScale,
  double? yarnExtrapolationFactor,
  double? yarnAttenuationFactor,
  double? yarnBetaFast,
  double? yarnBetaSlow,
  int? yarnOriginalContext,
  double? defragmentationThreshold,
  GgmlType? typeK,
  GgmlType? typeV,
  bool? embeddings,
  bool? offloadKqv,
  bool? flashAttention,
  bool? noPerformance,
  bool? greedy,
  bool? infill,
  int? seed,
  int? topK,
  double? topP,
  int? minKeepTopP,
  double? minP,
  int? minKeepMinP,
  double? typicalP,
  int? minKeepTypicalP,
  double? temperature,
  double? temperatureDelta,
  double? temperatureExponent,
  double? xtcP,
  double? xtcT,
  int? minKeepXtc,
  int? xtcSeed,
  int? mirostatNVocab,
  int? mirostatSeed,
  double? mirostatTau,
  double? mirostatEta,
  int? mirostatM,
  int? mirostatV2Seed,
  double? mirostatV2Tau,
  double? mirostatV2Eta,
  String? grammarStr,
  String? grammarRoot,
  int? penaltiesLastN,
  double? penaltiesRepeat,
  double? penaltiesFrequency,
  double? penaltiesPresent,
  int? drySamplerNCtxTrain,
  double? drySamplerMultiplier,
  double? drySamplerDryBase,
  int? drySamplerAllowedLength,
})  : _modelPath = modelPath,
      _vocabOnly = vocabOnly,
      _useMmap = useMmap,
      _useMlock = useMlock,
      _checkTensors = checkTensors,
      _nCtx = nCtx ?? 0,
      _nBatch = nBatch,
      _nUBatch = nUBatch,
      _nSeqMax = nSeqMax,
      _nThreads = nThreads,
      _nThreadsBatch = nThreadsBatch,
      _ropeScalingType = ropeScalingType,
      _poolingType = poolingType,
      _attentionType = attentionType,
      _ropeFrequencyBase = ropeFrequencyBase,
      _ropeFrequencyScale = ropeFrequencyScale,
      _yarnExtrapolationFactor = yarnExtrapolationFactor,
      _yarnAttenuationFactor = yarnAttenuationFactor,
      _yarnBetaFast = yarnBetaFast,
      _yarnBetaSlow = yarnBetaSlow,
      _yarnOriginalContext = yarnOriginalContext,
      _defragmentationThreshold = defragmentationThreshold,
      _typeK = typeK,
      _typeV = typeV,
      _embeddings = embeddings,
      _offloadKqv = offloadKqv,
      _flashAttention = flashAttention,
      _noPerformance = noPerformance,
      _greedy = greedy ?? false,
      _infill = infill ?? false,
      _seed = seed,
      _topK = topK,
      _topP = topP,
      _minKeepTopP = minKeepTopP,
      _minP = minP,
      _minKeepMinP = minKeepMinP,
      _typicalP = typicalP,
      _minKeepTypicalP = minKeepTypicalP,
      _temperature = temperature,
      _temperatureDelta = temperatureDelta,
      _temperatureExponent = temperatureExponent,
      _xtcP = xtcP,
      _xtcT = xtcT,
      _minKeepXtc = minKeepXtc,
      _xtcSeed = xtcSeed,
      _mirostatNVocab = mirostatNVocab,
      _mirostatSeed = mirostatSeed,
      _mirostatTau = mirostatTau,
      _mirostatEta = mirostatEta,
      _mirostatM = mirostatM,
      _mirostatV2Seed = mirostatV2Seed,
      _mirostatV2Tau = mirostatV2Tau,
      _mirostatV2Eta = mirostatV2Eta,
      _grammarStr = grammarStr,
      _grammarRoot = grammarRoot,
      _penaltiesLastN = penaltiesLastN,
      _penaltiesRepeat = penaltiesRepeat,
      _penaltiesFrequency = penaltiesFrequency,
      _penaltiesPresent = penaltiesPresent,
      _drySamplerNCtxTrain = drySamplerNCtxTrain,
      _drySamplerMultiplier = drySamplerMultiplier,
      _drySamplerDryBase = drySamplerDryBase,
      _drySamplerAllowedLength = drySamplerAllowedLength;