The dataset viewer is not available for this dataset.
Cannot get the config names for the dataset.
Error code:   ConfigNamesError
Exception:    FileNotFoundError
Message:      Couldn't find a dataset script at /src/services/worker/dali-does/clevr-math/ or any data file in the same directory. Couldn't find 'dali-does/clevr-math' on the Hugging Face Hub either: FileNotFoundError: [Errno 2] No such file or directory: '/datasets-server-cache/all/datasets/2023-06-06-20-34-00-dataset-config-names-dali-does-clevr-math-87c8f5ac/downloads/'
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/dataset/", line 61, in compute_config_names_response
                  for config in sorted(get_dataset_config_names(path=dataset, use_auth_token=use_auth_token))
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/", line 323, in get_dataset_config_names
                  dataset_module = dataset_module_factory(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/", line 1215, in dataset_module_factory
                  raise FileNotFoundError(
              FileNotFoundError: Couldn't find a dataset script at /src/services/worker/dali-does/clevr-math/ or any data file in the same directory. Couldn't find 'dali-does/clevr-math' on the Hugging Face Hub either: FileNotFoundError: [Errno 2] No such file or directory: '/datasets-server-cache/all/datasets/2023-06-06-20-34-00-dataset-config-names-dali-does-clevr-math-87c8f5ac/downloads/'

Need help to make the dataset viewer work? Open a discussion for direct support.

Dataset Card for CLEVR-Math

Dataset Summary

Dataset for compositional multimodal mathematical reasoning based on CLEVR.

Loading the data, preprocessing text with CLIP

from transformers import CLIPPreprocessor
from datasets import load_dataset, DownloadConfig

dl_config = DownloadConfig(resume_download=True,

# Load 'general' instance of dataset
dataset = load_dataset('dali-does/clevr-math', download_config=dl_config)

# Load version with only multihop in test data
dataset_multihop = load_dataset('dali-does/clevr-math', 'multihop',

model_path = "openai/clip-vit-base-patch32"
extractor = CLIPProcessor.from_pretrained(model_path)
def transform_tokenize(e):
  e['image'] = [image.convert('RGB') for image in e['image']]
  return extractor(text=e['question'],

dataset =,

dataset_subtraction = dataset.filter(lambda e:
        e['template'].startswith('subtraction'), num_proc=4)

Supported Tasks and Leaderboards

Leaderboard will be announced at a later date.


The dataset is currently only available in English. To extend the dataset to other languages, the CLEVR templates must be rewritten in the target language.

Dataset Structure

Data Instances

  • general containing the default version with multihop questions in train and test
  • multihop containing multihop questions only in test data to test generalisation of reasoning

Data Fields

features = datasets.Features(
    "template": datasets.Value("string"),
    "id": datasets.Value("string"),
    "question": datasets.Value("string"),
    "image": datasets.Image(),
    "label": datasets.Value("int64")

Data Splits


Dataset Creation

Data is generated using code provided with the CLEVR-dataset, using blender and templates constructed by the dataset curators.

Considerations for Using the Data

Other Known Limitations

[More Information Needed]

Additional Information

Dataset Curators

Adam Dahlgren Lindström -

Licensing Information

Licensed under Creative Commons Attribution Share Alike 4.0 International (CC-by 4.0).

Citation Information

[More Information Needed]

  doi = {10.48550/ARXIV.2208.05358},
  url = {},
  author = {Lindström, Adam Dahlgren and Abraham, Savitha Sam},
  keywords = {Machine Learning (cs.LG), Computation and Language (cs.CL), Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences, I.2.7; I.2.10; I.2.6; I.4.8; I.1.4},
  title = {CLEVR-Math: A Dataset for Compositional Language, Visual, and Mathematical Reasoning},
  publisher = {arXiv},
  year = {2022},
  copyright = {Creative Commons Attribution Share Alike 4.0 International}


Thanks to @dali-does for adding this dataset.

Downloads last month