FineTunesRequestBody

sttp.openai.requests.finetunes.FineTunesRequestBody
See theFineTunesRequestBody companion object
case class FineTunesRequestBody(trainingFile: String, validationFile: Option[String], model: Option[FineTuneModel], nEpochs: Option[Int], batchSize: Option[Int], learningRateMultiplier: Option[Double], promptLossWeight: Option[Double], computeClassificationMetrics: Option[Boolean], classificationNClasses: Option[Int], classificationPositiveClass: Option[String], classificationBetas: Option[Seq[Double]], suffix: Option[String])

Attributes

batchSize

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.

classificationBetas

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.

classificationNClasses

The number of classes in a classification task.

classificationPositiveClass

The positive class in binary classification.

computeClassificationMetrics

If set, we calculate classification-specific metrics such as accuracy and F-1 score using the validation set at the end of every epoch. These metrics can be viewed in the results file. In order to compute classification metrics, you must provide a validationFile. Additionally, you must specify classificationNClasses for multiclass classification or classificationPositiveClass for binary classification.

learningRateMultiplier

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.

model

The name of the base model to fine-tune.

nEpochs

The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.

promptLossWeight

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.

suffix

A string of up to 40 characters that will be added to your fine-tuned model name.

trainingFile

The ID of an uploaded file that contains training data.

validationFile

The ID of an uploaded file that contains validation data.

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product