OpenAI Chat Model Fine-Tuner

This node allows you to fine-tune an OpenAI Chat Model based on a conversation table.

The fine-tuning data needs to be in the following format and contain at least 10 conversations, each of which must contain at least one system message:

ID Role Content
1 system You are a happy assistant that puts a positive spin on everything.
1 user I lost my tennis match today.
1 assistant It's ok, it happens to everyone.
2 user I lost my book today.
2 assistant You can read everything on ebooks these days!
id_string system You are a happy assistant that puts a positive spin on everything.
id_string assistant You're great!

For a training file with 100,000 tokens trained over 3 epochs, the expected cost would be ~$2.40 USD. For more information, visit OpenAI

Options

Data

Conversation ID column

Column containing references to group rows into conversations.

Role column

Column containing the message role. Can be either 'system', 'assistant' or 'user'.

Content column

Column containing the message contents.

Fine-tuning

Training epochs

An epoch refers to one full cycle through the training dataset. If set to 'Auto', OpenAI will determine a reasonable value.

Available options:

  • Auto: OpenAI will determine a reasonable value for the configuration.
  • Custom: Allows to specify a custom value for the configuration.
Number of training epochs

An epoch refers to one full cycle through the training dataset.

Batch size

A larger batch size means that model parameters are updated less frequently, but with lower variance. If set to 'Auto', OpenAI will determine a reasonable value.

Available options:

  • Auto: OpenAI will determine a reasonable value for the configuration.
  • Custom: Allows to specify a custom value for the configuration.
Custom batch size

A larger batch size means that model parameters are updated less frequently, but with lower variance.

Learning rate factor

A smaller learning rate may be useful to avoid overfitting. If set to 'Auto', OpenAI will determine a reasonable value.

Available options:

  • Auto: OpenAI will determine a reasonable value for the configuration.
  • Custom: Allows to specify a custom value for the configuration.
Custom scaling factor

A smaller learning rate may be useful to avoid overfitting.

Output

Model name suffix

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

Polling interval (s)

The time interval in seconds in which the node will check the progress of the fine-tuning job.

Input Ports

Icon

Configured OpenAI Chat Model which supports fine-tuning.

Icon

The data should be presented across 3 columns:

One column specifying a conversation ID, one representing the role of a message (system, assistant and user), and the third for the content of the message.

The table has to include at least 10 conversations, each of which must contain at least one system message.

Output Ports

Icon

Configured fine-tuned OpenAI Chat Model connection.

Icon

Metrics to evaluate the fine-tuning performance. The values of the metrics are: 'train loss', 'train accuracy', 'valid loss', and 'valid mean token accuracy' for each step of training.

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.