Skip to main content

Systematic Fine-Tuning

Why Fine-Tune?

Fine-tuning task-specific LLMs can potentially help you achieve better results and lower costs compared to using general large models. Fine-tuned models can be run on-premises or in your virtual private cloud (VPC), providing greater control over sensitive data.

Not all tasks need fine-tuning

For performance improvement purposes, Fine-tuning is usually only necessary for hyper-specific tasks that the base model is not familiar with. It makes sense if you believe the data you have is very specific and unique and likely have not been included or well represented in the training data of commercial off the shelf models.

Steps to Fine-Tune

If you decide to pursue fine-tuning, you'll need to start with a dataset and select appropriate open-source models. Relari's systematic fine-tuning service can help you navigate this process to achieve optimal performance.

Step-by-Step Process

  1. Define and Curate the Dataset: Gather and prepare the dataset that is relevant to your specific task. Ensure the dataset is representative of the scenarios you expect the model to handle. It is oftentimes necessary to augment the dataset with synthetic datasets to cover edge cases and reduce regression.

  2. Select Open-Source Models: Choose suitable open-source models that align with your requirements. These models will serve as the base for fine-tuning. Relari supports the latest open-source models including Llama 3.1 70B, 8B, Mistal 7B, 8x7B and closed source models such as OpenAI GPT-4o-mini, GPT-4o.

  3. Select Evaluation Metrics: Define evaluation metrics to measure the performance of the fine-tuned model. Metrics should capture the model's ability to handle the specific task while identifying any regressions in performance.

  4. Iteratively Evaluate and Fine-Tune the Model: Use the curated dataset and selected models to train the task-specific model. This involves iterative feeding/curating datasets and evaluating to achieve optimal performance.

Continuous Fine-Tuning

Fine-tuning doesn't have to be a one-time process. By establishing a systematic pipeline, you can continuously fine-tune new or existing models with the tailored dataset and metrics. This allows you to leverage new open-source models as they are released, ensuring your models remain up-to-date and performant.

Get in Touch

If you're interested in discussing fine-tuning further, please reach out to us.