choonkeat/elm-openai/3.0.0

OpenAI.FineTune

Fine-tuning lets you get more out of the models available through the API by providing:

  • Higher quality results than prompt design
  • Ability to train on more examples than can fit in a prompt
  • Token savings due to shorter prompts
  • Lower latency requests

See https://beta.openai.com/docs/guides/fine-tuning

create : Input -> TaskInput (Error String) FineTune
list : TaskInput (Error String) (List FineTune)
type alias Input =
{ training_file_id : String
, validation_file : Maybe String
, model : Maybe BaseModel
, n_epochs : Maybe Int
, batch_size : Maybe Int
, learning_rate_multiplier : Maybe Float
, prompt_loss_weight : Maybe Float
, compute_classification_metrics : Maybe Bool
, classification_n_classes : Maybe Int
, classification_positive_class : Maybe String
, classification_betas : Maybe (List Float)
, suffix : Maybe String
}
= Ada
| Babbage
| Curie
| Davinci
| FineTuned 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. To learn more about these models, see the Models documentation.

type alias FineTune =
{ id : String
, object : String
, model : ModelID
, created_at : Posix
, events : List Event
, fine_tuned_model : Maybe String
, hyperparams : HyperParameters
, organization_id : String
, result_files : List File
, status : JobStatus
, validation_files : List File
, training_files : List File
, updated_at : Posix
}
type alias HyperParameters =
{ batch_size : Int
, learning_rate_multiplier : Float
, n_epochs : Int
, prompt_loss_weight : Float
}
= Pending
| Succeeded
| Cancelled
| Other String
type alias Event =
{ object : String
, created_at : Posix
, level : String
, message : String
}