Prepare your training datasets for fine-tuning and continued pre-training
Before you can begin a model customization job, you need to minimally prepare a training dataset. Whether a validation dataset is supported and the format of your training and validation dataset depend on the following factors.
-
The type of fine-tuning customization job (Fine-tuning or Continued Pre-training).
-
The input and output modalities of the data.
Supported modalities for fine-tuning and continued pre-training
The following table shows the input and output modalities that distillation supports with each model:
-
Fine-Tuning: Text-to-Text — Model generates textual output from textual input by learning language-based patterns such as grammar, semantics, or contextual meaning. Fine-tuning enables the model to perform specific tasks like summarization, translation, or answering questions.
-
Fine-Tuning: Text-Image-to-Text — Model generates textual output from both text and image inputs, supporting tasks like image captioning or visual question answering. Fine-tuning enhances the model's ability to interpret and combine multimodal data for improved task-specific performance.
-
Fine-Tuning: Text-to-Image — Model generates image outputs from textual prompts by translating descriptive text into detailed visual representations. Fine-tuning tailors the model to produce domain-specific or stylistically consistent images.
-
Fine-Tuning: Image-to-Embeddings — Model generates embeddings (numeric representations) from image inputs for tasks like classification, retrieval, or multimodal alignment. Fine-tuning optimizes the embedding space for accuracy and relevance in specific applications.
-
Fine-Tuning: Single-Turn Messaging — Model generates concise and contextually accurate responses for isolated, single-turn input messages. Fine-tuning improves the model's ability to handle one-off conversational exchanges effectively.
-
Fine-Tuning: Multi-Turn Messaging — Model generates coherent and contextually aware responses in multi-turn conversations by maintaining context across exchanges. Fine-tuning enhances the model's ability to manage dialogue flow and sustain context over extended conversations.
| Model name | Fine-tuning:Text-to-text | Fine-tuning:Image-text-to-text | Fine-tuning: Text-to-image & Image-to-embeddings | Fine-tuning: Single-turn messaging | Fine-tuning: Multi-turn messaging | Continued Pre-training:Text-to-text |
|---|---|---|---|---|---|---|
| Amazon Titan Text G1 - Express | Yes | No | No | No | No | Yes |
| Amazon Titan Text G1 - Lite | Yes | No | No | No | No | Yes |
| Amazon Titan Text Premier | Yes | No | No | No | No | No |
| Amazon Titan Image Generator G1 V1 | Yes | No | Yes | No | No | No |
| Amazon Titan Multimodal Embeddings G1 G1 | Yes | No | Yes | No | No | No |
| Anthropic Claude 3 Haiku | No | No | No | Yes | Yes | No |
| Cohere Command | Yes | No | No | No | No | No |
| Cohere Command Light | Yes | No | No | No | No | No |
| Meta Llama 3.1 8B Instruct | Yes | No | No | No | No | No |
| Meta Llama 3.1 70B Instruct | Yes | No | No | No | No | No |
| Meta Llama 3.2 1B Instruct | No | No | No | Yes (Converse API format) | Yes (Converse API format) | No |
| Meta Llama 3.2 3B Instruct | No | No | No | Yes (Converse API format) | Yes (Converse API format) | No |
| Meta Llama 3.2 11B Instruct Vision | No | Yes | No | Yes (Converse API format) | Yes (Converse API format) | No |
| Meta Llama 3.2 90B Instruct Vision | No | Yes | No | Yes (Converse API format) | Yes (Converse API format) | No |
To see the default quotas that apply for training and validation datasets used for customizing different models, see the Sum of training and validation records quotas in Amazon Bedrock endpoints and quotas in the AWS General Reference.
Prepare datasets for fine-tuning
To prepare training and validation datasets for your custom model, you create .jsonl files, each line of which is a JSON object corresponding to a record. The files you create must conform to the format for the customization method and model that you choose and the records in it must conform to size requirements.
The format depends on the input and output modality of the model. Choose the tab for your preferred method, and then follow the steps:
Prepare datasets for continued pre-training
To carry out continued pre-training on a text-to-text model, prepare a training and optional validation dataset. Because Continued Pre-training involves unlabeled data, each JSON line is a sample containing only an input field. Use 6 characters per token as an approximation for the number of tokens. The format is as follows.
{"input": "<input text>"} {"input": "<input text>"} {"input": "<input text>"}
The following is an example item that could be in the training data.
{"input": "AWS stands for Amazon Web Services"}
Model requirements for training and validation datasets
Select a tab to see the requirements for training and validation datasets for a model:

