Skip to content
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5e0bdbf
add mieb and mieb-lite to benchmarks
isaac-chung Feb 11, 2025
b70104b
add CompositionalityEvaluation and DocumentUnderstanding types
isaac-chung Feb 12, 2025
6e1b23c
add VisionCentric type
isaac-chung Feb 12, 2025
9418a72
add missing comma
isaac-chung Feb 12, 2025
b9cf1e9
split STS17MultilingualVisualSTS and STSBenchmarkMultilingualSTS to e…
isaac-chung Feb 12, 2025
a4de1f6
use aggregate task instead so we can name the subsets
isaac-chung Feb 12, 2025
4eb6b8c
shorten names
isaac-chung Feb 12, 2025
0d72520
fix import
isaac-chung Feb 12, 2025
3e17f63
alternative strategy to avoid using get_task
isaac-chung Feb 12, 2025
c6b7966
follow other aggregate tasks and skip metadata test
isaac-chung Feb 12, 2025
9aa4d30
Merge branch 'main' into add-mieb-as-benchmark
isaac-chung Feb 14, 2025
7575c9e
run LB without errors when selecting MIEB(-lite)
isaac-chung Feb 14, 2025
d5aeb25
add back the capability as taks type
isaac-chung Feb 14, 2025
61cd1ff
typo
isaac-chung Feb 14, 2025
44a4687
extend description
isaac-chung Feb 15, 2025
0a87566
split into mieb(eng) and mieb(multilingual)
isaac-chung Feb 15, 2025
01889a3
remove unneeded files
isaac-chung Feb 15, 2025
57aba95
remove aggtask additions for test
isaac-chung Feb 16, 2025
583ce02
Merge branch 'main' into add-mieb-as-benchmark
isaac-chung Feb 16, 2025
84ca555
edit descriptions based on screenshots
isaac-chung Feb 16, 2025
9d124a7
shorten
isaac-chung Feb 16, 2025
fe8975d
rename to Compositionality and include ImageCoDeT2IMultiChoice
isaac-chung Feb 17, 2025
dd5d19e
re-tag missing VisionCentric tasks
isaac-chung Feb 17, 2025
4083459
re-tag rparis and roxford as retrieval and include fixes
isaac-chung Feb 17, 2025
bb35e57
re-tag voc2007 as image cls
isaac-chung Feb 17, 2025
e0db71c
make lint
isaac-chung Feb 17, 2025
fb1c330
correct num task types in descriptions
isaac-chung Feb 18, 2025
d54b902
add one model to models_to_annotate
isaac-chung Feb 18, 2025
4dbb472
Merge remote-tracking branch 'origin/main' into add-mieb-as-benchmark
isaac-chung Feb 18, 2025
b67b1b3
add mieb reference models
isaac-chung Feb 18, 2025
a4ca77a
update task types
isaac-chung Feb 21, 2025
389a982
Merge branch 'main' into add-mieb-as-benchmark
isaac-chung Feb 21, 2025
c167588
relabel to multilingual retrieval task type to align with paper
isaac-chung Feb 24, 2025
18cb52f
fix reference and bibtex
isaac-chung Feb 24, 2025
1826d7c
edit task list to match with final list
gowitheflow-1998 Feb 24, 2025
bf9531f
add back agg task to reproduce table column in paper
isaac-chung Feb 24, 2025
293e452
Merge branch 'main' into add-mieb-as-benchmark
isaac-chung Feb 24, 2025
f48fa0a
fix filtering and import
isaac-chung Feb 24, 2025
d4bd024
update tests
isaac-chung Feb 24, 2025
867da2d
mieb lite add back missing tasks
isaac-chung Feb 24, 2025
40ecf63
fix metadata test
isaac-chung Feb 25, 2025
ca9d769
multi should have all 4 variants
isaac-chung Feb 25, 2025
fe411b1
fix task counts
isaac-chung Feb 25, 2025
a45a789
lite has 10 task types
isaac-chung Feb 25, 2025
8644224
fix visualSTS-17 lang splits
isaac-chung Feb 25, 2025
65b164b
Aggregate task can now use subsets & eval langs to filter TaskResults
isaac-chung Feb 25, 2025
1f372ec
fix test and mark VisualSTS17 as multilingual
isaac-chung Feb 26, 2025
c1c2aeb
fix tests
isaac-chung Feb 26, 2025
ec82ee3
add agg task running script
isaac-chung Feb 26, 2025
2af6455
add voyage meta
isaac-chung Feb 26, 2025
a3d60c2
fix citations
isaac-chung Feb 26, 2025
bc81855
capitalize
isaac-chung Feb 26, 2025
5e2f80b
add coarse/fine labels
isaac-chung Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions mteb/abstasks/TaskMetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,16 @@
MIEB_TASK_TYPE = (
"Any2AnyMultiChoice",
"Any2AnyRetrieval",
"Any2TextMutipleChoice",
"Any2AnyMultilingualRetrieval",
"VisionCentric",
"ImageClustering",
"ImageClassification",
"ImageMultilabelClassification",
"ImageTextPairClassification",
"VisualSTS",
"DocumentUnderstanding",
"VisualSTS(eng)",
"VisualSTS(multi)",
Comment thread
isaac-chung marked this conversation as resolved.
"ZeroShotClassification",
"Compositionality",
)

TASK_TYPE = (
Expand Down
247 changes: 247 additions & 0 deletions mteb/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,253 @@
}""",
)

MIEB_common_tasks = [
# Image Classification
"Birdsnap",
"Caltech101",
"CIFAR10",
"CIFAR100",
"Country211",
"DTD",
"EuroSAT",
"FER2013",
"FGVCAircraft",
"Food101Classification",
"GTSRB",
"Imagenet1k",
"MNIST",
"OxfordFlowersClassification",
"OxfordPets",
"PatchCamelyon",
"RESISC45",
"StanfordCars",
"STL10",
"SUN397",
"UCF101",
# ImageMultiLabelClassification
"VOC2007",
# Clustering
"CIFAR10Clustering",
"CIFAR100Clustering",
"ImageNetDog15Clustering",
"ImageNet10Clustering",
"TinyImageNetClustering",
# ZeroShotClassification
"BirdsnapZeroShot",
"Caltech101ZeroShot",
"CIFAR10ZeroShot",
"CIFAR100ZeroShot",
"CLEVRZeroShot",
"CLEVRCountZeroShot",
"Country211ZeroShot",
"DTDZeroShot",
"EuroSATZeroShot",
"FER2013ZeroShot",
"FGVCAircraftZeroShot",
"Food101ZeroShot",
"GTSRBZeroShot",
"Imagenet1kZeroShot",
"MNISTZeroShot",
"OxfordPetsZeroShot",
"PatchCamelyonZeroShot",
"RenderedSST2",
"RESISC45ZeroShot",
"StanfordCarsZeroShot",
"STL10ZeroShot",
"SUN397ZeroShot",
"UCF101ZeroShot",
# Any2TextMutipleChoice
"CVBenchCount",
"CVBenchRelation",
"CVBenchDepth",
"CVBenchDistance",
# Any2AnyMultipleChoice
"BLINKIT2IMultiChoice",
"BLINKIT2TMultiChoice",
"ImageCoDeT2IMultiChoice",
# ImageTextPairClassification
"AROCocoOrder",
"AROFlickrOrder",
"AROVisualAttribution",
"AROVisualRelation",
"SugarCrepe",
"Winoground",
# VisualSTS
"STS12VisualSTS",
"STS13VisualSTS",
"STS14VisualSTS",
"STS15VisualSTS",
"STS16VisualSTS",
# Any2AnyRetrieval
"BLINKIT2IRetrieval",
"BLINKIT2TRetrieval",
"CIRRIT2IRetrieval",
"CUB200I2IRetrieval",
"EDIST2ITRetrieval",
"Fashion200kI2TRetrieval",
"Fashion200kT2IRetrieval",
"FashionIQIT2IRetrieval",
"Flickr30kI2TRetrieval",
"Flickr30kT2IRetrieval",
"FORBI2IRetrieval",
"GLDv2I2IRetrieval",
"GLDv2I2TRetrieval",
"HatefulMemesI2TRetrieval",
"HatefulMemesT2IRetrieval",
"ImageCoDeT2IRetrieval",
"ImageCoDeT2IMultiChoice",
"InfoSeekIT2ITRetrieval",
"InfoSeekIT2TRetrieval",
"MemotionI2TRetrieval",
"MemotionT2IRetrieval",
"METI2IRetrieval",
"MSCOCOI2TRetrieval",
"MSCOCOT2IRetrieval",
"NIGHTSI2IRetrieval",
"OVENIT2ITRetrieval",
"OVENIT2TRetrieval",
"ROxfordEasyI2IMultiChoice",
"ROxfordMediumI2IMultiChoice",
"ROxfordHardI2IMultiChoice",
"RP2kI2IRetrieval",
"RParisEasyI2IMultiChoice",
"RParisMediumI2IMultiChoice",
"RParisHardI2IMultiChoice",
"SciMMIRI2TRetrieval",
"SciMMIRT2IRetrieval",
"SketchyI2IRetrieval",
"SOPI2IRetrieval",
"StanfordCarsI2IRetrieval",
"TUBerlinT2IRetrieval",
"VidoreArxivQARetrieval",
"VidoreDocVQARetrieval",
"VidoreInfoVQARetrieval",
"VidoreTabfquadRetrieval",
"VidoreTatdqaRetrieval",
"VidoreShiftProjectRetrieval",
"VidoreSyntheticDocQAAIRetrieval",
"VidoreSyntheticDocQAEnergyRetrieval",
"VidoreSyntheticDocQAGovernmentReportsRetrieval",
"VidoreSyntheticDocQAHealthcareIndustryRetrieval",
"VisualNewsI2TRetrieval",
"VisualNewsT2IRetrieval",
"VizWizIT2TRetrieval",
"VQA2IT2TRetrieval",
"WebQAT2ITRetrieval",
"WebQAT2TRetrieval",
]

MIEB_ENG = Benchmark(
name="MIEB(eng)",
tasks=get_tasks(
tasks=MIEB_common_tasks
+ [
"VisualSTS17Eng",
"VisualSTS-b-Eng",
],
),
description="""MIEB(eng) is a comprehensive image embeddings benchmark, spanning 8 task types, covering 126 tasks.
In addition to image classification (zero shot and linear probing), clustering, retrieval, MIEB includes tasks in compositionality evaluation,
document undestanding, visual STS, and CV-centric tasks.""",
reference="",
contacts=["gowitheflow-1998", "isaac-chung"],
citation="",
)

MIEB_MULTILINGUAL = Benchmark(
name="MIEB(Multilingual)",
tasks=get_tasks(
tasks=MIEB_common_tasks
+ [
"WITT2IRetrieval",
"XFlickr30kCoT2IRetrieval",
"XM3600T2IRetrieval",
"VisualSTS17Multilingual",
"VisualSTS-b-Multilingual",
],
),
description="""MIEB(Multilingual) is a comprehensive image embeddings benchmark, spanning 8 task types, covering 129 tasks and a total of 39 languages.
In addition to image classification (zero shot and linear probing), clustering, retrieval, MIEB includes tasks in compositionality evaluation,
document undestanding, visual STS, and CV-centric tasks. This benchmark consists of MIEB(eng) + 3 multilingual retrieval
datasets + the multilingual parts of VisualSTS-b and VisualSTS-16.""",
reference="",
contacts=["gowitheflow-1998", "isaac-chung"],
citation="",
)

MIEB_LITE = Benchmark(
name="MIEB(lite)",
tasks=get_tasks(
tasks=[
# Image Classification
"Country211",
"DTD",
"EuroSAT",
"GTSRB",
"OxfordPets",
"PatchCamelyon",
"RESISC45",
"SUN397",
# Clustering
"ImageNetDog15Clustering",
"TinyImageNetClustering",
# ZeroShotClassification
"CIFAR100ZeroShot",
"Country211ZeroShot",
"FER2013ZeroShot",
"FGVCAircraftZeroShot",
"Food101ZeroShot",
"OxfordPetsZeroShot",
"StanfordCarsZeroShot",
# Any2TextMutipleChoice
"CVBenchCount",
"CVBenchRelation",
"CVBenchDepth",
"CVBenchDistance",
# Any2AnyMultipleChoice
"BLINKIT2IMultiChoice",
"ImageCoDeT2IMultiChoice",
# ImageTextPairClassification
"AROCocoOrder",
"AROFlickrOrder",
"AROVisualAttribution",
"AROVisualRelation",
"Winoground",
# VisualSTS
"STS13VisualSTS",
"STS15VisualSTS",
"STS17MultilingualVisualSTS",
"STSBenchmarkMultilingualVisualSTS",
# Any2AnyRetrieval
"CIRRIT2IRetrieval",
"CUB200I2IRetrieval",
"Fashion200kI2TRetrieval",
"HatefulMemesI2TRetrieval",
"InfoSeekIT2TRetrieval",
"NIGHTSI2IRetrieval",
"OVENIT2TRetrieval",
"RP2kI2IRetrieval",
"VidoreDocVQARetrieval",
"VidoreInfoVQARetrieval",
"VidoreTabfquadRetrieval",
"VidoreTatdqaRetrieval",
"VidoreShiftProjectRetrieval",
"VidoreSyntheticDocQAAIRetrieval",
"VisualNewsI2TRetrieval",
"VQA2IT2TRetrieval",
"WebQAT2ITRetrieval",
"WITT2IRetrieval",
"XM3600T2IRetrieval",
],
),
description="""MIEB(lite) is a comprehensive image embeddings benchmark, spanning 8 task types, covering 51 tasks.
This is a lite version of MIEB(Multilingual), designed to be run at a fraction of the cost while maintaining
relative rank of models.""",
reference="",
contacts=["gowitheflow-1998", "isaac-chung"],
citation="",
)

BUILT_MTEB = Benchmark(
name="BuiltBench(eng)",
tasks=get_tasks(
Expand Down
26 changes: 7 additions & 19 deletions mteb/leaderboard/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import tempfile
import time
from pathlib import Path
from typing import Literal
from typing import Literal, get_args
from urllib.parse import urlencode

import cachetools
Expand All @@ -15,7 +15,9 @@
from gradio_rangeslider import RangeSlider

import mteb
from mteb.abstasks.TaskMetadata import TASK_DOMAIN, TASK_TYPE
from mteb.benchmarks.benchmarks import MTEB_multilingual
from mteb.languages import ISO_TO_LANGUAGE
from mteb.leaderboard.figures import performance_size_plot, radar_chart
from mteb.leaderboard.table import scores_to_tables

Expand Down Expand Up @@ -43,20 +45,6 @@
We also thank the following companies which provide API credits to evaluate their models: [OpenAI](https://openai.com/), [Voyage AI](https://www.voyageai.com/)
"""

MMTEB_TASK_TYPES = [ # TEMPORARY FIX: when adding MIEB to the leaderboard, this can probably be replaced with TASK_TYPE
"BitextMining",
"Classification",
"MultilabelClassification",
"Clustering",
"PairClassification",
"Reranking",
"Retrieval",
"STS",
"Summarization",
"InstructionRetrieval",
"Speed",
]


ALL_MODELS = {meta.name for meta in mteb.get_model_metas()}

Expand Down Expand Up @@ -238,21 +226,21 @@ def filter_models(
info="Select one of our expert-selected benchmarks from MTEB publications.",
)
lang_select = gr.Dropdown(
all_results.languages,
ISO_TO_LANGUAGE,
value=sorted(default_results.languages),
multiselect=True,
label="Language",
info="Select languages to include.",
)
type_select = gr.Dropdown(
all_results.task_types,
value=sorted(MMTEB_TASK_TYPES),
sorted(get_args(TASK_TYPE)),
value=sorted(default_results.task_types),
multiselect=True,
label="Task Type",
info="Select task types to include.",
)
domain_select = gr.Dropdown(
all_results.domains,
sorted(get_args(TASK_DOMAIN)),
value=sorted(default_results.domains),
multiselect=True,
label="Domain",
Expand Down
27 changes: 12 additions & 15 deletions mteb/leaderboard/figures.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
from __future__ import annotations

from typing import get_args

import numpy as np
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go

from mteb.abstasks.TaskMetadata import TASK_TYPE


def text_plot(text: str):
"""Returns empty scatter plot with text added, this can be great for error messages."""
Expand Down Expand Up @@ -56,6 +60,10 @@ def parse_float(value) -> float:
"GritLM-7B",
"LaBSE",
"multilingual-e5-large-instruct",
"EVA02-CLIP-bigE-14-plus",
"voyage-multimodal-3",
"e5-v",
"VLM2Vec-Full",
]


Expand Down Expand Up @@ -165,21 +173,10 @@ def performance_size_plot(df: pd.DataFrame) -> go.Figure:


TOP_N = 5
task_types = [
"BitextMining",
"Classification",
"MultilabelClassification",
"Clustering",
"PairClassification",
"Reranking",
"Retrieval",
"STS",
"Summarization",
# "InstructionRetrieval",
# Not displayed, because the scores are negative,
# doesn't work well with the radar chart.
"Speed",
]
task_types = sorted(get_args(TASK_TYPE))
task_types.remove("InstructionRetrieval")
# Not displayed, because the scores are negative,
# doesn't work well with the radar chart.

line_colors = [
"#EE4266",
Expand Down
Loading