Fine-Tuning
Fine-tuning is a powerful tool for customizing pre-trained models to fit specific needs. At Tromero, we've made it easier than ever for users to fine-tune their models using our User Interface, Python, TypeScript libraries, or CLI.
Start Through Tromero's Python and TypeScript libraries
In order for users to be able to start fine-tuning jobs through Tromero's Python, TypeScript library or the CLI they will need to first install the library.
pip install tromero
Users can then start a job in the following way:
import os
from tromero import Tromero
client = Tromero(tromero_key=os.getenv("TROMERO_KEY"))
parameters = {
'epoch': 1,
'tags': ['tag1', 'tag2'],
'custom_dataset': 'your-dataset-name'
}
response = client.fine_tuning_jobs.create(
model_name='{model_name}',
base_model='llama-3.1-70B-instruct',
parameters=parameters
)
Start Through Tromero's UI
Step by Step Guide:
1. Configure Basic Settings
- Model Name: Enter a name for your fine-tuned model.
- Base Model: Select the base model you would like to use for fine-tuning.
2. Select Training Data
Users can choose the type of data to use for the training:
- All logs: Use all available logs.
- By tags: Select logs based on specific tags.
- By dataset: Select logs based on the dataset name.
- Upload logs: Upload logs specifically for this training job. You can choose to save these logs with custom tags or not save them, in which case the data will not be stored on our servers after the training.
3. Adjust Advanced Settings
For advanced users, we provide the option to adjust the following parameters:
- Epochs: The number of complete passes through the training dataset.
- Batch Size: The number of training examples utilized in one iteration.
- Learning Rate: The step size at each iteration while moving toward a minimum of the loss function.
If you are unsure about these settings, we recommend leaving them as auto.
4. Handle Invalid Logs
While we strive to ensure logs are in the correct format, some interactions might create logs that do not conform to our required standard. In such cases, you have two options:
- Skip logs with errors: Continue the training with only the valid logs, skipping the invalid ones.
- Stop training on errors: Abort the training job and alert you about the invalid logs.
Note: If training is done with an insufficient number of valid logs, there might be minimal improvement over the base models used.
5. Review Estimates
To help users make informed decisions, we provide an estimation box that includes:
- Estimated Time to Train: An estimate of how long the training will take.
- Estimated Cost: An estimate of the cost based on the selected base model, advanced settings, and number of logs.
- Recommended Minimum Number of Logs: A recommendation on the minimum number of logs needed for significant model improvement.
6. Start Training!
If you need further assistance, please contact support@tromero.ai and we would be happy to help!