Text to SQL:
Fine-Tune Model

In this section, we’ll improve the model by fine-tuning it. Fine-tuning is a crucial step that can significantly enhance the model’s performance, allowing it to adapt more effectively to your specific task and data. Without fine-tuning, our model may not fully capture the nuances of our customer complaint domain or achieve optimal accuracy.

Let’s dive in!

Set Up Model Fine-Tuning Job

  1. Go to the Models tab in your project.
  2. Select Fine-tune Model.
  3. In New model name, provide a unique model name.
  4. In Snapshot, select your saved snapshot. (Note: This field is an optional field.)
  5. Select Next.

Choose Model and Training Parameters

  1. Select a Base model and a Resource Pool.
  2. Choose the Number of GPUs.
  3. Toggle Advanced Mode to access and adjust:
    • Learning Rate—Controls the impact of each training step.
    • Context Window—Sets the max token count for text chunks during training.
    • Batch sizes (per GPU) for Training and Validation.
    • Training strategy settings like Epochs, Log Cadence, and Save Cadence.
  4. Enable settings like FP16 for efficiency, Deep Speed for resource management, and Gradient Checkpointing if memory is limited.
  5. Click Next.

Pick Dataset and Splits

  1. The dataset linked in your snapshot should pre-fill. Verify and adjust if necessary.
  2. Review and link the dataset if not already done.
  3. Click Next.

Review Your Prompt and Launch

  1. Review the pre-loaded prompt and make any edits if needed.
  2. Select Launch Fine-tuning to start the fine-tuning process.

Monitor Fine-Tuning Training Job

  1. To monitor the status, navigate to Fine-tuning to view Fine-tuning Jobs.
  2. Select fine-tuning training job to view its details in the Machine Learning Development Environment cluster.

The fine-tuning training job may take a while depending on the size of the job. Once it’s ready, you’ll see the model listed in the Models section of the dashboard.


Recap

  • Fine-Tune the Model: The model was fine-tuned using a specific snapshot, which enhanced its performance significantly. Fine-tuning allowed the model to adapt more closely to the nuances of the customer complaints domain.