-
public class LlmGenerationConfig.BuilderBuilder class for constructing LlmGenerationConfig instances.
Provides a fluent interface for configuring generation parameters with sensible defaults.All methods return the builder instance to enable method chaining.
-
-
Method Summary
Modifier and Type Method Description LlmGenerationConfig.Builderecho(boolean echo)Sets whether to include the input prompt in the generated output. LlmGenerationConfig.BuildermaxNewTokens(int maxNewTokens)Sets the maximum number of new tokens to generate. LlmGenerationConfig.Builderwarming(boolean warming)Enables or disables model warming. LlmGenerationConfig.BuilderseqLen(int seqLen)Sets the maximum sequence length for generation. LlmGenerationConfig.Buildertemperature(float temperature)Sets the temperature for random sampling. LlmGenerationConfig.BuildernumBos(int numBos)Sets the number of BOS tokens to prepend. LlmGenerationConfig.BuildernumEos(int numEos)Sets the number of EOS tokens to append. LlmGenerationConfigbuild()Constructs the LlmGenerationConfig instance with the configured parameters. -
-
Method Detail
-
echo
LlmGenerationConfig.Builder echo(boolean echo)
Sets whether to include the input prompt in the generated output.
- Parameters:
echo- true to include input prompt, false to return only new tokens
-
maxNewTokens
LlmGenerationConfig.Builder maxNewTokens(int maxNewTokens)
Sets the maximum number of new tokens to generate.
- Parameters:
maxNewTokens- the token limit (-1 for unlimited generation)
-
warming
LlmGenerationConfig.Builder warming(boolean warming)
Enables or disables model warming.
- Parameters:
warming- true to generate initial tokens for model warmup
-
seqLen
LlmGenerationConfig.Builder seqLen(int seqLen)
Sets the maximum sequence length for generation.
- Parameters:
seqLen- maximum sequence length (-1 for default behavior)
-
temperature
LlmGenerationConfig.Builder temperature(float temperature)
Sets the temperature for random sampling.
- Parameters:
temperature- sampling temperature (typical range 0.0-1.
-
numBos
LlmGenerationConfig.Builder numBos(int numBos)
Sets the number of BOS tokens to prepend.
- Parameters:
numBos- number of BOS tokens
-
numEos
LlmGenerationConfig.Builder numEos(int numEos)
Sets the number of EOS tokens to append.
- Parameters:
numEos- number of EOS tokens
-
build
LlmGenerationConfig build()
Constructs the LlmGenerationConfig instance with the configured parameters.
-
-
-
-