-
public final class LlmModuleConfig.BuilderBuilder class for constructing LlmModuleConfig instances with optional parameters.
The builder provides a fluent interface for configuring model parameters and validates required fields before construction.
-
-
Method Summary
Modifier and Type Method Description final LlmModuleConfig.BuildermodulePath(String modulePath)Sets the path to the module. final LlmModuleConfig.BuildertokenizerPath(String tokenizerPath)Sets the path to the tokenizer. final LlmModuleConfig.Buildertemperature(Float temperature)Sets the temperature for sampling generation. final LlmModuleConfig.BuilderdataPath(String dataPath)Sets the path to optional additional data files. final LlmModuleConfig.BuildermodelType(Integer modelType)Sets the model type (text-only or multimodal). final LlmModuleConfig.BuildernumBos(Integer numBos)Sets the number of BOS tokens to prepend. final LlmModuleConfig.BuildernumEos(Integer numEos)Sets the number of EOS tokens to append. final LlmModuleConfig.BuilderloadMode(Integer loadMode)Sets the load mode for the model file. final LlmModuleConfigbuild()Constructs the LlmModuleConfig instance with validated parameters. -
-
Method Detail
-
modulePath
final LlmModuleConfig.Builder modulePath(String modulePath)
Sets the path to the module.
-
tokenizerPath
final LlmModuleConfig.Builder tokenizerPath(String tokenizerPath)
Sets the path to the tokenizer.
-
temperature
final LlmModuleConfig.Builder temperature(Float temperature)
Sets the temperature for sampling generation.
-
dataPath
final LlmModuleConfig.Builder dataPath(String dataPath)
Sets the path to optional additional data files.
-
modelType
final LlmModuleConfig.Builder modelType(Integer modelType)
Sets the model type (text-only or multimodal).
-
numBos
final LlmModuleConfig.Builder numBos(Integer numBos)
Sets the number of BOS tokens to prepend.
-
numEos
final LlmModuleConfig.Builder numEos(Integer numEos)
Sets the number of EOS tokens to append.
-
loadMode
final LlmModuleConfig.Builder loadMode(Integer loadMode)
Sets the load mode for the model file. Defaults to LOAD_MODE_MMAP (mmap without mlock), which avoids pinning model pages in RAM.
-
build
final LlmModuleConfig build()
Constructs the LlmModuleConfig instance with validated parameters.
-
-
-
-