Programmatic Fine-tuning
In addition to using the Web UI for fine-tuning models, customers can also kick off fine-tuning jobs programmatically using the Fine-tuning API or via the Cohere Python SDK. This can be useful for fine-tuning jobs that happen on a regular cadence, such as fine-tuning nightly on newly-acquired data.
Datasets
Before a fine-tuning job can be started, users must upload a Dataset with training and (optionally) evaluation data. The contents and structure of the dataset will vary depending on the type of fine-tuning. Read more about preparing the training data for Chat, Classify, and Rerank fine-tuning.
The snippet below creates a dataset for fine-tuning a model on records of customer service interactions.
Starting a Fine-tuning Job
Below is an example of starting a fine-tuning job of a generative model for Chat using a dataset of conversational data.
Fine-tuning results
When the fine-tuning model is ready you will receive an email notification. You can explore the evaluation metrics using the Dashboard and try out your model using one of our APIs on the Playground.