Skip to main content

Overview

Mill uses the ChatMessages protocol to pass multimodal inputs — images, video frames, or audio — alongside text. The model backend handles format conversion automatically.

Built-in vision benchmarks

Mill ships three image benchmarks, each runnable by CLIP-style encoders and vision-language models (see Reproducibility for results): Each benchmark auto-selects the rendering your model supports. To add your own multimodal task, see How multimodal tasks work and register it with --task_paths.

Using a model config file

Multimodal models need their modalities declared as a list — which can’t be expressed inline in brackets — so configure them with a Python config file (opencompass style):
A config file exports a top-level model dict (mirroring TransformersModel keyword arguments, plus optional abbr and run_cfg). The bundled Qwen2.5-VL config:

Available config families

How multimodal tasks work

A multimodal task’s prompt_function (or doc_to_visual) returns a Doc with the visuals field populated. Mill assembles a ChatMessages object and passes it to the model:

Video tasks

Install the video extra first:
Video tasks work the same way — Doc.videos holds paths to video files, and Mill uses decord to decode frames before passing them to the model.

Limiting samples