Class SupervisedTuningSpec
-
- All Implemented Interfaces:
public abstract class SupervisedTuningSpec extends JsonSerializable
Supervised tuning spec for tuning.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSupervisedTuningSpec.BuilderBuilder for SupervisedTuningSpec.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description SupervisedTuningSpec()
-
Method Summary
Modifier and Type Method Description abstract Optional<Boolean>exportLastCheckpointOnly()Optional. abstract Optional<SupervisedHyperParameters>hyperParameters()Optional. abstract Optional<String>trainingDatasetUri()Required. abstract Optional<TuningMode>tuningMode()Tuning mode. abstract Optional<String>validationDatasetUri()Optional. static SupervisedTuningSpec.Builderbuilder()Instantiates a builder for SupervisedTuningSpec. abstract SupervisedTuningSpec.BuildertoBuilder()Creates a builder with the same values as this instance. static SupervisedTuningSpecfromJson(String jsonString)Deserializes a JSON string to a SupervisedTuningSpec object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
exportLastCheckpointOnly
abstract Optional<Boolean> exportLastCheckpointOnly()
Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false.
-
hyperParameters
abstract Optional<SupervisedHyperParameters> hyperParameters()
Optional. Hyperparameters for SFT.
-
trainingDatasetUri
abstract Optional<String> trainingDatasetUri()
Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
-
tuningMode
abstract Optional<TuningMode> tuningMode()
Tuning mode.
-
validationDatasetUri
abstract Optional<String> validationDatasetUri()
Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset.
-
builder
static SupervisedTuningSpec.Builder builder()
Instantiates a builder for SupervisedTuningSpec.
-
toBuilder
abstract SupervisedTuningSpec.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static SupervisedTuningSpec fromJson(String jsonString)
Deserializes a JSON string to a SupervisedTuningSpec object.
-
-
-
-