Skip to main content

Built-in benchmarks

Mill is in alpha. Five benchmarks ship today, spanning text and vision. Add your own with custom tasks or the Contributing guide. Pass either the benchmark name (mmlu) or an individual task (mmlu_abstract_algebra) to mill eval. Browse everything interactively with mill ls.
The vision benchmarks ship in two renderings of the same data. The benchmark sets pick_variant_by_model=True, so Mill automatically runs the rendering your model supports: the zero-shot task for CLIP-style encoders (image↔text similarity) and the generative multiple-choice task for vision-language models (which answer with a letter). You pass the benchmark name; Mill picks the variant.

Task types

task_type is the primary axis of a task — it declares what the task asks and decides which model interface serves it. output_type is a secondary scoring detail of the generative family only. The matching output types for the generative family:

MillTaskConfig fields

Define a task by creating a MillTaskConfig and exporting it in a TASKS_TABLE list:

Key fields

The Doc dataclass

prompt_function must return a Doc:

Multimodal tasks

Populate Doc.visuals, Doc.audios, or Doc.videos alongside query, and declare input_modalities so Mill only runs models that can ingest them:

Registering custom tasks

Point Mill at a directory containing your task file(s):
Mill auto-discovers any file that exports a TASKS_TABLE list (task files inside mill/tasks/ are discovered automatically).

Defining a benchmark

Group tasks under a benchmark name for cleaner CLI usage:
Set pick_variant_by_model=True when task_names are mutually-exclusive renderings of the same benchmark (e.g. a CLIP zero-shot task and a VLM generative-MCQ task): Mill runs the single variant whose task_type the model supports, instead of aggregating them. See mill/tasks/cifar10/task.py for a complete example.
Adding a benchmark is a guided, end-to-end process — locating the source benchmark, mirroring how it scores, validating against the published number, and documenting it. See the Contributing guide, which is backed by the adding-a-benchmark skill in the repo.