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
Known Subclasses
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. All

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( ... ) @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: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. val frequencyPenalty: FloatParam

  14. def getCachePrompt: Boolean

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

  17. def getDynamicTemperatureExponent: Float

  18. def getDynamicTemperatureRange: Float

  19. def getFrequencyPenalty: Float

  20. def getGrammar: String

  21. def getIgnoreEos: Boolean

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

  24. def getInputSuffix: String

  25. def getMinKeep: Int

  26. def getMinP: Float

  27. def getMiroStat: String

  28. def getMiroStatEta: Float

  29. def getMiroStatTau: Float

  30. def getNKeep: Int

  31. def getNPredict: Int
  32. def getNProbs: Int

  33. def getPenalizeNl: Boolean

  34. def getPenaltyPrompt: String

  35. def getPresencePenalty: Float

  36. def getRepeatLastN: Int

  37. def getRepeatPenalty: Float

  38. def getSamplers: Array[String]

  39. def getSeed: Int

  40. def getStopStrings: Array[String]

  41. def getTemperature: Float

  42. def getTfsZ: Float

  43. def getTokenBias: Map[String, Float]

  44. def getTokenIdBias: Map[Int, Float]

  45. def getTopK: Int

  46. def getTopP: Float

  47. def getTypicalP: Float

  48. def getUseChatTemplate: Boolean

  49. val grammar: Param[String]

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

  52. val inputPrefix: Param[String]

  53. val inputSuffix: Param[String]

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

  56. val minP: FloatParam

  57. val miroStat: Param[String]

  58. val miroStatEta: FloatParam

  59. val miroStatTau: FloatParam

  60. val nKeep: IntParam

  61. val nPredict: IntParam

  62. val nProbs: IntParam

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

  67. val penaltyPrompt: Param[String]

  68. val presencePenalty: FloatParam

  69. val repeatLastN: IntParam

  70. val repeatPenalty: FloatParam

  71. val samplers: StringArrayParam

  72. val seed: IntParam

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

    Whether to remember the prompt to avoid reprocessing it

  74. 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.

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

    Set the dynamic temperature exponent

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

    Set the dynamic temperature range

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

    Set the repetition alpha frequency penalty

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

    Set BNF-like grammar to constrain generations

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

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

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

    Set the prompt to start generation with

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

    Set a suffix for infilling

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

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

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

    Set min-p sampling

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

    Set MiroStat sampling strategies.

    Set MiroStat sampling strategies.

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

    Set the MiroStat learning rate, parameter eta

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

    Set the MiroStat target entropy, parameter tau

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

    Set the number of tokens to keep from the initial prompt

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

    Set the number of tokens to predict

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

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

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

    Set whether to penalize newline tokens

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

    Override which part of the prompt is penalized for repetition.

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

    Set the repetition alpha presence penalty

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

    Set the last n tokens to consider for penalties

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

    Set the penalty of repeated sequences of tokens

  95. 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
  96. def setSeed(seed: Int): HasLlamaCppInferenceProperties.this

    Set the RNG seed

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

    Set strings upon seeing which token generation is stopped

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

    Set the temperature

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

    Set tail free sampling, parameter z

  100. 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)

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

    Set the tokens to disable during completion.

  102. 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)

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

    Set the token ids to disable in the completion.

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

    Set top-k sampling

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

    Set top-p sampling

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

    Set locally typical sampling, parameter p

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

    Set whether or not generate should apply a chat template

  108. val stopStrings: StringArrayParam

  109. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  110. val temperature: FloatParam

  111. val tfsZ: FloatParam

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

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

  116. val topP: FloatParam

  117. val typicalP: FloatParam

  118. val useChatTemplate: BooleanParam

  119. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  120. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  121. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

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