Interface SampleOperationConfig.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<SampleOperationConfig.Builder,,SampleOperationConfig> SdkBuilder<SampleOperationConfig.Builder,,SampleOperationConfig> SdkPojo
- Enclosing class:
SampleOperationConfig
-
Method Summary
Modifier and TypeMethodDescriptiondefault SampleOperationConfig.BuildercomputeLogprobs(Consumer<ComputeLogprobsConfig.Builder> computeLogprobs) The configuration for computing log-probabilities of prompt tokens without generating new text.computeLogprobs(ComputeLogprobsConfig computeLogprobs) The configuration for computing log-probabilities of prompt tokens without generating new text.default SampleOperationConfig.BuilderloadWeightsForSampling(Consumer<LoadWeightsForSamplingConfig.Builder> loadWeightsForSampling) The configuration for loading model weights for inference and sampling without restoring optimizer state.loadWeightsForSampling(LoadWeightsForSamplingConfig loadWeightsForSampling) The configuration for loading model weights for inference and sampling without restoring optimizer state.default SampleOperationConfig.Buildersample(Consumer<SampleConfig.Builder> sample) The configuration for generating text samples from the model.sample(SampleConfig sample) The configuration for generating text samples from the model.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
-
sample
The configuration for generating text samples from the model.
- Parameters:
sample- The configuration for generating text samples from the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
sample
The configuration for generating text samples from the model.
This is a convenience method that creates an instance of theSampleConfig.Builderavoiding the need to create one manually viaSampleConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tosample(SampleConfig).- Parameters:
sample- a consumer that will call methods onSampleConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
computeLogprobs
The configuration for computing log-probabilities of prompt tokens without generating new text.
- Parameters:
computeLogprobs- The configuration for computing log-probabilities of prompt tokens without generating new text.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
computeLogprobs
default SampleOperationConfig.Builder computeLogprobs(Consumer<ComputeLogprobsConfig.Builder> computeLogprobs) The configuration for computing log-probabilities of prompt tokens without generating new text.
This is a convenience method that creates an instance of theComputeLogprobsConfig.Builderavoiding the need to create one manually viaComputeLogprobsConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocomputeLogprobs(ComputeLogprobsConfig).- Parameters:
computeLogprobs- a consumer that will call methods onComputeLogprobsConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
loadWeightsForSampling
SampleOperationConfig.Builder loadWeightsForSampling(LoadWeightsForSamplingConfig loadWeightsForSampling) The configuration for loading model weights for inference and sampling without restoring optimizer state.
- Parameters:
loadWeightsForSampling- The configuration for loading model weights for inference and sampling without restoring optimizer state.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loadWeightsForSampling
default SampleOperationConfig.Builder loadWeightsForSampling(Consumer<LoadWeightsForSamplingConfig.Builder> loadWeightsForSampling) The configuration for loading model weights for inference and sampling without restoring optimizer state.
This is a convenience method that creates an instance of theLoadWeightsForSamplingConfig.Builderavoiding the need to create one manually viaLoadWeightsForSamplingConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toloadWeightsForSampling(LoadWeightsForSamplingConfig).- Parameters:
loadWeightsForSampling- a consumer that will call methods onLoadWeightsForSamplingConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-