Interface Datum.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<Datum.Builder,,Datum> SdkBuilder<Datum.Builder,,Datum> SdkPojo
- Enclosing class:
Datum
@Mutable
@NotThreadSafe
public static interface Datum.Builder
extends SdkPojo, CopyableBuilder<Datum.Builder,Datum>
-
Method Summary
Modifier and TypeMethodDescriptionlossFnInputs(Map<String, TensorData> lossFnInputs) The tensor inputs for the loss function, keyed by name.default Datum.BuildermodelInput(Consumer<ModelInput.Builder> modelInput) The tokenized input to feed to the model.modelInput(ModelInput modelInput) The tokenized input to feed to 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
-
modelInput
The tokenized input to feed to the model.
- Parameters:
modelInput- The tokenized input to feed to the model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
modelInput
The tokenized input to feed to the model.
This is a convenience method that creates an instance of theModelInput.Builderavoiding the need to create one manually viaModelInput.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tomodelInput(ModelInput).- Parameters:
modelInput- a consumer that will call methods onModelInput.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
lossFnInputs
The tensor inputs for the loss function, keyed by name. Unsupported keys are rejected. Supported keys:
target_tokens,weights,advantages,logprobs,ref_log_prob,temperature. Required keys depend on the loss function type: SFT (cross_entropy) requirestarget_tokensandweights; RL (ppo,cispo,importance_sampling) requirestarget_tokens,weights,advantages, andlogprobs.- Parameters:
lossFnInputs- The tensor inputs for the loss function, keyed by name. Unsupported keys are rejected. Supported keys:target_tokens,weights,advantages,logprobs,ref_log_prob,temperature. Required keys depend on the loss function type: SFT (cross_entropy) requirestarget_tokensandweights; RL (ppo,cispo,importance_sampling) requirestarget_tokens,weights,advantages, andlogprobs.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-