Skip to content

Fine Tune

Train or Fine Tune a model via supervised, unsupervised or rlhf fine tuning

Parameters:

Name Type Description Default
model_name str

The name of the model - which is referenced in the model_ids table alongside the model_id.

required
model_type str

Model that is used to do the fine tuning - could be "FT-GPT", "Llama3" for supervised, "MLM" for unsupervised.

FTGPT
fine_tuning_type str

The type of fine tuning - could be "supervised", "unsupervised" or "rlhf"

required
x_train_csv DataFrame

training data for fine tuning (string is csv of file path)- for each row could contain question or context entries

required
y_train_csv DataFrame

training labels for fine tuning (string is csv of file path) - for each row could contain answer entries

required
initial_model_id str

if rlhf fine tuning type, can add initial unsupervised model id from pretraining step for transfer learning

required
document_files list[str]

A list of file paths to documents for document-based tasks for training. Example: ['path/to/file1.pdf', 'path/to/file2.pdf'].

required

Returns:

Name Type Description
response dict

A JSON response from the API, including the model_id of the trained model.