Datasets:
mteb
/

Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
Libraries:
Datasets
pandas
Massive Text Embedding Benchmark org
β€’
edited Aug 27, 2022

Goes along with: https://github.com/embeddings-benchmark/mteb/pull/50

Testing:

from mteb import MTEB
from mteb.abstasks.AbsTaskClustering import AbsTaskClustering
from sentence_transformers import SentenceTransformer

class RedditClusteringP2P(AbsTaskClustering):
    @property
    def description(self):
        return {
            "name": "RedditClusteringP2P",
            "hf_hub_name": "mteb/reddit-clustering-p2p",
            "description": (
                "Clustering of title+posts from reddit. Clustering of 10 sets of 50k paragraphs and 40 sets of 10k"
                " paragraphs."
            ),
            "reference": "https://huggingface.co/datasets/sentence-transformers/reddit-title-body",
            "type": "Clustering",
            "category": "p2p",
            "eval_splits": ["test"],
            "eval_langs": ["en"],
            "main_score": "v_measure",
            "revision": "7241b500d944972a3e87548b7a6ce90795fb4fa0",
        }

model = SentenceTransformer("average_word_embeddings_komninos")
evaluation = MTEB(tasks=[RedditClusteringP2P()])
evaluation.run(model)

Output:
Clustering: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 10/10 [02:41<00:00, 16.17s/it]
{'RedditClusteringP2P': {'mteb_version': '0.0.2',
'dataset_version': '7241b500d944972a3e87548b7a6ce90795fb4fa0',
'test': {'v_measure': 0.3779740650536073,
'v_measure_std': 0.10284425580032916,
'evaluation_time': 161.78}}}

Muennighoff changed pull request status to open
Massive Text Embedding Benchmark org

LGTM

Muennighoff changed pull request status to merged

Sign up or log in to comment