Skip to main content
Vision-language models (VLMs) combine language understanding with visual comprehension. Fine-tuning a VLM adapts it to image-and-text tasks such as visual question answering, image captioning, and document understanding. This page covers the VLM-specific data shape, supported models, and launch parameters.

Supported models

The following models support vision-language fine-tuning. See supported models for context lengths and batch limits.

Prepare your data

Prepare data in a JSONL file, where each line represents one example, with messages that contain text and images. Constraints include:
  • Image encoding: Each image is base64-encoded with a MIME type prefix (data:image/jpeg;base64,...). If your data references URLs, download and encode the images first.
  • Per-example image limit: 10 images.
  • Per-image size: 10 MB.
  • Supported formats: PNG, JPEG, WEBP.
Only user messages can contain images.

Conversational format

Instruction format

Preference format

Convert image URLs to base64

Python

Validate and upload

Upload your data using the Together Python/TypeScript SDK or the Together CLI:
Sample response:

Launch the job

By default, fine-tuning only updates language-model parameters. Pass train_vision=True to also update the vision encoder. The trade-off here is that training the encoder costs more compute and is rarely necessary unless your domain images are extremely dissimilar from the pretraining data.
For full fine-tuning, set lora=False. For details on all available parameters, see the API reference.

Watch and deploy

VLM jobs use the same lifecycle as text jobs:
  • Poll the job with the SDK or CLI. Expect 15 to 60 minutes for a LoRA job on an 8B model with a few thousand examples, and several hours for a full job on a 30B model.
  • Deploy the result on a dedicated endpoint.
VLM endpoints accept the same vision request shapes as the base models. See vision inputs for details.