-
-
Notifications
You must be signed in to change notification settings - Fork 49
FineTuneHyperparamters
The hyperparameters used to tweak the Fine-tune model.
public struct FineTuneHyperparamters: Codable
Codable
The batch size to use for training.
public let batchSize: Int?
The batch size is the number of training examples used to train a single forward and backward pass.
By default, the batch size will be dynamically configured to be ~0.2% of the number of examples in the training set, capped at 256 - in general, we've found that larger batch sizes tend to work better for larger datasets.
The learning rate multiplier to use for training.
public let learningRateMultiplier: Double?
The fine-tuning learning rate is the original learning rate used for pretraining multiplied by this value.
By default, the learning rate multiplier is the 0.05, 0.1, or 0.2 depending on final batch_size
(larger learning rates tend to perform better with larger batch sizes).
We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.
The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
public let nEpochs: Int
The weight to use for loss on the prompt tokens.
public let promptLossWeight: Double
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.
If prompts are extremely long (relative to completions), it may make sense to reduce this weight so as to avoid over-prioritizing learning the prompt.
Generated at 2023-03-04T02:43:47+0000 using swift-doc 1.0.0-rc.1.
Types
- ChatChoice
- ChatMessage
- ChatParameters
- ChatResponse
- ChatRole
- Choice
- CompletionParameters
- CompletionResponse
- Configuration
- ContentPolicyCategories
- ContentPolicyCategoryScore
- ContentPolicyModels
- ContentPolicyParameters
- ContentPolicyResponse
- ContentPolicyResult
- CreateFineTuneParameters
- DeleteObject
- EditParameters
- EditResponse
- EmbeddingsData
- EmbeddingsParameters
- EmbeddingsResponse
- EmbeddingsUsage
- File
- FileStatus
- FineTune
- FineTuneEvent
- FineTuneEventInfo
- FineTuneEventsResponse
- FineTuneHyperparamters
- FineTuneStatus
- FineTuneTraining
- FormData
- HTTPMethod
- ImageData
- ImageEditParameters
- ImageParameters
- ImageResolutions
- ImageResponse
- ImageVariationParameters
- ListFilesResponse
- ListFineTuneResponse
- ListModelResponse
- Model
- ModelPermission
- OpenAIError
- OpenAIErrorMessage
- OpenAIErrorResponse
- OpenAIObject
- ResponseFormat
- UploadFileParameters
- Usage
Global Functions
- cancelFineTune(fineTune:)
- checkContentPolicy(parameters:)
- createEmbeddings(parameters:)
- createFineTune(parameters:)
- createImage(parameters:)
- decodeBase64Image(_:)
- decodeUrl(_:with:apiKey:body:method:bodyRequired:formSubmission:)
- deleteFile(fileId:)
- deleteFineTuneModel(model:)
- generateChatCompletion(parameters:)
- generateCompletion(parameters:)
- generateEdit(parameters:)
- generateImageEdits(parameters:)
- generateImageVariations(parameters:)
- listFiles()
- listFineTuneEvents(fineTune:)
- listFineTunes()
- listModels()
- retrieveFile(fileId:)
- retrieveFileContent(fileId:)
- retrieveFineTune(fineTune:)
- retrieveJsonLine(_:with:apiKey:)
- retrieveModel(modelId:)
- uploadFile(parameters:)