Packages

t

com.johnsnowlabs.nlp

HasLlamaCppInferenceProperties

trait HasLlamaCppInferenceProperties extends AnyRef

Contains settable inference parameters for the AutoGGUFModel.

Self Type
HasLlamaCppInferenceProperties with ParamsAndFeaturesWritable with HasProtectedParams
Linear Supertypes
AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. HasLlamaCppInferenceProperties
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val cachePrompt: BooleanParam

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  7. val disableTokenIds: IntArrayParam

  8. val dynamicTemperatureExponent: FloatParam

  9. val dynamicTemperatureRange: FloatParam

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. val frequencyPenalty: FloatParam

  13. def getCachePrompt: Boolean

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. def getDisableTokenIds: Array[Int]

  16. def getDynamicTemperatureExponent: Float

  17. def getDynamicTemperatureRange: Float

  18. def getFrequencyPenalty: Float

  19. def getGrammar: String

  20. def getIgnoreEos: Boolean

  21. def getInferenceParameters: InferenceParameters
    Attributes
    protected
  22. def getInputPrefix: String

  23. def getInputSuffix: String

  24. def getMinKeep: Int

  25. def getMinP: Float

  26. def getMiroStat: String

  27. def getMiroStatEta: Float

  28. def getMiroStatTau: Float

  29. def getNKeep: Int

  30. def getNPredict: Int
  31. def getNProbs: Int

  32. def getPenalizeNl: Boolean

  33. def getPenaltyPrompt: String

  34. def getPresencePenalty: Float

  35. def getRepeatLastN: Int

  36. def getRepeatPenalty: Float

  37. def getSamplers: Array[String]

  38. def getSeed: Int

  39. def getStopStrings: Array[String]

  40. def getTemperature: Float

  41. def getTfsZ: Float

  42. def getTokenBias: Map[String, Float]

  43. def getTokenIdBias: Map[Int, Float]

  44. def getTopK: Int

  45. def getTopP: Float

  46. def getTypicalP: Float

  47. def getUseChatTemplate: Boolean

  48. val grammar: Param[String]

  49. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  50. val ignoreEos: BooleanParam

  51. val inputPrefix: Param[String]

  52. val inputSuffix: Param[String]

  53. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  54. val minKeep: IntParam

  55. val minP: FloatParam

  56. val miroStat: Param[String]

  57. val miroStatEta: FloatParam

  58. val miroStatTau: FloatParam

  59. val nKeep: IntParam

  60. val nPredict: IntParam

  61. val nProbs: IntParam

  62. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  63. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  64. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  65. val penalizeNl: BooleanParam

  66. val penaltyPrompt: Param[String]

  67. val presencePenalty: FloatParam

  68. val repeatLastN: IntParam

  69. val repeatPenalty: FloatParam

  70. val samplers: StringArrayParam

  71. val seed: IntParam

  72. def setCachePrompt(cachePrompt: Boolean): HasLlamaCppInferenceProperties.this

    Whether to remember the prompt to avoid reprocessing it

  73. def setDisableTokenIds(disableTokenIds: Array[Int]): HasLlamaCppInferenceProperties.this

    Set the token ids to disable in the completion.

    Set the token ids to disable in the completion. This corresponds to setTokenBias with a value of Float.NEGATIVE_INFINITY.

  74. def setDynamicTemperatureExponent(dynatempExponent: Float): HasLlamaCppInferenceProperties.this

    Set the dynamic temperature exponent

  75. def setDynamicTemperatureRange(dynatempRange: Float): HasLlamaCppInferenceProperties.this

    Set the dynamic temperature range

  76. def setFrequencyPenalty(frequencyPenalty: Float): HasLlamaCppInferenceProperties.this

    Set the repetition alpha frequency penalty

  77. def setGrammar(grammar: String): HasLlamaCppInferenceProperties.this

    Set BNF-like grammar to constrain generations

  78. def setIgnoreEos(ignoreEos: Boolean): HasLlamaCppInferenceProperties.this

    Set whether to ignore end of stream token and continue generating (implies --logit-bias 2-inf)

  79. def setInputPrefix(inputPrefix: String): HasLlamaCppInferenceProperties.this

    Set the prompt to start generation with

  80. def setInputSuffix(inputSuffix: String): HasLlamaCppInferenceProperties.this

    Set a suffix for infilling

  81. def setMinKeep(minKeep: Int): HasLlamaCppInferenceProperties.this

    Set the amount of tokens the samplers should return at least (0 = disabled)

  82. def setMinP(minP: Float): HasLlamaCppInferenceProperties.this

    Set min-p sampling

  83. def setMiroStat(mirostat: String): HasLlamaCppInferenceProperties.this

    Set MiroStat sampling strategies.

    Set MiroStat sampling strategies.

    • DISABLED: No MiroStat
    • V1: MiroStat V1
    • V2: MiroStat V2
  84. def setMiroStatEta(mirostatEta: Float): HasLlamaCppInferenceProperties.this

    Set the MiroStat learning rate, parameter eta

  85. def setMiroStatTau(mirostatTau: Float): HasLlamaCppInferenceProperties.this

    Set the MiroStat target entropy, parameter tau

  86. def setNKeep(nKeep: Int): HasLlamaCppInferenceProperties.this

    Set the number of tokens to keep from the initial prompt

  87. def setNPredict(nPredict: Int): HasLlamaCppInferenceProperties.this

    Set the number of tokens to predict

  88. def setNProbs(nProbs: Int): HasLlamaCppInferenceProperties.this

    Set the amount top tokens probabilities to output if greater than 0.

  89. def setPenalizeNl(penalizeNl: Boolean): HasLlamaCppInferenceProperties.this

    Set whether to penalize newline tokens

  90. def setPenaltyPrompt(penaltyPrompt: String): HasLlamaCppInferenceProperties.this

    Override which part of the prompt is penalized for repetition.

  91. def setPresencePenalty(presencePenalty: Float): HasLlamaCppInferenceProperties.this

    Set the repetition alpha presence penalty

  92. def setRepeatLastN(repeatLastN: Int): HasLlamaCppInferenceProperties.this

    Set the last n tokens to consider for penalties

  93. def setRepeatPenalty(repeatPenalty: Float): HasLlamaCppInferenceProperties.this

    Set the penalty of repeated sequences of tokens

  94. def setSamplers(samplers: Array[String]): HasLlamaCppInferenceProperties.this

    Set which samplers to use for token generation in the given order .

    Set which samplers to use for token generation in the given order .

    Available Samplers are:

    • TOP_K: Top-k sampling
    • TFS_Z: Tail free sampling
    • TYPICAL_P: Locally typical sampling p
    • TOP_P: Top-p sampling
    • MIN_P: Min-p sampling
    • TEMPERATURE: Temperature sampling
  95. def setSeed(seed: Int): HasLlamaCppInferenceProperties.this

    Set the RNG seed

  96. def setStopStrings(stopStrings: Array[String]): HasLlamaCppInferenceProperties.this

    Set strings upon seeing which token generation is stopped

  97. def setTemperature(temperature: Float): HasLlamaCppInferenceProperties.this

    Set the temperature

  98. def setTfsZ(tfsZ: Float): HasLlamaCppInferenceProperties.this

    Set tail free sampling, parameter z

  99. def setTokenBias(tokenBias: HashMap[String, Double]): HasLlamaCppInferenceProperties.this

    Set the tokens to disable during completion.

    Set the tokens to disable during completion. (Override for PySpark)

  100. def setTokenBias(tokenBias: Map[String, Float]): HasLlamaCppInferenceProperties.this

    Set the tokens to disable during completion.

  101. def setTokenIdBias(tokenIdBias: HashMap[Integer, Double]): HasLlamaCppInferenceProperties.this

    Set the token ids to disable in the completion.

    Set the token ids to disable in the completion. (Override for PySpark)

  102. def setTokenIdBias(tokenIdBias: Map[Int, Float]): HasLlamaCppInferenceProperties.this

    Set the token ids to disable in the completion.

  103. def setTopK(topK: Int): HasLlamaCppInferenceProperties.this

    Set top-k sampling

  104. def setTopP(topP: Float): HasLlamaCppInferenceProperties.this

    Set top-p sampling

  105. def setTypicalP(typicalP: Float): HasLlamaCppInferenceProperties.this

    Set locally typical sampling, parameter p

  106. def setUseChatTemplate(useChatTemplate: Boolean): HasLlamaCppInferenceProperties.this

    Set whether or not generate should apply a chat template

  107. val stopStrings: StringArrayParam

  108. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  109. val temperature: FloatParam

  110. val tfsZ: FloatParam

  111. def toString(): String
    Definition Classes
    AnyRef → Any
  112. val tokenBias: StructFeature[Map[String, Float]]

  113. val tokenIdBias: StructFeature[Map[Int, Float]]
  114. val topK: IntParam

  115. val topP: FloatParam

  116. val typicalP: FloatParam

  117. val useChatTemplate: BooleanParam

  118. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  119. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  120. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Parameter setters

Parameter getters

Parameters

A list of (hyper-)parameter keys this annotator can take. Users can set and get the parameter values through setters and getters, respectively.

Ungrouped