class AutoGGUFModel extends AnnotatorModel[AutoGGUFModel] with HasBatchedAnnotate[AutoGGUFModel] with HasEngine with HasLlamaCppProperties with HasProtectedParams
Annotator that uses the llama.cpp library to generate text completions with large language models.
For settable parameters, and their explanations, see HasLlamaCppProperties and refer to the llama.cpp documentation of server.cpp for more information.
If the parameters are not set, the annotator will default to use the parameters provided by the model.
Pretrained models can be loaded with pretrained
of the companion object:
val autoGGUFModel = AutoGGUFModel.pretrained() .setInputCols("document") .setOutputCol("completions")
The default model is "phi3.5_mini_4k_instruct_q4_gguf"
, if no name is provided.
For available pretrained models please see the Models Hub.
For extended examples of usage, see the AutoGGUFModelTest and the example notebook.
Note
To use GPU inference with this annotator, make sure to use the Spark NLP GPU package and set
the number of GPU layers with the setNGpuLayers
method.
When using larger models, we recommend adjusting GPU usage with setNCtx
and setNGpuLayers
according to your hardware to avoid out-of-memory errors.
Example
import com.johnsnowlabs.nlp.base._ import com.johnsnowlabs.nlp.annotator._ import org.apache.spark.ml.Pipeline import spark.implicits._ val document = new DocumentAssembler() .setInputCol("text") .setOutputCol("document") val autoGGUFModel = AutoGGUFModel .pretrained() .setInputCols("document") .setOutputCol("completions") .setBatchSize(4) .setNPredict(20) .setNGpuLayers(99) .setTemperature(0.4f) .setTopK(40) .setTopP(0.9f) .setPenalizeNl(true) val pipeline = new Pipeline().setStages(Array(document, autoGGUFModel)) val data = Seq("Hello, I am a").toDF("text") val result = pipeline.fit(data).transform(data) result.select("completions").show(truncate = false) +-----------------------------------------------------------------------------------------------------------------------------------+ |completions | +-----------------------------------------------------------------------------------------------------------------------------------+ |[{document, 0, 78, new user. I am currently working on a project and I need to create a list of , {prompt -> Hello, I am a}, []}]| +-----------------------------------------------------------------------------------------------------------------------------------+
- Grouped
- Alphabetic
- By Inheritance
- AutoGGUFModel
- HasProtectedParams
- HasLlamaCppProperties
- HasEngine
- HasBatchedAnnotate
- AnnotatorModel
- CanBeLazy
- RawAnnotator
- HasOutputAnnotationCol
- HasInputAnnotationCols
- HasOutputAnnotatorType
- ParamsAndFeaturesWritable
- HasFeatures
- DefaultParamsWritable
- MLWritable
- Model
- Transformer
- PipelineStage
- Logging
- Params
- Serializable
- Serializable
- Identifiable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Type Members
-
implicit
class
ProtectedParam[T] extends Param[T]
- Definition Classes
- HasProtectedParams
-
type
AnnotationContent = Seq[Row]
internal types to show Rows as a relevant StructType Should be deleted once Spark releases UserDefinedTypes to @developerAPI
internal types to show Rows as a relevant StructType Should be deleted once Spark releases UserDefinedTypes to @developerAPI
- Attributes
- protected
- Definition Classes
- AnnotatorModel
-
type
AnnotatorType = String
- Definition Classes
- HasOutputAnnotatorType
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
$[T](param: Param[T]): T
- Attributes
- protected
- Definition Classes
- Params
-
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
-
def
_transform(dataset: Dataset[_], recursivePipeline: Option[PipelineModel]): DataFrame
- Attributes
- protected
- Definition Classes
- AnnotatorModel
-
def
afterAnnotate(dataset: DataFrame): DataFrame
- Attributes
- protected
- Definition Classes
- AnnotatorModel
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
batchAnnotate(batchedAnnotations: Seq[Array[Annotation]]): Seq[Seq[Annotation]]
Completes the batch of annotations.
Completes the batch of annotations.
- batchedAnnotations
Annotations (single element arrays) in batches
- returns
Completed text sequences
- Definition Classes
- AutoGGUFModel → HasBatchedAnnotate
-
def
batchProcess(rows: Iterator[_]): Iterator[Row]
- Definition Classes
- HasBatchedAnnotate
-
val
batchSize: IntParam
Size of every batch (Default depends on model).
Size of every batch (Default depends on model).
- Definition Classes
- HasBatchedAnnotate
-
def
beforeAnnotate(dataset: Dataset[_]): Dataset[_]
- Attributes
- protected
- Definition Classes
- AnnotatorModel
-
val
cachePrompt: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
val
chatTemplate: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
final
def
checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
- Attributes
- protected
- Definition Classes
- HasInputAnnotationCols
-
final
def
clear(param: Param[_]): AutoGGUFModel.this.type
- Definition Classes
- Params
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
copy(extra: ParamMap): AutoGGUFModel
requirement for annotators copies
requirement for annotators copies
- Definition Classes
- RawAnnotator → Model → Transformer → PipelineStage → Params
-
def
copyValues[T <: Params](to: T, extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
final
def
defaultCopy[T <: Params](extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
val
defragmentationThreshold: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
disableTokenIds: IntArrayParam
- Definition Classes
- HasLlamaCppProperties
-
val
dynamicTemperatureExponent: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
dynamicTemperatureRange: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
embedding: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
val
engine: Param[String]
This param is set internally once via loadSavedModel.
This param is set internally once via loadSavedModel. That's why there is no setter
- Definition Classes
- HasEngine
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
explainParam(param: Param[_]): String
- Definition Classes
- Params
-
def
explainParams(): String
- Definition Classes
- Params
-
def
extraValidate(structType: StructType): Boolean
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
def
extraValidateMsg: String
Override for additional custom schema checks
Override for additional custom schema checks
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
final
def
extractParamMap(): ParamMap
- Definition Classes
- Params
-
final
def
extractParamMap(extra: ParamMap): ParamMap
- Definition Classes
- Params
-
val
features: ArrayBuffer[Feature[_, _, _]]
- Definition Classes
- HasFeatures
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
val
flashAttention: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
val
frequencyPenalty: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
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
get[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
def
getBatchSize: Int
Size of every batch.
Size of every batch.
- Definition Classes
- HasBatchedAnnotate
-
def
getCachePrompt: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getChatTemplate: String
- Definition Classes
- HasLlamaCppProperties
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
getDefault[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
def
getDefragmentationThreshold: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getDisableTokenIds: Array[Int]
- Definition Classes
- HasLlamaCppProperties
-
def
getDynamicTemperatureExponent: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getDynamicTemperatureRange: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getEmbedding: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getEngine: String
- Definition Classes
- HasEngine
-
def
getFlashAttention: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getFrequencyPenalty: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getGrammar: String
- Definition Classes
- HasLlamaCppProperties
-
def
getGrpAttnN: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getGrpAttnW: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getIgnoreEos: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getInferenceParameters: InferenceParameters
- Attributes
- protected
- Definition Classes
- HasLlamaCppProperties
-
def
getInputCols: Array[String]
- returns
input annotations columns currently used
- Definition Classes
- HasInputAnnotationCols
-
def
getInputPrefix: String
- Definition Classes
- HasLlamaCppProperties
-
def
getInputPrefixBos: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getInputSuffix: String
- Definition Classes
- HasLlamaCppProperties
-
def
getLazyAnnotator: Boolean
- Definition Classes
- CanBeLazy
-
def
getLookupCacheDynamicFilePath: String
- Definition Classes
- HasLlamaCppProperties
-
def
getLookupCacheStaticFilePath: String
- Definition Classes
- HasLlamaCppProperties
-
def
getLoraAdapters: Map[String, Float]
- Definition Classes
- HasLlamaCppProperties
-
def
getMainGpu: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getMetadata: String
Get the metadata for the model
Get the metadata for the model
- Definition Classes
- HasLlamaCppProperties
- def getMetadataMap: Map[String, String]
-
def
getMinKeep: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getMinP: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getMiroStat: String
- Definition Classes
- HasLlamaCppProperties
-
def
getMiroStatEta: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getMiroStatTau: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getModelDraft: String
- Definition Classes
- HasLlamaCppProperties
- def getModelIfNotSet: GGUFWrapper
-
def
getModelParameters: ModelParameters
- Attributes
- protected
- Definition Classes
- HasLlamaCppProperties
-
def
getNBatch: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNChunks: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNCtx: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNDraft: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNGpuLayers: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNGpuLayersDraft: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNKeep: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNPredict: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNProbs: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNSequences: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNThreads: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNThreadsBatch: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNThreadsBatchDraft: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNThreadsDraft: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNUbatch: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getNoKvOffload: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getNuma: String
- Definition Classes
- HasLlamaCppProperties
-
final
def
getOrDefault[T](param: Param[T]): T
- Definition Classes
- Params
-
final
def
getOutputCol: String
Gets annotation column name going to generate
Gets annotation column name going to generate
- Definition Classes
- HasOutputAnnotationCol
-
def
getPSplit: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getParam(paramName: String): Param[Any]
- Definition Classes
- Params
-
def
getPenalizeNl: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getPenaltyPrompt: String
- Definition Classes
- HasLlamaCppProperties
-
def
getPoolingType: String
- Definition Classes
- HasLlamaCppProperties
-
def
getPresencePenalty: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getRepeatLastN: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getRepeatPenalty: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getRopeFreqBase: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getRopeFreqScale: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getRopeScalingType: String
- Definition Classes
- HasLlamaCppProperties
-
def
getSamplers: Array[String]
- Definition Classes
- HasLlamaCppProperties
-
def
getSeed: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getSplitMode: String
- Definition Classes
- HasLlamaCppProperties
-
def
getStopStrings: Array[String]
- Definition Classes
- HasLlamaCppProperties
-
def
getSystemPrompt: String
- Definition Classes
- HasLlamaCppProperties
-
def
getTemperature: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getTensorSplit: Array[Double]
- Definition Classes
- HasLlamaCppProperties
-
def
getTfsZ: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getTokenBias: Map[String, Float]
- Definition Classes
- HasLlamaCppProperties
-
def
getTokenIdBias: Map[Int, Float]
- Definition Classes
- HasLlamaCppProperties
-
def
getTopK: Int
- Definition Classes
- HasLlamaCppProperties
-
def
getTopP: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getTypicalP: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getUseChatTemplate: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getUseMlock: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getUseMmap: Boolean
- Definition Classes
- HasLlamaCppProperties
-
def
getYarnAttnFactor: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getYarnBetaFast: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getYarnBetaSlow: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getYarnExtFactor: Float
- Definition Classes
- HasLlamaCppProperties
-
def
getYarnOrigCtx: Int
- Definition Classes
- HasLlamaCppProperties
-
val
gpuSplitMode: Param[String]
Set how to split the model across GPUs
Set how to split the model across GPUs
- NONE: No GPU split
- LAYER: Split the model across GPUs by layer
- ROW: Split the model across GPUs by rows
- Definition Classes
- HasLlamaCppProperties
-
val
grammar: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
val
grpAttnN: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
grpAttnW: IntParam
- Definition Classes
- HasLlamaCppProperties
-
final
def
hasDefault[T](param: Param[T]): Boolean
- Definition Classes
- Params
-
def
hasParam(paramName: String): Boolean
- Definition Classes
- Params
-
def
hasParent: Boolean
- Definition Classes
- Model
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
ignoreEos: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
val
inputAnnotatorTypes: Array[AnnotatorType]
Annotator reference id.
Annotator reference id. Used to identify elements in metadata or to refer to this annotator type
- Definition Classes
- AutoGGUFModel → HasInputAnnotationCols
-
final
val
inputCols: StringArrayParam
columns that contain annotations necessary to run this annotator AnnotatorType is used both as input and output columns if not specified
columns that contain annotations necessary to run this annotator AnnotatorType is used both as input and output columns if not specified
- Attributes
- protected
- Definition Classes
- HasInputAnnotationCols
-
val
inputPrefix: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
val
inputPrefixBos: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
val
inputSuffix: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
final
def
isDefined(param: Param[_]): Boolean
- Definition Classes
- Params
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
isSet(param: Param[_]): Boolean
- Definition Classes
- Params
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
val
lazyAnnotator: BooleanParam
- Definition Classes
- CanBeLazy
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
val
logger: Logger
- Definition Classes
- HasLlamaCppProperties
-
val
lookupCacheDynamicFilePath: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
val
lookupCacheStaticFilePath: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
val
loraAdapters: StructFeature[Map[String, Float]]
- Definition Classes
- HasLlamaCppProperties
-
val
mainGpu: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
metadata: ProtectedParam[String]
- Definition Classes
- HasLlamaCppProperties
-
val
minKeep: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
minP: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
miroStat: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
val
miroStatEta: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
miroStatTau: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
modelDraft: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
def
msgHelper(schema: StructType): String
- Attributes
- protected
- Definition Classes
- HasInputAnnotationCols
-
val
nBatch: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nChunks: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nCtx: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nDraft: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nGpuLayers: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nGpuLayersDraft: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nKeep: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nPredict: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nProbs: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nSequences: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nThreads: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nThreadsBatch: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nThreadsBatchDraft: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nThreadsDraft: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
nUbatch: IntParam
- Definition Classes
- HasLlamaCppProperties
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
noKvOffload: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
numaStrategy: Param[String]
Set optimization strategies that help on some NUMA systems (if available)
Set optimization strategies that help on some NUMA systems (if available)
Available Strategies:
- DISABLED: No NUMA optimizations
- DISTRIBUTE: Spread execution evenly over all
- ISOLATE: Only spawn threads on CPUs on the node that execution started on
- NUMA_CTL: Use the CPU map provided by numactl
- MIRROR: Mirrors the model across NUMA nodes
- Definition Classes
- HasLlamaCppProperties
-
def
onWrite(path: String, spark: SparkSession): Unit
- Definition Classes
- AutoGGUFModel → ParamsAndFeaturesWritable
-
val
optionalInputAnnotatorTypes: Array[String]
- Definition Classes
- HasInputAnnotationCols
-
val
outputAnnotatorType: AnnotatorType
- Definition Classes
- AutoGGUFModel → HasOutputAnnotatorType
-
final
val
outputCol: Param[String]
- Attributes
- protected
- Definition Classes
- HasOutputAnnotationCol
-
val
pSplit: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
lazy val
params: Array[Param[_]]
- Definition Classes
- Params
-
var
parent: Estimator[AutoGGUFModel]
- Definition Classes
- Model
-
val
penalizeNl: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
val
penaltyPrompt: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
val
poolingType: Param[String]
Set the pooling type for embeddings, use model default if unspecified
Set the pooling type for embeddings, use model default if unspecified
- 0 UNSPECIFIED: Don't use any pooling
- 1 MEAN: Mean Pooling
- 2 CLS: CLS Pooling
- Definition Classes
- HasLlamaCppProperties
-
val
presencePenalty: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
repeatLastN: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
repeatPenalty: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
ropeFreqBase: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
ropeFreqScale: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
ropeScalingType: Param[String]
Set the RoPE frequency scaling method, defaults to linear unless specified by the model.
Set the RoPE frequency scaling method, defaults to linear unless specified by the model.
- UNSPECIFIED: Don't use any scaling
- LINEAR: Linear scaling
- YARN: YaRN RoPE scaling
- Definition Classes
- HasLlamaCppProperties
-
val
samplers: StringArrayParam
- Definition Classes
- HasLlamaCppProperties
-
def
save(path: String): Unit
- Definition Classes
- MLWritable
- Annotations
- @Since( "1.6.0" ) @throws( ... )
-
val
seed: IntParam
- Definition Classes
- HasLlamaCppProperties
-
def
set[T](param: ProtectedParam[T], value: T): AutoGGUFModel.this.type
Sets the value for a protected Param.
Sets the value for a protected Param.
If the parameter was already set, it will not be set again. Default values do not count as a set value and can be overridden.
- T
Type of the parameter
- param
Protected parameter to set
- value
Value for the parameter
- returns
This object
- Definition Classes
- HasProtectedParams
-
def
set[T](feature: StructFeature[T], value: T): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[K, V](feature: MapFeature[K, V], value: Map[K, V]): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[T](feature: SetFeature[T], value: Set[T]): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[T](feature: ArrayFeature[T], value: Array[T]): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
set(paramPair: ParamPair[_]): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set(param: String, value: Any): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set[T](param: Param[T], value: T): AutoGGUFModel.this.type
- Definition Classes
- Params
-
def
setBatchSize(size: Int): AutoGGUFModel.this.type
Size of every batch.
Size of every batch.
- Definition Classes
- HasBatchedAnnotate
-
def
setCachePrompt(cachePrompt: Boolean): AutoGGUFModel.this.type
Whether to remember the prompt to avoid reprocessing it
Whether to remember the prompt to avoid reprocessing it
- Definition Classes
- HasLlamaCppProperties
-
def
setChatTemplate(chatTemplate: String): AutoGGUFModel.this.type
The chat template to use
The chat template to use
- Definition Classes
- HasLlamaCppProperties
-
def
setDefault[T](feature: StructFeature[T], value: () ⇒ T): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
setDefault(paramPairs: ParamPair[_]*): AutoGGUFModel.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
setDefault[T](param: Param[T], value: T): AutoGGUFModel.this.type
- Attributes
- protected[org.apache.spark.ml]
- Definition Classes
- Params
-
def
setDefragmentationThreshold(defragThold: Float): AutoGGUFModel.this.type
Set the KV cache defragmentation threshold
Set the KV cache defragmentation threshold
- Definition Classes
- HasLlamaCppProperties
-
def
setDisableTokenIds(disableTokenIds: Array[Int]): AutoGGUFModel.this.type
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 ofFloat.NEGATIVE_INFINITY
.- Definition Classes
- HasLlamaCppProperties
-
def
setDynamicTemperatureExponent(dynatempExponent: Float): AutoGGUFModel.this.type
Set the dynamic temperature exponent
Set the dynamic temperature exponent
- Definition Classes
- HasLlamaCppProperties
-
def
setDynamicTemperatureRange(dynatempRange: Float): AutoGGUFModel.this.type
Set the dynamic temperature range
Set the dynamic temperature range
- Definition Classes
- HasLlamaCppProperties
-
def
setEmbedding(embedding: Boolean): AutoGGUFModel.this.type
Whether to load model with embedding support
Whether to load model with embedding support
- Definition Classes
- HasLlamaCppProperties
-
def
setFlashAttention(flashAttention: Boolean): AutoGGUFModel.this.type
Whether to enable Flash Attention
Whether to enable Flash Attention
- Definition Classes
- HasLlamaCppProperties
-
def
setFrequencyPenalty(frequencyPenalty: Float): AutoGGUFModel.this.type
Set the repetition alpha frequency penalty
Set the repetition alpha frequency penalty
- Definition Classes
- HasLlamaCppProperties
-
def
setGpuSplitMode(splitMode: String): AutoGGUFModel.this.type
Set how to split the model across GPUs
Set how to split the model across GPUs
- NONE: No GPU split -LAYER: Split the model across GPUs by layer 2. ROW: Split the model across GPUs by rows
- Definition Classes
- HasLlamaCppProperties
-
def
setGrammar(grammar: String): AutoGGUFModel.this.type
Set BNF-like grammar to constrain generations
Set BNF-like grammar to constrain generations
- Definition Classes
- HasLlamaCppProperties
-
def
setGrpAttnN(grpAttnN: Int): AutoGGUFModel.this.type
Set the group-attention factor
Set the group-attention factor
- Definition Classes
- HasLlamaCppProperties
-
def
setGrpAttnW(grpAttnW: Int): AutoGGUFModel.this.type
Set the group-attention width
Set the group-attention width
- Definition Classes
- HasLlamaCppProperties
-
def
setIgnoreEos(ignoreEos: Boolean): AutoGGUFModel.this.type
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
- HasLlamaCppProperties
-
final
def
setInputCols(value: String*): AutoGGUFModel.this.type
- Definition Classes
- HasInputAnnotationCols
-
def
setInputCols(value: Array[String]): AutoGGUFModel.this.type
Overrides required annotators column if different than default
Overrides required annotators column if different than default
- Definition Classes
- HasInputAnnotationCols
-
def
setInputPrefix(inputPrefix: String): AutoGGUFModel.this.type
Set the prompt to start generation with
Set the prompt to start generation with
- Definition Classes
- HasLlamaCppProperties
-
def
setInputPrefixBos(inputPrefixBos: Boolean): AutoGGUFModel.this.type
Whether to add prefix BOS to user inputs, preceding the
--in-prefix
stringWhether to add prefix BOS to user inputs, preceding the
--in-prefix
string- Definition Classes
- HasLlamaCppProperties
-
def
setInputSuffix(inputSuffix: String): AutoGGUFModel.this.type
Set a suffix for infilling
Set a suffix for infilling
- Definition Classes
- HasLlamaCppProperties
-
def
setLazyAnnotator(value: Boolean): AutoGGUFModel.this.type
- Definition Classes
- CanBeLazy
-
def
setLookupCacheDynamicFilePath(lookupCacheDynamicFilePath: String): AutoGGUFModel.this.type
Set a model alias
Set a model alias
- Definition Classes
- HasLlamaCppProperties
-
def
setLookupCacheStaticFilePath(lookupCacheStaticFilePath: String): AutoGGUFModel.this.type
Set a model alias
Set a model alias
- Definition Classes
- HasLlamaCppProperties
-
def
setLoraAdapters(loraAdapters: HashMap[String, Double]): AutoGGUFModel.this.type
Sets paths to lora adapters with user defined scale.
Sets paths to lora adapters with user defined scale. (PySpark Override)
- Definition Classes
- HasLlamaCppProperties
-
def
setLoraAdapters(loraAdapters: Map[String, Float]): AutoGGUFModel.this.type
Sets paths to lora adapters with user defined scale.
Sets paths to lora adapters with user defined scale.
- Definition Classes
- HasLlamaCppProperties
-
def
setMainGpu(mainGpu: Int): AutoGGUFModel.this.type
Set the GPU that is used for scratch and small tensors
Set the GPU that is used for scratch and small tensors
- Definition Classes
- HasLlamaCppProperties
-
def
setMetadata(metadata: String): AutoGGUFModel.this.type
Set the metadata for the model
Set the metadata for the model
- Definition Classes
- HasLlamaCppProperties
-
def
setMinKeep(minKeep: Int): AutoGGUFModel.this.type
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
- HasLlamaCppProperties
-
def
setMinP(minP: Float): AutoGGUFModel.this.type
Set min-p sampling
Set min-p sampling
- Definition Classes
- HasLlamaCppProperties
-
def
setMiroStat(mirostat: String): AutoGGUFModel.this.type
Set MiroStat sampling strategies.
Set MiroStat sampling strategies.
- DISABLED: No MiroStat
- V1: MiroStat V1
- V2: MiroStat V2
- Definition Classes
- HasLlamaCppProperties
-
def
setMiroStatEta(mirostatEta: Float): AutoGGUFModel.this.type
Set the MiroStat learning rate, parameter eta
Set the MiroStat learning rate, parameter eta
- Definition Classes
- HasLlamaCppProperties
-
def
setMiroStatTau(mirostatTau: Float): AutoGGUFModel.this.type
Set the MiroStat target entropy, parameter tau
Set the MiroStat target entropy, parameter tau
- Definition Classes
- HasLlamaCppProperties
-
def
setModelDraft(modelDraft: String): AutoGGUFModel.this.type
Set the draft model for speculative decoding
Set the draft model for speculative decoding
- Definition Classes
- HasLlamaCppProperties
- def setModelIfNotSet(spark: SparkSession, wrapper: GGUFWrapper): AutoGGUFModel.this.type
-
def
setNBatch(nBatch: Int): AutoGGUFModel.this.type
Set the logical batch size for prompt processing (must be >=32 to use BLAS)
Set the logical batch size for prompt processing (must be >=32 to use BLAS)
- Definition Classes
- HasLlamaCppProperties
-
def
setNChunks(nChunks: Int): AutoGGUFModel.this.type
Set the maximal number of chunks to process
Set the maximal number of chunks to process
- Definition Classes
- HasLlamaCppProperties
-
def
setNCtx(nCtx: Int): AutoGGUFModel.this.type
Set the size of the prompt context
Set the size of the prompt context
- Definition Classes
- HasLlamaCppProperties
-
def
setNDraft(nDraft: Int): AutoGGUFModel.this.type
Set the number of tokens to draft for speculative decoding
Set the number of tokens to draft for speculative decoding
- Definition Classes
- HasLlamaCppProperties
-
def
setNGpuLayers(nGpuLayers: Int): AutoGGUFModel.this.type
Set the number of layers to store in VRAM (-1 - use default)
Set the number of layers to store in VRAM (-1 - use default)
- Definition Classes
- HasLlamaCppProperties
-
def
setNGpuLayersDraft(nGpuLayersDraft: Int): AutoGGUFModel.this.type
Set the number of layers to store in VRAM for the draft model (-1 - use default)
Set the number of layers to store in VRAM for the draft model (-1 - use default)
- Definition Classes
- HasLlamaCppProperties
-
def
setNKeep(nKeep: Int): AutoGGUFModel.this.type
Set the number of tokens to keep from the initial prompt
Set the number of tokens to keep from the initial prompt
- Definition Classes
- HasLlamaCppProperties
-
def
setNPredict(nPredict: Int): AutoGGUFModel.this.type
Set the number of tokens to predict
Set the number of tokens to predict
- Definition Classes
- HasLlamaCppProperties
-
def
setNProbs(nProbs: Int): AutoGGUFModel.this.type
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
- HasLlamaCppProperties
-
def
setNSequences(nSequences: Int): AutoGGUFModel.this.type
Set the number of sequences to decode
Set the number of sequences to decode
- Definition Classes
- HasLlamaCppProperties
-
def
setNThreads(nThreads: Int): AutoGGUFModel.this.type
Set the number of threads to use during generation
Set the number of threads to use during generation
- Definition Classes
- HasLlamaCppProperties
-
def
setNThreadsBatch(nThreadsBatch: Int): AutoGGUFModel.this.type
Set the number of threads to use during batch and prompt processing
Set the number of threads to use during batch and prompt processing
- Definition Classes
- HasLlamaCppProperties
-
def
setNThreadsBatchDraft(nThreadsBatchDraft: Int): AutoGGUFModel.this.type
Set the number of threads to use during batch and prompt processing
Set the number of threads to use during batch and prompt processing
- Definition Classes
- HasLlamaCppProperties
-
def
setNThreadsDraft(nThreadsDraft: Int): AutoGGUFModel.this.type
Set the number of threads to use during draft generation
Set the number of threads to use during draft generation
- Definition Classes
- HasLlamaCppProperties
-
def
setNUbatch(nUbatch: Int): AutoGGUFModel.this.type
Set the physical batch size for prompt processing (must be >=32 to use BLAS)
Set the physical batch size for prompt processing (must be >=32 to use BLAS)
- Definition Classes
- HasLlamaCppProperties
-
def
setNoKvOffload(noKvOffload: Boolean): AutoGGUFModel.this.type
Whether to disable KV offload
Whether to disable KV offload
- Definition Classes
- HasLlamaCppProperties
-
def
setNumaStrategy(numa: String): AutoGGUFModel.this.type
Set optimization strategies that help on some NUMA systems (if available)
Set optimization strategies that help on some NUMA systems (if available)
Available Strategies:
- DISABLED: No NUMA optimizations
- DISTRIBUTE: spread execution evenly over all
- ISOLATE: only spawn threads on CPUs on the node that execution started on
- NUMA_CTL: use the CPU map provided by numactl
- MIRROR: Mirrors the model across NUMA nodes
- Definition Classes
- HasLlamaCppProperties
-
final
def
setOutputCol(value: String): AutoGGUFModel.this.type
Overrides annotation column name when transforming
Overrides annotation column name when transforming
- Definition Classes
- HasOutputAnnotationCol
-
def
setPSplit(pSplit: Float): AutoGGUFModel.this.type
Set the speculative decoding split probability
Set the speculative decoding split probability
- Definition Classes
- HasLlamaCppProperties
-
def
setParent(parent: Estimator[AutoGGUFModel]): AutoGGUFModel
- Definition Classes
- Model
-
def
setPenalizeNl(penalizeNl: Boolean): AutoGGUFModel.this.type
Set whether to penalize newline tokens
Set whether to penalize newline tokens
- Definition Classes
- HasLlamaCppProperties
-
def
setPenaltyPrompt(penaltyPrompt: String): AutoGGUFModel.this.type
Override which part of the prompt is penalized for repetition.
Override which part of the prompt is penalized for repetition.
- Definition Classes
- HasLlamaCppProperties
-
def
setPoolingType(poolingType: String): AutoGGUFModel.this.type
Set the pooling type for embeddings, use model default if unspecified
Set the pooling type for embeddings, use model default if unspecified
- UNSPECIFIED: Don't use any pooling
- MEAN: Mean Pooling
- CLS: CLS Pooling
- Definition Classes
- HasLlamaCppProperties
-
def
setPresencePenalty(presencePenalty: Float): AutoGGUFModel.this.type
Set the repetition alpha presence penalty
Set the repetition alpha presence penalty
- Definition Classes
- HasLlamaCppProperties
-
def
setRepeatLastN(repeatLastN: Int): AutoGGUFModel.this.type
Set the last n tokens to consider for penalties
Set the last n tokens to consider for penalties
- Definition Classes
- HasLlamaCppProperties
-
def
setRepeatPenalty(repeatPenalty: Float): AutoGGUFModel.this.type
Set the penalty of repeated sequences of tokens
Set the penalty of repeated sequences of tokens
- Definition Classes
- HasLlamaCppProperties
-
def
setRopeFreqBase(ropeFreqBase: Float): AutoGGUFModel.this.type
Set the RoPE base frequency, used by NTK-aware scaling
Set the RoPE base frequency, used by NTK-aware scaling
- Definition Classes
- HasLlamaCppProperties
-
def
setRopeFreqScale(ropeFreqScale: Float): AutoGGUFModel.this.type
Set the RoPE frequency scaling factor, expands context by a factor of 1/N
Set the RoPE frequency scaling factor, expands context by a factor of 1/N
- Definition Classes
- HasLlamaCppProperties
-
def
setRopeScalingType(ropeScalingType: String): AutoGGUFModel.this.type
Set the RoPE frequency scaling method, defaults to linear unless specified by the model.
Set the RoPE frequency scaling method, defaults to linear unless specified by the model.
- UNSPECIFIED: Don't use any scaling
- LINEAR: Linear scaling
- YARN: YaRN RoPE scaling
- Definition Classes
- HasLlamaCppProperties
-
def
setSamplers(samplers: Array[String]): AutoGGUFModel.this.type
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
- Definition Classes
- HasLlamaCppProperties
-
def
setSeed(seed: Int): AutoGGUFModel.this.type
Set the RNG seed
Set the RNG seed
- Definition Classes
- HasLlamaCppProperties
-
def
setStopStrings(stopStrings: Array[String]): AutoGGUFModel.this.type
Set strings upon seeing which token generation is stopped
Set strings upon seeing which token generation is stopped
- Definition Classes
- HasLlamaCppProperties
-
def
setSystemPrompt(systemPrompt: String): AutoGGUFModel.this.type
Set a system prompt to use
Set a system prompt to use
- Definition Classes
- HasLlamaCppProperties
-
def
setTemperature(temperature: Float): AutoGGUFModel.this.type
Set the temperature
Set the temperature
- Definition Classes
- HasLlamaCppProperties
-
def
setTensorSplit(tensorSplit: Array[Double]): AutoGGUFModel.this.type
Set how split tensors should be distributed across GPUs
Set how split tensors should be distributed across GPUs
- Definition Classes
- HasLlamaCppProperties
-
def
setTfsZ(tfsZ: Float): AutoGGUFModel.this.type
Set tail free sampling, parameter z
Set tail free sampling, parameter z
- Definition Classes
- HasLlamaCppProperties
-
def
setTokenBias(tokenBias: HashMap[String, Double]): AutoGGUFModel.this.type
Set the tokens to disable during completion.
Set the tokens to disable during completion. (Override for PySpark)
- Definition Classes
- HasLlamaCppProperties
-
def
setTokenBias(tokenBias: Map[String, Float]): AutoGGUFModel.this.type
Set the tokens to disable during completion.
Set the tokens to disable during completion.
- Definition Classes
- HasLlamaCppProperties
-
def
setTokenIdBias(tokenIdBias: HashMap[Integer, Double]): AutoGGUFModel.this.type
Set the token ids to disable in the completion.
Set the token ids to disable in the completion. (Override for PySpark)
- Definition Classes
- HasLlamaCppProperties
-
def
setTokenIdBias(tokenIdBias: Map[Int, Float]): AutoGGUFModel.this.type
Set the token ids to disable in the completion.
Set the token ids to disable in the completion.
- Definition Classes
- HasLlamaCppProperties
-
def
setTopK(topK: Int): AutoGGUFModel.this.type
Set top-k sampling
Set top-k sampling
- Definition Classes
- HasLlamaCppProperties
-
def
setTopP(topP: Float): AutoGGUFModel.this.type
Set top-p sampling
Set top-p sampling
- Definition Classes
- HasLlamaCppProperties
-
def
setTypicalP(typicalP: Float): AutoGGUFModel.this.type
Set locally typical sampling, parameter p
Set locally typical sampling, parameter p
- Definition Classes
- HasLlamaCppProperties
-
def
setUseChatTemplate(useChatTemplate: Boolean): AutoGGUFModel.this.type
Set whether or not generate should apply a chat template
Set whether or not generate should apply a chat template
- Definition Classes
- HasLlamaCppProperties
-
def
setUseMlock(useMlock: Boolean): AutoGGUFModel.this.type
Whether to force the system to keep model in RAM rather than swapping or compressing
Whether to force the system to keep model in RAM rather than swapping or compressing
- Definition Classes
- HasLlamaCppProperties
-
def
setUseMmap(useMmap: Boolean): AutoGGUFModel.this.type
Whether to use memory-map model (faster load but may increase pageouts if not using mlock)
Whether to use memory-map model (faster load but may increase pageouts if not using mlock)
- Definition Classes
- HasLlamaCppProperties
-
def
setYarnAttnFactor(yarnAttnFactor: Float): AutoGGUFModel.this.type
Set the YaRN scale sqrt(t) or attention magnitude
Set the YaRN scale sqrt(t) or attention magnitude
- Definition Classes
- HasLlamaCppProperties
-
def
setYarnBetaFast(yarnBetaFast: Float): AutoGGUFModel.this.type
Set the YaRN low correction dim or beta
Set the YaRN low correction dim or beta
- Definition Classes
- HasLlamaCppProperties
-
def
setYarnBetaSlow(yarnBetaSlow: Float): AutoGGUFModel.this.type
Set the YaRN high correction dim or alpha
Set the YaRN high correction dim or alpha
- Definition Classes
- HasLlamaCppProperties
-
def
setYarnExtFactor(yarnExtFactor: Float): AutoGGUFModel.this.type
Set the YaRN extrapolation mix factor
Set the YaRN extrapolation mix factor
- Definition Classes
- HasLlamaCppProperties
-
def
setYarnOrigCtx(yarnOrigCtx: Int): AutoGGUFModel.this.type
Set the YaRN original context size of model
Set the YaRN original context size of model
- Definition Classes
- HasLlamaCppProperties
-
val
stopStrings: StringArrayParam
- Definition Classes
- HasLlamaCppProperties
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
systemPrompt: Param[String]
- Definition Classes
- HasLlamaCppProperties
-
val
temperature: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
tensorSplit: DoubleArrayParam
- Definition Classes
- HasLlamaCppProperties
-
val
tfsZ: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
def
toString(): String
- Definition Classes
- Identifiable → AnyRef → Any
-
val
tokenBias: StructFeature[Map[String, Float]]
- Definition Classes
- HasLlamaCppProperties
-
val
tokenIdBias: StructFeature[Map[Int, Float]]
- Definition Classes
- HasLlamaCppProperties
-
val
topK: IntParam
- Definition Classes
- HasLlamaCppProperties
-
val
topP: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
final
def
transform(dataset: Dataset[_]): DataFrame
Given requirements are met, this applies ML transformation within a Pipeline or stand-alone Output annotation will be generated as a new column, previous annotations are still available separately metadata is built at schema level to record annotations structural information outside its content
Given requirements are met, this applies ML transformation within a Pipeline or stand-alone Output annotation will be generated as a new column, previous annotations are still available separately metadata is built at schema level to record annotations structural information outside its content
- dataset
Dataset[Row]
- Definition Classes
- AnnotatorModel → Transformer
-
def
transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
- Definition Classes
- Transformer
- Annotations
- @Since( "2.0.0" )
-
def
transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
- Definition Classes
- Transformer
- Annotations
- @Since( "2.0.0" ) @varargs()
-
final
def
transformSchema(schema: StructType): StructType
requirement for pipeline transformation validation.
requirement for pipeline transformation validation. It is called on fit()
- Definition Classes
- RawAnnotator → PipelineStage
-
def
transformSchema(schema: StructType, logging: Boolean): StructType
- Attributes
- protected
- Definition Classes
- PipelineStage
- Annotations
- @DeveloperApi()
-
val
typicalP: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
uid: String
- Definition Classes
- AutoGGUFModel → Identifiable
-
val
useChatTemplate: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
val
useMlock: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
val
useMmap: BooleanParam
- Definition Classes
- HasLlamaCppProperties
-
def
validate(schema: StructType): Boolean
takes a Dataset and checks to see if all the required annotation types are present.
takes a Dataset and checks to see if all the required annotation types are present.
- schema
to be validated
- returns
True if all the required types are present, else false
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
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
wrapColumnMetadata(col: Column): Column
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
def
write: MLWriter
- Definition Classes
- ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable
-
val
yarnAttnFactor: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
yarnBetaFast: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
yarnBetaSlow: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
yarnExtFactor: FloatParam
- Definition Classes
- HasLlamaCppProperties
-
val
yarnOrigCtx: IntParam
- Definition Classes
- HasLlamaCppProperties
Inherited from HasProtectedParams
Inherited from HasLlamaCppProperties
Inherited from HasEngine
Inherited from HasBatchedAnnotate[AutoGGUFModel]
Inherited from AnnotatorModel[AutoGGUFModel]
Inherited from CanBeLazy
Inherited from RawAnnotator[AutoGGUFModel]
Inherited from HasOutputAnnotationCol
Inherited from HasInputAnnotationCols
Inherited from HasOutputAnnotatorType
Inherited from ParamsAndFeaturesWritable
Inherited from HasFeatures
Inherited from DefaultParamsWritable
Inherited from MLWritable
Inherited from Model[AutoGGUFModel]
Inherited from Transformer
Inherited from PipelineStage
Inherited from Logging
Inherited from Params
Inherited from Serializable
Inherited from Serializable
Inherited from Identifiable
Inherited from AnyRef
Inherited from Any
Parameters
A list of (hyper-)parameter keys this annotator can take. Users can set and get the parameter values through setters and getters, respectively.