Datasets:
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
Multiple-choice benchmarks for llama.cpp
Public multiple-choice benchmarks serialised into the binary task format that
llama-perplexity --multiple-choice reads, so they can be scored directly by
llama.cpp without an evaluation framework in between.
llama-perplexity -m model.gguf -c 512 -np 16 --multiple-choice -bf medqa-test.bin
Pass these with -bf, never -f. They are binary and contain 0x1A bytes,
which a Windows text-mode read treats as end-of-file. With -f llama.cpp prints
a plausible task count, then failed to read task positions from prompt, scores
nothing, and exits 0.
-np must be at least the widest task's option count — 5 here, so -np 16
is ample. At the default -np 4 llama.cpp aborts partway through a 5-option
dataset, prints a table covering only the tasks it managed, and again exits 0.
Always check that the number of tasks scored equals the number it announced;
neither failure sets a non-zero exit code.
To score a subset, use --multiple-choice-tasks N. Selection is deterministic
and takes no seed, so every model sees the same N questions.
Files
| file | mode | tasks | options | chance | majority_class | source | licence |
|---|---|---|---|---|---|---|---|
aqua-rat-test.bin |
text | 254 | 5 x254 | 20.00 | 24.80 | deepmind/aqua_rat | Apache-2.0 |
aqua-rat-train.bin |
text | 97467 | 5 x97467 | 20.00 | 22.87 | deepmind/aqua_rat | Apache-2.0 |
aqua-rat-validation.bin |
text | 254 | 5 x254 | 20.00 | 27.17 | deepmind/aqua_rat | Apache-2.0 |
boolq-train.bin |
text | 9427 | 2 x9427 | 50.00 | 62.31 | google/boolq | CC-BY-SA-3.0 |
boolq-validation.bin |
text | 3270 | 2 x3270 | 50.00 | 62.17 | google/boolq | CC-BY-SA-3.0 |
careqa-en-test.bin |
letter | 5621 | 4 x5621 | 25.00 | 26.45 | HPAI-BSC/CareQA | Apache-2.0 |
careqa-es-test.bin |
letter | 5621 | 4 x5621 | 25.00 | 26.45 | HPAI-BSC/CareQA | Apache-2.0 |
commonsense-qa-train.bin |
letter | 9741 | 5 x9741 | 20.00 | 20.38 | tau/commonsense_qa | MIT |
commonsense-qa-validation.bin |
letter | 1221 | 5 x1221 | 20.00 | 20.88 | tau/commonsense_qa | MIT |
medconceptsqa-test.bin |
letter | 819772 | 4 x819772 | 25.00 | 25.03 | ofir408/MedConceptsQA | Apache-2.0 |
medqa-test.bin |
letter | 1273 | 4 x1273 | 25.00 | 27.73 | GBaker/MedQA-USMLE-4-options | CC-BY-4.0 |
medqa-train.bin |
letter | 10178 | 4 x10178 | 25.00 | 26.08 | GBaker/MedQA-USMLE-4-options | CC-BY-4.0 |
mmlu-validation.bin |
letter | 1531 | 4 x1531 | 25.00 | 25.28 | cais/mmlu | MIT |
One file per benchmark, named after the benchmark and its split. manifest.json
carries each file's sha256; check it against a local copy rather than assuming
a filename identifies particular bytes.
mmlu-validation.bin and medconceptsqa-test.bin are their sources' all
configs: every subject and every vocabulary/difficulty subset combined.
MedConceptsQA's 15 subsets are not equal-sized (4,434 to 190,983 rows), so a
random sample of it is proportional rather than balanced across subsets.
CommonsenseQA's test split is unlabelled and so cannot be converted. CareQA's
open-ended config is free-form and out of scope for --multiple-choice; its
English and Spanish multiple-choice configs are both included.
AQuA-RAT's test and validation splits are 254 questions each and fully
disjoint. Its train split is included as published but is not an evaluation
set: it repeats 16,543 questions and shares 21 with validation and test.
Binary format
Little-endian throughout, verified against llama.cpp's reader
(tools/perplexity/perplexity.cpp).
uint32 n_task
uint32 * n_task ABSOLUTE byte offsets of each task (first == 4 + 4*n_task)
per task:
uint32 len + utf8 question
mc1: uint32 n option count (llama.cpp rejects n > 100)
n * (uint32 len + utf8) option strings
int32 * n labels: a PARALLEL 0/1 array, exactly one 1
mc2: same layout, unused by llama.cpp -> empty (n = 0) in every file here
Prompt format
llama.cpp feeds the model question + " " + option — a single space, and no
scaffolding of its own. So the scaffold is stored inside the question, and
options are bare continuations.
There are two scoring forms. Each benchmark is published in exactly one of
them — the one its own evaluation protocol uses — so there is one file per
benchmark and the form is not part of the file name. manifest.json records it
as prompt_mode.
text — the continuation is the answer itself.
question : Question: "The cyclic subgroup of Z_24 generated by 18 has order" Answer:
option : 4
model sees : Question: "The cyclic subgroup of Z_24 generated by 18 has order" Answer: 4
letter — the options move into the prompt and the continuation is a single
letter.
question : Question: The cyclic subgroup of Z_24 generated by 18 has order
A. 4
B. 8
C. 12
D. 6
Answer:
option : A
model sees : ...Answer: A
Which form a benchmark takes is a property of the benchmark, not a preference.
llama.cpp divides an option's summed log-probability by its token count, so
text options of unequal length are normalised against each other. That is the
right thing for a benchmark defined over text — HellaSwag's sentence endings, or
BoolQ, whose choices are the words no and yes — and the wrong thing for one
defined over letters, where the intended measurement is simply which letter the
model prefers. A letter is one token, so the divisor is 1 and the score is plain
accuracy.
The form is read off
lm-evaluation-harness's
doc_to_choice, which encodes each benchmark's published protocol and is what
the widely quoted figures were produced with. mmlu, commonsense_qa,
careqa_en, med_concepts_qa and medqa_4options are all A/B/C/D there;
boolq is ["no","yes"].
The form is not derivable from the data's shape. MMLU and ARC are both 4-way multiple choice with letter answer keys and option text, and differ only in the protocol each is conventionally scored under. So scoring one benchmark in the other's form does not produce a better number — it produces a number that is not that benchmark.
AQuA-RAT is absent from lm-evaluation-harness and its paper defines no
multiple-choice protocol, so its text form is a documented choice rather than a
derived one.
Note that letter accuracy is normally published few-shot. These files carry no few-shot examples, so a letter-mode score is a stricter 0-shot measurement and is not directly comparable with a leaderboard figure.
BoolQ is the one adaptation: its passage will not fit inside the quoted question, so it precedes the scaffold and the options are the bare words.
<passage>
Question: "<question>?" Answer: options: "no", "yes"
Where a source stores its option label inside the option text ("A) 42") or as
separate dict keys, the label is stripped and only the answer text is kept, since
llama.cpp scores the option string itself. No other content is altered.
Reading the scores
acc_norm — llama.cpp divides each option's summed log-probability by its token
count, so longer answers are not penalised. In a letter file every option is
one token, so the divisor is 1 and acc_norm is plain accuracy.
Compare against majority_class, not chance. llama.cpp prints a uniform
random baseline (100 / n_options), which is right for the 4- and 5-option sets
but misleading for BoolQ: it is ~62% "yes", so a model scoring 58% is below the
always-answer-yes floor while appearing to beat the printed 50%. The
majority_class column is the always-pick-the-same-position rate, computed from
the labels.
No chat template is applied — scoring is raw log-likelihood over each candidate answer, so instruct-tuned models are evaluated as base models. That is consistent across models and tasks, but it is not what an instruct leaderboard reports.
Rebuilding
pip install datasets huggingface_hub
python convert.py --all # writes out/*.bin and out/manifest.json
python verify.py # full round-trip against every source
Each benchmark's scoring form is declared as mode in convert.py's BUILDS,
and one file is written per benchmark.
verify.py re-derives every task from its source dataset and compares question,
option set and correct option for all N tasks — not a sample. A label-scrambling
bug passes every structural check and merely scores at chance, so only an
exhaustive comparison catches it. For a letter file it also checks that the
options really are the bare letters in order, since there the gold letter is tied
to the gold answer only by its position.
manifest.json pins each source's HF commit, so a rebuild is reproducible.
Sources
- GBaker/MedQA-USMLE-4-options @
0fb93dd23a7339b6dcd27e241cb9b5eca62d4d18- Jin et al., What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Exams, 2020
- HPAI-BSC/CareQA @
1d976cc544ccb9dfc96e14439e6840e8a810cec5- Arias-Duart et al., Automatic Evaluation of Healthcare LLMs Beyond Question-Answering, 2024
- cais/mmlu @
c30699e8356da336a370243923dbaf21066bb9fe- Hendrycks et al., Measuring Massive Multitask Language Understanding, ICLR 2021
- deepmind/aqua_rat @
33301c6a050c96af81f63cad5562cb5363e88971- Ling et al., Program Induction by Rationale Generation: Learning to Solve and Explain Algebraic Word Problems, ACL 2017
- google/boolq @
35b264d03638db9f4ce671b711558bf7ff0f80d5- Clark et al., BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questions, NAACL 2019
- ofir408/MedConceptsQA @
98c30d83762e51a397c9a7b0eeee6722e751da17- Shoham & Rappoport, MedConceptsQA: Open Source Medical Concepts QA Benchmark, 2024
- tau/commonsense_qa @
94630fe30dad47192a8546eb75f094926d47e155- Talmor et al., CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledge, NAACL 2019
- Downloads last month
- 84