FineTuneRequest class

Annotations
  • @freezed

Constructors

FineTuneRequest({@JsonKey(name: 'training_file') required String trainingFile, @JsonKey(name: 'validation_file') String? validationFile, String? model, @JsonKey(name: 'n_epochs') int? nEpochs, @JsonKey(name: 'batch_size') int? batchSize, @JsonKey(name: 'learning_rate_multiplier') double? learningRateMultiplier, @JsonKey(name: 'prompt_loss_weight') double? promptLossWeight, @JsonKey(name: 'compute_classification_metrics') bool? computeClassificationMetrics, @JsonKey(name: 'classification_n_classes') int? classificationNClasses, @JsonKey(name: 'classification_positive_class') String? classificationPositiveClass, @JsonKey(name: 'classification_betas') List<double>? classificationBetas, String? suffix})
const
factory
FineTuneRequest.fromJson(Map<String, Object?> json)
factory

Properties

batchSize int?
The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass.
no setterinherited
classificationBetas List<double>?
If this is provided, we calculate F-beta scores at the specified beta values. The F-beta score is a generalization of F-1 score. This is only used for binary classification.
no setterinherited
classificationNClasses int?
The number of classes in a classification task.
no setterinherited
classificationPositiveClass String?
The positive class in binary classification.
no setterinherited
computeClassificationMetrics bool?
If set, we calculate classification-specific metrics such as accuracy and F-1 score using the validation set at the end of every epoch.
no setterinherited
copyWith → $FineTuneRequestCopyWith<FineTuneRequest>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
learningRateMultiplier double?
The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pretraining multiplied by this value.
no setterinherited
model String?
The name of the base model to fine-tune. You can select one of "ada", "babbage", "curie", "davinci", or a fine-tuned model created after 2022-04-21.
no setterinherited
nEpochs int?
The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
no setterinherited
promptLossWeight double?
The weight to use for loss on the prompt tokens. This controls how much the model tries to learn to generate the prompt (as compared to the completion which always has a weight of 1.0), and can add a stabilizing effect to training when completions are short.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix String?
A string of up to 40 characters that will be added to your fine-tuned model name.
no setterinherited
trainingFile String
The ID of an uploaded file that contains training data. See upload file for how to upload a file.
no setterinherited
validationFile String?
The ID of an uploaded file that contains validation data.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited