Skip to content

Small fixes #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ If you're planning on using any API-based models, make sure you define your rele
The images and text are stored on the HuggingFace hub, as a .zip. You may download it directly from there, using `huggingface-cli` (recommended):

```bash
huggingface-cli download answerdotai/ReadBench readbench.zip --repo-type dataset
huggingface-cli download answerdotai/ReadBench readbench.zip --repo-type dataset --local-dir .
```

Alternatively, if you are unable to use `huggingface-cli`, you may use the direct download URL, as provided by HuggingFace:
Expand All @@ -42,26 +42,27 @@ unzip readbench.zip

The authors of GPQA have requested that the dataset should not be reshared as-is, to minimise model contamination. We follow their wishes, which means you need to generate the GPQA images yourself, absed on the original GPQA dataset. You can do so by running the following commands:
```bash
python data_prep.py --datasets gpqa
python datagen.py --datasets gpqa
```
You might get an error that the dataset is gated and that you need to accept terms on the HF hub. To resolve, just follow the link, accept, and try again.

5. **Prepare the benchmark**

You may now run the following command to prepare the metadata file which will be used to run the benchmark:

```bash
python downsampler.py --root rendered_images_ft12 --split standard
python data_prep.py --root rendered_images_ft12 --split standard
```

#### tl;dr

Running the commands below will download and prepare the full ReadBench benchmark, as used in the paper:

```bash
huggingface-cli download answerdotai/ReadBench readbench.zip --type dataset
huggingface-cli download answerdotai/ReadBench readbench.zip --repo-type dataset --local_dir .
unzip readbench.zip
python data_prep.py --datasets gpqa
python downsampler.py --root rendered_images_ft12 --split standard
python datagen.py --datasets gpqa
python data_prep.py --root rendered_images_ft12 --split standard
```


Expand Down
2 changes: 1 addition & 1 deletion eval_config/dataset2prompt.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"narrativeqa": "You are given a story, which can be either a novel or a movie script, and a question. Answer the question asconcisely as you can, using a single phrase if possible. Do not provide any explanation.\n\nStory: {context}\n\nNow, answer the question based on the story asconcisely as you can, using a single phrase if possible. Do not provide any explanation.\n\nQuestion: {input}\n\nAnswer:",
"hotpotqa": "Answer the question based on the given passages. Only give me the answer and do not output any other words.\n\nThe following are given passages.\n{context}\n\nAnswer the question based on the given passages. Only give me the answer and do not output any other words.\n\nQuestion: {input}\nAnswer:",
"2wikimqa": "Answer the question based on the given passages. Only give me the answer and do not output any other words.\n\nThe following are given passages.\n{context}\n\nAnswer the question based on the given passages. Only give me the answer and do not output any other words.\n\nQuestion: {input}\nAnswer:",
"triviaqa": "Answer the question based on the given passage. Only give me the answer and do not output any other words. The following are some examples.\n\n{context}\n\n{input}",
"triviaqa": "Answer the question based on the given passage. Only give me the answer and do not output any other words. The following are some examples.\n\n{context}\n\n{input}"
}