Interface SamplingParams.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<SamplingParams.Builder,,SamplingParams> SdkBuilder<SamplingParams.Builder,,SamplingParams> SdkPojo
- Enclosing class:
SamplingParams
@Mutable
@NotThreadSafe
public static interface SamplingParams.Builder
extends SdkPojo, CopyableBuilder<SamplingParams.Builder,SamplingParams>
-
Method Summary
Modifier and TypeMethodDescriptionThe maximum number of tokens to generate per sample.The random seed for reproducible sampling.The list of stop sequences that terminate generation when encountered in the output.stop(Collection<String> stop) The list of stop sequences that terminate generation when encountered in the output.temperature(Double temperature) The sampling temperature controlling randomness.The number of highest-probability vocabulary tokens to keep for top-k filtering.The cumulative probability threshold for nucleus (top-p) sampling.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
maxTokens
The maximum number of tokens to generate per sample.
- Parameters:
maxTokens- The maximum number of tokens to generate per sample.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
temperature
The sampling temperature controlling randomness. Higher values produce more diverse outputs.
- Parameters:
temperature- The sampling temperature controlling randomness. Higher values produce more diverse outputs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
topK
The number of highest-probability vocabulary tokens to keep for top-k filtering. Set to -1 to disable.
- Parameters:
topK- The number of highest-probability vocabulary tokens to keep for top-k filtering. Set to -1 to disable.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
topP
The cumulative probability threshold for nucleus (top-p) sampling. Only tokens with cumulative probability below this threshold are considered.
- Parameters:
topP- The cumulative probability threshold for nucleus (top-p) sampling. Only tokens with cumulative probability below this threshold are considered.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
seed
The random seed for reproducible sampling. When set, the same seed with the same input produces deterministic outputs.
- Parameters:
seed- The random seed for reproducible sampling. When set, the same seed with the same input produces deterministic outputs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stop
The list of stop sequences that terminate generation when encountered in the output.
- Parameters:
stop- The list of stop sequences that terminate generation when encountered in the output.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stop
The list of stop sequences that terminate generation when encountered in the output.
- Parameters:
stop- The list of stop sequences that terminate generation when encountered in the output.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-