File size: 5,801 Bytes
4a3210f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ebf6a9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d875329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
02b6380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: question
    dtype: string
  - name: options
    list: string
  - name: image
    dtype: string
  - name: decoded_image
    dtype: image
  - name: answer
    dtype: string
  - name: solution
    dtype: string
  - name: level
    dtype: int64
  - name: subject
    dtype: string
  - name: prompt
    dtype: string
  splits:
  - name: testmini
    num_bytes: 5791963
    num_examples: 246
  download_size: 5732057
  dataset_size: 5791963
configs:
- config_name: default
  data_files:
  - split: testmini
    path: data/testmini-*
---


# MathVision (testmini) – single-image version

This dataset is derived from [MathLLMs/MathVision](https://huggingface.co/datasets/MathLLMs/MathVision)
(`testmini` split only). Please cite and follow the license of the original dataset.

## Modifications

1. **Removed multi-image samples**: any sample whose question/options reference more than one
   image (`<image1>`, `<image2>`, ...) was deleted. **58** samples were removed,
   **246** remain.
2. **Added a `prompt` column**, built from the `question` column:
   - The image tags (`<image1>`, ...) are removed from the question text.
   - If the sample has choices, they are appended as:
     `QUESTION Choices: (A) option (B) option ...`
   - If the choices are only letters (the values are inside the image), the format is:
     `QUESTION Choices: (A) (B) (C) (D) (E)`
   - If there are no choices, the prompt is just the cleaned question.

## Example

| field | value |
|---|---|
| prompt | How many different digits can you find in this picture? |

## Columns

`id`, `question`, `options`, `image`, `decoded_image`, `answer`, `solution`, `level`, `subject`, `prompt`

## Usage

```python
from datasets import load_dataset
ds = load_dataset("Misraj/MathVision_testmini", split="testmini")
print(ds[0]["prompt"])
```

<!-- scoring:start -->
## Scoring

Two files in this repo score model outputs locally (no LLM judge):

| File | Purpose |
|---|---|
| `mm_scoring.py` | `extract_answer(response, row)` pulls the final answer out of a model response (reads `\boxed{}`, "answer is ...", option letters or option text); `is_correct(pred, row)` compares it with the gold answer |
| `mathvision_adapt.py` | `prepare_mathvision(row)` adds the fields the scorer needs, which this dataset does not store; `final_prompt(row)` appends an answer-format instruction |

`prepare_mathvision` derives: `question_type` (`multi_choice` if `options` is non-empty, else `free_form`),
`answer_type` (`integer` / `float` / `text`, from the gold answer), `choices`, `answer_is_letter` and `precision`.
When the options are only letters (`A`-`E`), the option values are inside the image, so `choices` are blank and
the answer is matched by letter.

### Example

```python
from datasets import load_dataset
from huggingface_hub import hf_hub_download
import sys

for f in ["mm_scoring.py", "mathvision_adapt.py"]:
    hf_hub_download("Misraj/MathVision_testmini", f, repo_type="dataset", local_dir=".")
sys.path.insert(0, ".")
from mm_scoring import extract_answer, is_correct
from mathvision_adapt import prepare_mathvision, final_prompt

ds = load_dataset("Misraj/MathVision_testmini", split="testmini")
row = ds[0]
ex = {**row, **prepare_mathvision(row)}

model_input = final_prompt(ex)                 # text prompt to send together with row["image"]
response = "... so the answer is \\boxed{A}"   # your model's output
print(is_correct(extract_answer(response, ex), ex))
```

### Notes

- Use the same `final_prompt` for every model you compare; without an explicit format instruction, extraction is less reliable.
- Multiple choice is scored by letter, integers exactly, floats rounded to the gold precision. Other free-form answers
  (fractions, expressions, text) are compared as normalized strings, so equivalent forms (`0.5` vs `1/2`) can count as wrong.
- Responses cut off at the generation limit have no real final answer. Report how many were cut off next to accuracy.
<!-- scoring:end -->

<!-- wsp-citations:start -->
## Paper using this data

**[Edits Without Abilities: Weight-Space Programming on a Small Vision-Language Model](https://arxiv.org/abs/2611.39858)**<br>
Khalil Hennara, Muhammad Hreden, Sara Chrouf, and Safwan AlModhayan (2026)

In the paper's visual math task (`math`), this data is the **held-out test set** used to grade the edited models.

The paper's practice split for this task is [Misraj/DynaMath_Train_Split](https://huggingface.co/datasets/Misraj/DynaMath_Train_Split).

- Code: [github.com/misraj-ai/wsp-vlm](https://github.com/misraj-ai/wsp-vlm)
- Data collection: [huggingface.co/collections/Misraj/wsp](https://huggingface.co/collections/Misraj/wsp)

## BibTeX

If you use this data, please cite the source dataset ([MATH-Vision](https://huggingface.co/datasets/MathLLMs/MathVision)) and the paper.

```bibtex
@inproceedings{wang2024measuring,
    author    = {Wang, Ke and Pan, Junting and Shi, Weikang and Lu, Zimu and Ren, Houxing and Zhou, Aojun and Zhan, Mingjie and Li, Hongsheng},
    title     = {Measuring Multimodal Mathematical Reasoning with {MATH-Vision} Dataset},
    booktitle = {Advances in Neural Information Processing Systems 37 (NeurIPS 2024), Datasets and Benchmarks Track},
    year      = {2024},
    url       = {https://arxiv.org/abs/2402.14804}
}
```

```bibtex
@misc{hennara2026editsabilitiesweightspaceprogramming,
      title={Edits Without Abilities: Weight-Space Programming on a Small Vision-Language Model},
      author={Khalil Hennara and Muhammad Hreden and Sara Chrouf and Safwan AlModhayan},
      year={2026},
      eprint={2611.39858},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2611.39858},
}
```
<!-- wsp-citations:end -->