Skip to content
Vision models

Vision models

Train and serve models that read images with text and answer in text.

A vision model reads images and text and answers in text. Use one when the questions are about pictures: charts, screenshots, scanned forms, receipts or product photos. The workflow is the same as for a text model, with images carried along: import examples with images, review, create a version, train, evaluate and serve. Your application then sends images through the API.

A vision model can also train on text only, as every size of Gemma 4 can: see Train on text only.

Only images are supported, not audio or video, and answers are always text.

Supported models

Family Architecture in config.json Examples Status
Qwen3.5, Qwen3.6 and Qwen3.8 Qwen3_5ForConditionalGeneration Qwen/Qwen3.8-27B Supported
Qwen3.5 and Qwen3.6 MoE Qwen3_5MoeForConditionalGeneration Qwen/Qwen3.6-35B-A3B Supported
Qwen3.8 Flash-Next (mixture of experts) Qwen4ExpForConditionalGeneration Qwen/Qwen3.8-Flash-Next Supported, experimental
Gemma 4 (dense and mixture of experts) Gemma4ForConditionalGeneration, Gemma4UnifiedForConditionalGeneration google/gemma-4-12B-it, google/gemma-4-26B-A4B-it, google/gemma-4-31B-it Supported
Qwen2.5-VL Qwen2_5_VLForConditionalGeneration Qwen/Qwen2.5-VL-3B-Instruct Supported
Qwen3-VL Qwen3VLForConditionalGeneration Qwen/Qwen3-VL-4B-Instruct Supported
Gemma 3 Gemma3ForConditionalGeneration unsloth/gemma-3-4b-it Supported
SmolVLM Idefics3ForConditionalGeneration HuggingFaceTB/SmolVLM-Instruct Supported

Supported models says what each status means and gives each family's notes.

Like any base model, it must be public, or readable with your organization's own Hugging Face token, and have a chat template (see Projects). Its repository must also have an image processor, a preprocessor_config.json or an image_processor entry in processor_config.json (as Gemma 4 has), and must not need its own code: no auto_map in its configuration files. The readiness checks before training or deploying verify this.

  • Gemma 4 and Qwen3.5 to 3.8 remain vision models even with text-only prompts. SFT requires LoRA, on a version with images or of text alone. DPO supports LoRA, or QLoRA where the family offers it (see Supported models), with image, text-only or mixed preference pairs. You can also deploy and use these models with text.
  • Qwen3.8 Flash-Next trains as an experiment: SFT with LoRA on its text part, from a version of text examples, on one machine of 8 NVIDIA B200 GPUs. It is served on 4 or 8 GPUs, with bfloat16 weights and a bfloat16 KV cache, and its trained adapters read images too. See Supported models.
  • Google's own Gemma 3 repositories are gated. Use an ungated copy such as unsloth/gemma-3-4b-it, or accept Google's terms on Hugging Face with the account of your organization's Hugging Face token. Gemma 3 1B reads text only and is not a supported family, so the console warns about it.
  • SmolVLM2 is not supported. Use a SmolVLM version 1 model.
  • Other vision models, such as Qwen3-VL mixture-of-experts models, Llama 3.2 Vision, LLaVA, Mistral Small 3.1 or Phi-3.5-vision, are not supported.

Train on text only

Every model above trains with SFT and LoRA on a version without images. Import text as for any model, create a version and train: no image dataset and no image storage. Qwen3.8 Flash-Next has its own recipe.

The whole model loads on each training GPU, its vision tower included, so a run needs the same GPU memory as on images. On text the tower reads nothing and stays frozen, and the adapter changes the language part alone. The served model still reads images, with the tower as it was, though it was not trained on any.

Qwen3.5 to 3.8 reason before they answer when served: an answer holds its reasoning up to </think>, and then the answer, though your examples train an empty reasoning block. Only an evaluation shows how that scores: exact match can stay low, for the base model and the adapter alike.

A version with any image, in any split, trains on images as below. QLoRA stays with DPO on a vision model whose family offers it: SFT uses LoRA on text too. SmolVLM trains on one GPU, on text and on images. As with any model, run a trial before a full run.

Before you start

This is what training on images needs.

  • Nothing more on your plan: images are on every organization, for importing image data, training or evaluating on images, deploying, publishing or starting an adapter trained on images, and sending images in the Playground or the API. A plan Tensorant set up for your organization may leave them out: see Images, RL and decision models.
  • A project whose base model is one of the supported models.
  • Storage for the images. Training runs read them from Tensorant storage, a RunPod network volume or your own S3 bucket. Deploying or evaluating a model on images needs a RunPod network volume. See Connections.
  • For new image data, an image dataset on Hugging Face. Uploaded preference rows can reference images already in your organization's storage; they cannot embed arbitrary image URLs or local file paths. Text-only SFT and DPO need no image dataset.

From dataset to API

  1. Create a project with a vision base model.
  2. Import an image dataset from Hugging Face. See below.
  3. Review the examples. Images show as thumbnails; you edit the text around them. See Review.
  4. Create a version. The same image always stays in one split. See Versions.
  5. Run a baseline: deploy the base model and evaluate it. Test examples with images can only be sent to your own deployments. See Evaluations.
  6. Train with SFT and LoRA, or DPO and LoRA, or QLoRA where the family offers it, on preference pairs. See Training runs.
  7. Deploy and evaluate the adapter against the baseline.
  8. Try it in the Playground, publish it, and call it from your application.

An experiment runs steps 5 to 7 for you. Its readiness checks enforce the selected objective's rules: SFT on a vision model needs LoRA, on images or text alone; DPO needs paired training and validation data, also supports text-only prompts, and QLoRA where the family offers it, and trains on one GPU. Start with a trial, or a DPO trial, to qualify your model/GPU combination.

Import images from Hugging Face

  1. In Sources, choose Add sources, then Hugging Face.
  2. Enter the dataset under Hugging Face dataset URL or ID and choose Load dataset. Then choose the Subset, Split and Start at row. The recommended subset favors text, so check that it is the one with your images.
  3. Open First rows. Image cells show as their size, such as "Image · 850 × 600".
  4. Under Import as, choose Prompt and answer examples, Chat conversations (messages or ShareGPT) or Preference pairs for DPO, and set Image column (optional). In a vision project the suggested mapping fills it in for you.
  5. Set Rows to import and Use these rows for, and choose Import N rows.

The import runs in Activity like any Hugging Face import.

The image column must hold an image or a list of images, up to 4 per row. They are placed like this:

  • Prompt and answer examples: the images first, then the question.
  • Chat conversations (messages or ShareGPT) and preference pairs: the images fill the conversation's placeholders in order, either {"type": "image"} parts or <image> markers in user messages. If the counts differ, the row is skipped. Without placeholders, the images go at the start of the first user message.

For preference pairs, placeholders belong to the shared prompt. Both chosen and rejected answers see the same images; the answers remain text. See Shared image prompts.

Only user messages can carry images. A row with an empty image cell becomes a text example, unless its conversation has image placeholders: then it is skipped.

How images are read

The import reads the original image files from Hugging Face's parquet export of the split, not the re-encoded copies in the preview. Each image is checked:

  • PNG, JPEG, WebP and GIF are kept as they are. BMP and TIFF are converted to PNG. Other formats are refused.
  • An image can be at most 40 megapixels and 20 MB.

A row with an image that fails a check is skipped, with the reason in the import report.

Where images are kept

Images are stored in your organization's connected RunPod network volume or S3-compatible bucket, under images/<organization ID>/, with small thumbnails in its thumbnails/ folder. An image used in many examples, imports or projects is stored once.

Images pass through Tensorant when you import them, view them, or send them in the Playground or the API, but are not kept on the control server. A RunPod training GPU with a mounted network volume reads them there. With S3 or another training provider, the runner copies only the images used by its training and validation rows to the training machine and verifies their checksums. Held-out test images are not copied for training.

Managed image evaluations read from the RunPod network volume and still require RunPod compute and network storage. Tensorant downloads an API request's linked images and sends them to the model inline: the model's GPU never fetches links.

Images belong to your organization, and all its projects share them. Deleting an import or a project leaves them in connected storage, unless it is the organization's last project: then its images and thumbnails are scheduled for deletion too. Deleting an image manually can break examples and frozen versions that still reference it.

Images and the context length

Each image becomes tokens that count toward the context length, in training (Training window (tokens)) and when serving (Context length (tokens), or Serving context (tokens) in an experiment). In training they also count toward the training-token fee, as the trainer reads them. Approximate counts:

Family 1024 × 1024 image 1920 × 1080 image
Qwen2.5-VL about 1,371 tokens about 2,693 tokens
Qwen3-VL, Qwen3.5 to 3.8 about 1,026 tokens about 2,042 tokens
Gemma 3 259 tokens at any size 259 tokens
Gemma 4 about 258 tokens about 266 tokens
SmolVLM about 1,548 tokens about 1,183 tokens

A Gemma 4 image takes at most 282 tokens, whatever its size.

With Qwen models, the default Training window (tokens) of 2,048 is often too short for large photos. Raise it, and the deployment's Context length (tokens), to fit your longest example with its images and answer.

What is not supported

What Notes
New image files from uploads or pastes Import new images from Hugging Face. Preference rows may refer to images already stored for your organization.
Vision SFT with QLoRA, on images or text SFT on a vision model uses LoRA. DPO supports LoRA, or QLoRA where the family offers it.
Training the image part of the model The adapter trains only the language part.
Images sent to external model endpoints Images go only to deployments in your own RunPod account.
Images seen by an LLM judge Judges see [image] in place of each image. See The LLM judge.
Images in recipes Examples with images can't be recipe references, and generated examples are text only.
Changing an example's images Review edits only the text. To drop an image, reject the example.
Images in system or assistant messages Only user messages carry images.

Limits

Limit Value
Images per example or API request 4
Images in one Playground conversation 4, each up to 10 MB, 15 MB together
Stored image 20 MB and 40 megapixels
Rows per Hugging Face import No limit with your own connections; 1 to 5,000 on shared connections
New image data per import 5 GiB (images already stored don't count)
API request to a vision model 20 MiB with its images base64-encoded, inline or linked: about 15 MB of images in all
Image links in an API request https, up to 2,048 characters, all downloaded within 30 seconds. See Image links.
API requests with images, or over 2 MiB, at once 2 per organization, and 8 across the API, each until the model answers

When something goes wrong

Choosing the model

Message What to do
Warning: "Architecture is not one of the supported model families…" The model is not on the supported list, and it is treated as a text model. Choose a supported vision model to train with images. For SmolVLM2, use SmolVLM version 1.
"This model is gated on Hugging Face…" The model is gated, as Google's Gemma 3 is. Use an ungated copy, or see Projects for using it with your own Hugging Face token.
"Your Hugging Face token was refused. Reconnect it under Settings → Connections; public models work without it." The model is gated or private, and your organization's token was revoked or expired. An owner replaces it in Connections, or use an ungated copy.
"The model has no image processor (preprocessor_config.json, or image_processor in processor_config.json)" or "The model needs its own code…" Choose the family's official checkpoint or another copy that uses standard code.

Importing

Message What to do
"Images and vision training aren't part of your organization's plan…" A plan Tensorant set up for your organization leaves images out. Write to [email protected], or clear Image column (optional) to import the text alone.
"This project's model reads text only…" Clear Image column (optional), or switch the project to a vision model in Project settings.
"Image data needs connected S3 or RunPod network storage" Your organization uses storage provided by Tensorant, which can't hold images. Connect your own in Connections, or contact support.
"The image column must hold images" Name a column Hugging Face shows as images.
Images cannot be imported with the selected mapping Choose Prompt and answer examples, Chat conversations (messages or ShareGPT) or Preference pairs for DPO.
"Hugging Face has no parquet export of this split yet" Try again later.
"The row has N image placeholders and M images" (skipped row) Fix the placeholders in the dataset, or leave those rows out.
"An example can have at most 4 images" (skipped row) Split those rows in the dataset, or leave them out.
"An image of this row has no data" (skipped row) The image cell holds no image data, such as only a file path. Use a dataset that contains its images.
"The file is not an image that can be read" (skipped row) The image is damaged or in an unsupported format. Convert it to PNG or JPEG.
"The image is larger than 40 megapixels", "…than 20 MB" or "The image could not be checked" (skipped row) Scale the image down in the dataset, or save it as PNG or JPEG.
"The dataset changed during the import" Load the dataset again and start a new import. Imported rows stay.
"Import exceeds the image byte limit…" You reached 5 GiB of new images. Start a new import from where this one stopped.
"Kind: an unexpected error stopped this…" Often your network volume couldn't be written. Check the storage connection, then choose Retry.

Training, evaluating and serving

Message What to do
"Version vN has images. Choose a vision model to train on it.", "This version has images; choose a vision model to train on it", or "Example ID: this model does not read images" The project's model reads text only. Import the images into a project with a vision model.
"QLoRA isn't available for vision models yet. Choose LoRA." SFT on a vision model requires LoRA, on images or text alone. For preference training, DPO supports QLoRA where the model's family offers it.
"rows are longer than the sequence length of N tokens once images are counted" (in Training logs) Raise Training window (tokens), or reject the longest examples and create a new version.
"Images are only sent to this organization's own deployments" Evaluate on a deployment of this project's vision model.
"…exceed the serving context length of C once images are counted" Deploy with a longer Context length (tokens), or lower Longest answer (tokens).
"The model 'name' reads text only" Send images to a published vision model.
403 plan_upgrade_required, "Images and vision training aren't part of your organization's plan…" Write to [email protected]. Text requests to the same model are answered.
400 invalid_image, "Image URL must serve a bounded PNG, JPEG, WebP or GIF from a public HTTPS host without redirects" The link couldn't be downloaded, or its image made the request too large. Check it against Image links, or send the image inline.
429 rate_limit_exceeded, "The API is busy with large requests. Try again in a moment." Too many requests with images or over 2 MiB at once. Retry after a second, or send fewer at once.

Need a hand? Visit troubleshooting