final class LLMLoader extends LLMLoaderInferenceParams[LLMLoader] with CheckLicense with HasFeatures
- Alphabetic
- By Inheritance
- LLMLoader
- HasFeatures
- CheckLicense
- LLMLoaderInferenceParams
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
$$[T](feature: StructFeature[T]): T
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
$$[K, V](feature: MapFeature[K, V]): Map[K, V]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
$$[T](feature: SetFeature[T]): Set[T]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
$$[T](feature: ArrayFeature[T]): Array[T]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
checkValidEnvironment(spark: Option[SparkSession], scopes: Seq[String]): Unit
- Definition Classes
- CheckLicense
-
def
checkValidScope(scope: String): Unit
- Definition Classes
- CheckLicense
-
def
checkValidScopeAndEnvironment(scope: String, spark: Option[SparkSession], checkLp: Boolean): Unit
- Definition Classes
- CheckLicense
-
def
checkValidScopesAndEnvironment(scopes: Seq[String], spark: Option[SparkSession], checkLp: Boolean): Unit
- Definition Classes
- CheckLicense
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
features: ArrayBuffer[Feature[_, _, _]]
- Definition Classes
- HasFeatures
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def findGGUFModelInFolder(path: String): String
- def generate(prompt: String): String
-
def
get[T](feature: StructFeature[T]): Option[T]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
get[T](feature: SetFeature[T]): Option[Set[T]]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
get[T](feature: ArrayFeature[T]): Option[Array[T]]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getMetadata: String
- def getMetadataEntry(param: String): String
-
def
getSystemPrompt: String
- Definition Classes
- LLMLoaderInferenceParams
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
inferenceParameters: InferenceParameters
- Attributes
- protected
- Definition Classes
- LLMLoaderInferenceParams
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isLicensed: Boolean
- def load(modelPath: String, nGpuLayers: Int = 0): LLMLoader
- def loadGGUF(ggufPath: String, systemPrompt: String = "", nGpuLayers: Int = 0): LLMLoader
-
def
loadParamsMap(paramsMap: Map[String, Any]): Unit
- Attributes
- protected
- Definition Classes
- LLMLoaderInferenceParams
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
paramsMap: Map[String, Any]
- Attributes
- protected
- Definition Classes
- LLMLoaderInferenceParams
- def pretrained(name: String, lang: String, remoteLoc: String): LLMLoader
- def readGGUF(ggufPath: String, systemPrompt: String = "", nGpuLayers: Int = 0): Unit
- def readModel(modelPath: String, nGpuLayers: Int = 0): Unit
- def readSparkModel(modelPath: String, nGpuLayers: Int = 0): Unit
-
def
set[T](feature: StructFeature[T], value: T): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[K, V](feature: MapFeature[K, V], value: Map[K, V]): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[T](feature: SetFeature[T], value: Set[T]): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[T](feature: ArrayFeature[T], value: Array[T]): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setCachePrompt(cachePrompt: Boolean): LLMLoader
Whether to remember the prompt to avoid reprocessing it
Whether to remember the prompt to avoid reprocessing it
- Definition Classes
- LLMLoaderInferenceParams
-
def
setDefault[T](feature: StructFeature[T], value: () ⇒ T): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): LLMLoader.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDynamicTemperatureExponent(dynatempExponent: Float): LLMLoader
Set the dynamic temperature exponent (default: 1.0)
Set the dynamic temperature exponent (default: 1.0)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setDynamicTemperatureRange(dynatempRange: Float): LLMLoader
Set the dynamic temperature range (default: 0.0, 0.0 = disabled)
Set the dynamic temperature range (default: 0.0, 0.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setFrequencyPenalty(frequencyPenalty: Float): LLMLoader
Set the repetition alpha frequency penalty (default: 0.0, 0.0 = disabled)
Set the repetition alpha frequency penalty (default: 0.0, 0.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setGrammar(grammar: String): LLMLoader
Set BNF-like grammar to constrain generations (see samples in grammars/ dir)
Set BNF-like grammar to constrain generations (see samples in grammars/ dir)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setIgnoreEos(ignoreEos: Boolean): LLMLoader
Set whether to ignore end of stream token and continue generating (implies --logit-bias 2-inf)
Set whether to ignore end of stream token and continue generating (implies --logit-bias 2-inf)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setInputPrefix(inputPrefix: String): LLMLoader
Set a prefix for infilling (default: empty)
Set a prefix for infilling (default: empty)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setInputSuffix(inputSuffix: String): LLMLoader
Set a suffix for infilling (default: empty)
Set a suffix for infilling (default: empty)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setMinKeep(minKeep: Int): LLMLoader
Set the amount of tokens the samplers should return at least (0 = disabled)
Set the amount of tokens the samplers should return at least (0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setMinP(minP: Float): LLMLoader
Set min-p sampling (default: 0.1, 0.0 = disabled)
Set min-p sampling (default: 0.1, 0.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setMiroStatEta(mirostatEta: Float): LLMLoader
Set the MiroStat learning rate, parameter eta (default: 0.1)
Set the MiroStat learning rate, parameter eta (default: 0.1)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setMiroStatTau(mirostatTau: Float): LLMLoader
Set the MiroStat target entropy, parameter tau (default: 5.0)
Set the MiroStat target entropy, parameter tau (default: 5.0)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setNKeep(nKeep: Int): LLMLoader
Set the number of tokens to keep from the initial prompt (default: 0, -1 = all)
Set the number of tokens to keep from the initial prompt (default: 0, -1 = all)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setNPredict(nPredict: Int): LLMLoader
Set the number of tokens to predict (default: -1, -1 = infinity, -2 = until context filled)
Set the number of tokens to predict (default: -1, -1 = infinity, -2 = until context filled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setNProbs(nProbs: Int): LLMLoader
Set the amount top tokens probabilities to output if greater than 0.
Set the amount top tokens probabilities to output if greater than 0.
- Definition Classes
- LLMLoaderInferenceParams
-
def
setPenalizeNl(penalizeNl: Boolean): LLMLoader
Whether to penalize newline tokens
Whether to penalize newline tokens
- Definition Classes
- LLMLoaderInferenceParams
-
def
setPenaltyPrompt(tokens: ArrayList[Int]): LLMLoader
- Definition Classes
- LLMLoaderInferenceParams
-
def
setPenaltyPrompt(tokens: Array[Int]): LLMLoader
Override which tokens to penalize for repetition.
Override which tokens to penalize for repetition. E.g. if original prompt is "Alice: Hello!" and penaltyPrompt corresponds to the token ids of "Hello!", only the latter will be penalized if repeated. See pull request 3727 for more details.
- Definition Classes
- LLMLoaderInferenceParams
-
def
setPenaltyPrompt(penaltyPrompt: String): LLMLoader
Override which part of the prompt is penalized for repetition.
Override which part of the prompt is penalized for repetition. E.g. if original prompt is "Alice: Hello!" and penaltyPrompt is "Hello!", only the latter will be penalized if repeated. See pull request 3727 for more details.
- Definition Classes
- LLMLoaderInferenceParams
-
def
setPresencePenalty(presencePenalty: Float): LLMLoader
Set the repetition alpha presence penalty (default: 0.0, 0.0 = disabled)
Set the repetition alpha presence penalty (default: 0.0, 0.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setRepeatLastN(repeatLastN: Int): LLMLoader
Set the last n tokens to consider for penalties (default: 64, 0 = disabled, -1 = ctx_size)
Set the last n tokens to consider for penalties (default: 64, 0 = disabled, -1 = ctx_size)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setRepeatPenalty(repeatPenalty: Float): LLMLoader
Set the penalty of repeated sequences of tokens (default: 1.0, 1.0 = disabled)
Set the penalty of repeated sequences of tokens (default: 1.0, 1.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setSeed(seed: Int): LLMLoader
Set the RNG seed (default: -1, use random seed for < 0)
Set the RNG seed (default: -1, use random seed for < 0)
- Definition Classes
- LLMLoaderInferenceParams
- def setSparkSession(spark: SparkSession): LLMLoader
-
def
setStopStrings(stopStrings: ArrayList[String]): LLMLoader
- Definition Classes
- LLMLoaderInferenceParams
-
def
setStopStrings(stopStrings: Array[String]): LLMLoader
Set strings upon seeing which token generation is stopped
Set strings upon seeing which token generation is stopped
- Definition Classes
- LLMLoaderInferenceParams
-
def
setSystemPrompt(systemPrompt: String): LLMLoader
- Definition Classes
- LLMLoaderInferenceParams
-
def
setTemperature(temperature: Float): LLMLoader
Set the temperature (default: 0.8)
Set the temperature (default: 0.8)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setTfsZ(tfsZ: Float): LLMLoader
Set tail free sampling, parameter z (default: 1.0, 1.0 = disabled)
Set tail free sampling, parameter z (default: 1.0, 1.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setTopK(topK: Int): LLMLoader
Set top-k sampling (default: 40, 0 = disabled)
Set top-k sampling (default: 40, 0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setTopP(topP: Float): LLMLoader
Set top-p sampling (default: 0.9, 1.0 = disabled)
Set top-p sampling (default: 0.9, 1.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setTypicalP(typicalP: Float): LLMLoader
Set locally typical sampling, parameter p (default: 1.0, 1.0 = disabled)
Set locally typical sampling, parameter p (default: 1.0, 1.0 = disabled)
- Definition Classes
- LLMLoaderInferenceParams
-
def
setUseChatTemplate(useChatTemplate: Boolean): LLMLoader
Set whether or not generate should apply a chat template (default: false)
Set whether or not generate should apply a chat template (default: false)
- Definition Classes
- LLMLoaderInferenceParams
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val uid: String
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def writeModel(modelPath: String, outputModelPath: String, metadata: Map[String, String]): Unit