Fine-tuning
Overview
LLMs in general are typically trained for generic use cases. Fine-tuning LLMs allows users to further train the model to provide more accurate answers for a specific domain or use case. This process involves providing the model with a dataset containing examples of input and output from a specific domain. LLM Labs helps simplify this process by providing a user-friendly way to fine-tune and deploy open-source models, allowing you to tailor LLMs to your exact needs.
Create fine-tuned models
This section guides you through the process of fine-tuning your models in LLM Labs.
Step 1: Set up model
Navigate to the Models page.
On the Available tab, go to the Fine-tuned LLMs section, and click Create fine-tuned model.
My models page Set up your fine-tuning job.
Set up model Name your fine-tuned model.
Select a base model that you want to fine-tune. You can select either:
Pre-trained LLMs. Currently, we support:
Amazon Nova Micro
Amazon Nova Lite
Amazon Nova Pro
Amazon Titan Text G1 - Express
Amazon Titan Text G1 - Lite
Cohere Command
Cohere Command Light
Meta Llama 3.1 8B
Meta Llama 3.1 70B
Existing fine-tuned models
Choose a dataset. You can upload either a .csv consisting of 2 columns:
prompt
,expected completion
, or you can choose an existing dataset from the library. For the validation dataset, you have 3 options:Split from selected dataset: Datasaur will split the uploaded dataset and use it for validation data. You will need to configure the validation size using a percentage.
Split from selected dataset Use new dataset: You will need to add a new dataset to use as validation.
Use new dataset None: Choose this option if you don't want to add a validation dataset. Please note that if you select Cohere Command or Cohere Command Light as the base model, you are required to have validation data.
Step 2: Adjust hyperparameters
Next, you will need to configure the hyperparameters for your fine-tuning project.

The fundamental hyperparameters are:
Amazon Titan Text G1 - Express
Epochs, and Learning rate.
Amazon Titan Text G1 - Lite
Epochs, and Learning rate.
Cohere Command
Epochs, and Learning rate.
Cohere Command Light
Epochs, and Learning rate.
Meta Llama 2 13B
Epochs, and Learning rate.
Meta Llama 2 70B
Epochs, and Learning rate.
In addition to the fundamental hyperparameters, there are advanced hyperparameters with preset default values. These hyperparameters are always applied, but you can adjust them for further hyperparameter fine-tuning if desired. The advanced hyperparameters include:
Amazon Titan Text G1 - Express
Batch size, and Learning rate warmup steps
Amazon Titan Text G1 - Lite
Batch size, and Learning rate warmup steps
Cohere Command
Batch size, Early stopping threshold, and Early stopping patience.
Cohere Command Light
Batch size, Early stopping threshold, and Early stopping patience.
Meta Llama 2 13B
Batch size.
Meta Llama 2 70B
Batch size.
Step 3: Review job
The last step is to review your fine-tuning job before you start the process.
Review job You can also view the predicted cost by clicking the View total predicted cost button on the Costs section. It will calculate and show you the total predicted cost for starting the fine-tuning process.
Once you have reviewed the configuration, you will need to check the acknowledgement checkbox.
Lastly, click Start fine-tuning job and the training process will start.
Once the training process is complete, your model will be available to deploy.
My models page
Model management
Model status
There are 7 possible statuses for the fine-tuned models.
Training: The model is currently being trained on your dataset. This status indicates that the training process is in progress, and the model is learning from your data.
Training status Training failed: The model training process has failed due to an error. This status indicates that the training process was interrupted, and you may need to investigate and resolve the issue.
Training failed Stopping training: The model training process is being stopped. This status indicates that someone has chosen to stop the training.
Stopping training Training stopped: The model training process has been stopped. This status indicates that the training process has been successfully stopped, and you can’t continue the training once it stopped.
Training stopped Not deployed: The model has been trained but has not yet been deployed for use. You can deploy the model to use it in Sandbox.
Not deployed Deploying: The model is being deployed for use. This status indicates that the deployment process is in progress, and the model will soon be available for use in Sandbox.
Deploying Deployed: The model has been successfully deployed. This status indicates that the model is now available for use in Sandbox, and you can start using it to generate predictions or responses.
Deployed
Deploy models
To deploy a fine-tuned model:
Click Deploy model to start the deployment.
In the dialog that appears, specify the auto undeploy schedule.
Click Deploy model in the dialog to confirm and the process will start.
Deploying process Once the process is finish, your model will be available to use for experiment in Sandbox. Learn more about Sandbox
Model deployed
Undeploy models
Click the more menu (three-dots) in the right corner of the model card and select Undeploy.
Undeploy model Confirm the process by clicking Undeploy in the dialog that appears.
Your model will be undeployed and you will no longer be charged for the hourly cost.
View model details
To view the model details, click the more menu (three-dots) and select View details. The details of the fine-tuned model will be shown.

In this dialog, you can view the dataset, validation dataset, models used, hyperparameter configurations, the creator, and storage cost information.

Delete models
To delete a fine-tuned model, click the more menu (three-dots) and select Delete.

In the dialog that appears, check the acknowledgement checkbox, and confirm the deletion by clicking Delete model.

Use in Sandbox
Once a fine-tuned model is deployed, it will be available in the Sandbox for further experimentation and testing. This allows you to integrate and test the specialized model within your specific applications. Learn more about Sandbox.

Last updated