Fine-Tuning
Fine-tuning is the process of taking a pretrained model and further training it on a domain-specific dataset to improve its knowledge and provide better responses in that domain.
When you fine tune a model in AI quick actions, you're creating a Data Science
job to do that. You need to have the necessary policy to
use Data Science Jobs to create a fine-tuning job to fine tune
a foundation model in AI quick actions. When you create a fine-tuning job, you can choose a
dataset to train the base model. Foundation models with the tag Ready to Fine
Tune
in the Model explorer can be fine-tuned. You can choose a dataset from Object Storage or upload a dataset from the storage of the
notebook that you're working in. When you upload datasets from a notebook, they're saved to
the Object Storage bucket where the fine-tuned model is saved.
Hence, you need the policy to let the notebook session write files to Object Storage. The dataset must be in JSONL format and must
include the necessary 'prompt' and 'completion' columns. Optionally, you can include a
'category' column. If a dataset file with the same name already exists in the bucket, it's
replaced by the new file. The dataset must contain a minimum of 100 records for
fine-tuning.
You have the option to set what percentage of the dataset is for model validation. Model version set is a way to group a set of models related to each other together. You can select an existing model version set to put the fine-tuned model in or create a new one. You can save the fine-tuned model in an Object Storage bucket which must have versioning enabled.
After you have entered the Model Information, Dataset, Model Version set, and where to save the fine-tuned model, you can pick the compute infrastructure and networking for the fine tuning job. Optionally, you can set up logging to monitor the fine-tuning job. We recommended logging for troubleshooting any errors in the job. You need the necessary policy to set up logging. Single-node training and training with several GPU cards are supported. You can specify the parameters for fine-tuning the model, the epochs, and learning rate.
You can review the configurations and parameters you have set for the fine-tuning job before the job is created.
For a complete list of parameters and values for AI Quick Actions CLI commands, see AI Quick Actions CLI.
This task can't be performed using the API.