Datasets:
Add ArithMark-3 and PIQA decontamination checks (all clean) with scripts and reports
Browse files- README.md +11 -1
- decontamination/README.md +8 -0
- decontamination/check.py +51 -0
- decontamination/decontam_13gram.py +106 -0
- decontamination/piqa.py +18 -0
- decontamination/piqa_report.txt +4 -0
- decontamination/report.txt +54 -0
- decontamination/report_13gram_other_benchmarks.txt +12 -0
- decontamination/strict.py +20 -0
- decontamination/strict_report.txt +38 -0
README.md
CHANGED
|
@@ -74,7 +74,17 @@ Every trace ends with a `Final answer:` line.
|
|
| 74 |
2. **Solve twice.** MiMo-v2.6-flash solves it two times independently, concisely (at most about 120 words), ending with a `Final answer:` line.
|
| 75 |
3. **Self-consistency filter.** Keep only questions where both final answers match after normalization (times, numbers, and prefix or substring equality, since an exact string match wrongly dropped about 23% of good pairs). About 74% of questions pass.
|
| 76 |
4. **Deduplicate.** Near-duplicate templates (same content words, digits removed) are collapsed.
|
| 77 |
-
5. **Decontaminate.** Every question was 13-gram checked against the evaluation splits of ARC-Easy, ARC-Challenge, HellaSwag,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
Agreement between two solves is a filter, not a proof: some rows will still have wrong answers, especially in the open-ended cause-effect and reading-inference categories.
|
| 80 |
|
|
|
|
| 74 |
2. **Solve twice.** MiMo-v2.6-flash solves it two times independently, concisely (at most about 120 words), ending with a `Final answer:` line.
|
| 75 |
3. **Self-consistency filter.** Keep only questions where both final answers match after normalization (times, numbers, and prefix or substring equality, since an exact string match wrongly dropped about 23% of good pairs). About 74% of questions pass.
|
| 76 |
4. **Deduplicate.** Near-duplicate templates (same content words, digits removed) are collapsed.
|
| 77 |
+
5. **Decontaminate.** Every question was 13-gram checked against the evaluation splits of ARC-Easy, ARC-Challenge, HellaSwag, SciQ, OpenBookQA and WinoGrande. Nothing was flagged. PIQA failed to load in that pass, so it was checked separately afterwards: questions and traces against all 4,922 PIQA validation and test items, 0 shared 13-, 10- or 8-word sequences.
|
| 78 |
+
|
| 79 |
+
Questions and traces were also checked against all 1,000 items of ArithMark-3 (context plus correct ending):
|
| 80 |
+
|
| 81 |
+
| Check | Result |
|
| 82 |
+
|---|---|
|
| 83 |
+
| Exact match (normalized) | 0 |
|
| 84 |
+
| Shared 13-, 10- or 8-word sequences | 0, 0, 0 |
|
| 85 |
+
| Identical set of numbers **and** the same final answer | 238 pairs, all different problems (highest content-word overlap 0.10) |
|
| 86 |
+
|
| 87 |
+
The numeric matches are coincidences of small numbers: for example, "5 equal pieces, ate 4, left 1" against "5 granola bars shared by 4 people, 1 left". Scripts and full reports are in [`decontamination/`](./decontamination). Not checked against GSM8K.
|
| 88 |
|
| 89 |
Agreement between two solves is a filter, not a proof: some rows will still have wrong answers, especially in the open-ended cause-effect and reading-inference categories.
|
| 90 |
|
decontamination/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Decontamination
|
| 2 |
+
|
| 3 |
+
- `decontam_13gram.py`: 13-gram check of every question against ARC-Easy/Challenge, HellaSwag, SciQ, OpenBookQA and WinoGrande evaluation splits. Log: `report_13gram_other_benchmarks.txt`; 0 rows flagged (the flagged-rows file it writes was empty). PIQA failed to load in this pass (see the log), hence `piqa.py`.
|
| 4 |
+
- `piqa.py`: questions + traces vs all PIQA validation and test items (the `baber/piqa` copy lm-eval uses): 13/10/8-gram overlap. Output: `piqa_report.txt` (0, 0, 0).
|
| 5 |
+
- `check.py`: questions + traces vs all 1,000 ArithMark-3 items: exact match, 13/10/8-gram overlap, and a loose numeric check (every number of the item appears in the question and the final answer equals the item's answer). Output: `report.txt`.
|
| 6 |
+
- `strict.py`: of the loose numeric matches, keeps pairs with the identical set of numbers and the same answer, ranked by content-word overlap. Output: `strict_report.txt`.
|
| 7 |
+
|
| 8 |
+
Paths in the scripts point at the authors' machine; change them to your local copies of the data.
|
decontamination/check.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""OpenThink vs ArithMark-3 (official 1000 items) contamination check (2026-11-11).
|
| 2 |
+
1) exact: normalized ArithMark context found inside an OpenThink question or trace
|
| 3 |
+
2) n-gram: shared word 13/10/8-grams between ArithMark (context + gold ending) and OpenThink (question + trace)
|
| 4 |
+
3) numeric signature: an OpenThink question containing every number of an ArithMark item AND giving its gold answer
|
| 5 |
+
"""
|
| 6 |
+
import json, re, sys
|
| 7 |
+
from collections import defaultdict
|
| 8 |
+
AM = [json.loads(l) for l in open("/media/joseph/Media/Boris-2-0920/ability_audit/arithmark-3_official.jsonl")]
|
| 9 |
+
OT = [json.loads(l) for l in open("/home/joseph/openthink/openthink_clean.jsonl")]
|
| 10 |
+
norm = lambda s: re.sub(r"\s+", " ", re.sub(r"[^a-z0-9 ]", " ", s.lower())).strip()
|
| 11 |
+
nums = lambda s: re.findall(r"\d+(?:\.\d+)?", s.replace(",", ""))
|
| 12 |
+
def grams(s, n):
|
| 13 |
+
w = norm(s).split(); return {" ".join(w[i:i + n]) for i in range(len(w) - n + 1)}
|
| 14 |
+
am_text = [a["ctx"] + a["endings"][int(a["label"])] for a in AM]
|
| 15 |
+
ot_text = [o["question"] + " " + o["trace"] for o in OT]
|
| 16 |
+
ot_norm = [norm(t) for t in ot_text]
|
| 17 |
+
out = {}
|
| 18 |
+
# 1) exact
|
| 19 |
+
out["exact"] = [(i, j) for i, a in enumerate(AM) for j, t in enumerate(ot_norm) if norm(a["ctx"]) in t]
|
| 20 |
+
# 2) n-grams
|
| 21 |
+
for n in (13, 10, 8):
|
| 22 |
+
idx = defaultdict(set)
|
| 23 |
+
for i, t in enumerate(am_text):
|
| 24 |
+
for g in grams(t, n): idx[g].add(i)
|
| 25 |
+
hits = defaultdict(set)
|
| 26 |
+
for j, t in enumerate(ot_text):
|
| 27 |
+
for g in grams(t, n):
|
| 28 |
+
for i in idx.get(g, ()): hits[(i, j)].add(g)
|
| 29 |
+
out[f"{n}gram"] = sorted(hits.items(), key=lambda kv: -len(kv[1]))
|
| 30 |
+
# 3) numeric signature
|
| 31 |
+
sig = []
|
| 32 |
+
ot_q = [(set(nums(o["question"])), set(nums(o["answer"])) | set(nums(o["trace"].split("Final answer:")[-1]))) for o in OT]
|
| 33 |
+
for i, a in enumerate(AM):
|
| 34 |
+
an = set(nums(a["ctx"])); gold = a["metadata"]["answer"]
|
| 35 |
+
if len(an) < 2: continue
|
| 36 |
+
for j, (qn, fa) in enumerate(ot_q):
|
| 37 |
+
if an <= qn and gold in fa: sig.append((i, j))
|
| 38 |
+
out["numsig"] = sig
|
| 39 |
+
print(f"ArithMark items {len(AM)}, OpenThink rows {len(OT)}")
|
| 40 |
+
print("exact matches:", len(out["exact"]))
|
| 41 |
+
for n in (13, 10, 8):
|
| 42 |
+
h = out[f"{n}gram"]; print(f"{n}-gram: {len(h)} pairs, {len({i for (i, _), _ in h})} ArithMark items, {len({j for (_, j), _ in h})} OpenThink rows")
|
| 43 |
+
print("numeric signature (all numbers + gold answer):", len(sig))
|
| 44 |
+
def show(i, j, extra=""):
|
| 45 |
+
print(f" AM[{i}] {AM[i]['ctx'][:150]!r} -> {AM[i]['metadata']['answer']}\n OT[{j}] {OT[j]['question'][:200]!r} -> {OT[j]['answer']!r} {extra}\n")
|
| 46 |
+
for k in ("10gram", "8gram"):
|
| 47 |
+
print(f"--- top {k} ---")
|
| 48 |
+
for (i, j), g in out[k][:6]: show(i, j, sorted(g)[:3])
|
| 49 |
+
print("--- numeric signature ---")
|
| 50 |
+
for i, j in sig[:15]: show(i, j)
|
| 51 |
+
json.dump({k: [list(x[0]) if isinstance(x[0], tuple) else list(x) for x in v] for k, v in out.items()}, open("/home/joseph/openthink/decontam_am3/hits.json", "w"))
|
decontamination/decontam_13gram.py
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Decontamination scan: flag OpenThink questions that overlap benchmark test items.
|
| 3 |
+
|
| 4 |
+
Standard 13-gram overlap heuristic (if any 13-word n-gram is shared with a benchmark
|
| 5 |
+
text, flag as contaminated), plus an 8-gram softer signal. Writes a cleaned file.
|
| 6 |
+
"""
|
| 7 |
+
import json
|
| 8 |
+
import re
|
| 9 |
+
import sys
|
| 10 |
+
from collections import Counter
|
| 11 |
+
|
| 12 |
+
from datasets import load_dataset
|
| 13 |
+
|
| 14 |
+
NG_HARD = 13 # shared n-gram of this length -> flag (near-copy)
|
| 15 |
+
NG_SOFT = 8 # softer signal, reported only
|
| 16 |
+
|
| 17 |
+
# (task, hf path, config, splits, text-field extractor)
|
| 18 |
+
BENCHES = [
|
| 19 |
+
("arc_easy", "allenai/ai2_arc", "ARC-Easy", ["test", "validation"],
|
| 20 |
+
lambda r: [r["question"]] + r["choices"]["text"]),
|
| 21 |
+
("arc_challenge", "allenai/ai2_arc", "ARC-Challenge", ["test", "validation"],
|
| 22 |
+
lambda r: [r["question"]] + r["choices"]["text"]),
|
| 23 |
+
("hellaswag", "Rowan/hellaswag", None, ["validation"],
|
| 24 |
+
lambda r: [r["ctx"]] + r["endings"]),
|
| 25 |
+
("piqa", "ybisk/piqa", None, ["validation"],
|
| 26 |
+
lambda r: [r["goal"], r["sol1"], r["sol2"]]),
|
| 27 |
+
("sciq", "allenai/sciq", None, ["test", "validation"],
|
| 28 |
+
lambda r: [r["question"], r.get("support", "")]),
|
| 29 |
+
("openbookqa", "allenai/openbookqa", "main", ["test", "validation"],
|
| 30 |
+
lambda r: [r["question_stem"]] + r["choices"]["text"]),
|
| 31 |
+
("winogrande", "allenai/winogrande", "winogrande_xl", ["validation"],
|
| 32 |
+
lambda r: [r["sentence"]]),
|
| 33 |
+
]
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
def norm(s):
|
| 37 |
+
return re.sub(r"[^a-z0-9 ]", " ", s.lower())
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def ngrams(text, n):
|
| 41 |
+
toks = norm(text).split()
|
| 42 |
+
return {" ".join(toks[i:i + n]) for i in range(len(toks) - n + 1)}
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def build_index():
|
| 46 |
+
hard, soft = set(), set()
|
| 47 |
+
per_task_texts = {}
|
| 48 |
+
for task, path, cfg, splits, extract in BENCHES:
|
| 49 |
+
texts = []
|
| 50 |
+
for sp in splits:
|
| 51 |
+
try:
|
| 52 |
+
ds = load_dataset(path, cfg, split=sp) if cfg else load_dataset(path, split=sp)
|
| 53 |
+
except Exception as e:
|
| 54 |
+
print(f" WARN {task}/{sp}: {e}", file=sys.stderr)
|
| 55 |
+
continue
|
| 56 |
+
for r in ds:
|
| 57 |
+
texts.extend(t for t in extract(r) if t)
|
| 58 |
+
per_task_texts[task] = texts
|
| 59 |
+
for t in texts:
|
| 60 |
+
hard |= ngrams(t, NG_HARD)
|
| 61 |
+
soft |= ngrams(t, NG_SOFT)
|
| 62 |
+
print(f" {task:16} {len(texts):>6} texts", file=sys.stderr)
|
| 63 |
+
return hard, soft
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def main():
|
| 67 |
+
print("loading benchmark datasets...", file=sys.stderr)
|
| 68 |
+
hard, soft = build_index()
|
| 69 |
+
print(f"index: {len(hard):,} 13-grams, {len(soft):,} 8-grams", file=sys.stderr)
|
| 70 |
+
|
| 71 |
+
recs = [json.loads(l) for l in open("openthink.jsonl") if l.strip()]
|
| 72 |
+
flagged_hard, flagged_soft = [], []
|
| 73 |
+
clean = []
|
| 74 |
+
for r in recs:
|
| 75 |
+
q = r["question"]
|
| 76 |
+
qh = ngrams(q, NG_HARD)
|
| 77 |
+
if qh & hard:
|
| 78 |
+
flagged_hard.append(r)
|
| 79 |
+
continue
|
| 80 |
+
qs = ngrams(q, NG_SOFT)
|
| 81 |
+
if qs & soft:
|
| 82 |
+
flagged_soft.append((r, len(qs & soft)))
|
| 83 |
+
clean.append(r)
|
| 84 |
+
|
| 85 |
+
print(f"\ntotal {len(recs)} | HARD(13-gram) flagged {len(flagged_hard)} "
|
| 86 |
+
f"| SOFT(8-gram) flagged {len(flagged_soft)} | clean {len(clean)}")
|
| 87 |
+
if flagged_hard:
|
| 88 |
+
print("\n=== 13-gram contamination (removed): ===")
|
| 89 |
+
for r in flagged_hard[:12]:
|
| 90 |
+
print(f" [{r['category']}] {r['question'][:120]}")
|
| 91 |
+
if flagged_soft:
|
| 92 |
+
print(f"\n=== 8-gram overlaps (kept; top by overlap) ===")
|
| 93 |
+
for r, k in sorted(flagged_soft, key=lambda x: -x[1])[:8]:
|
| 94 |
+
print(f" ({k}) [{r['category']}] {r['question'][:110]}")
|
| 95 |
+
|
| 96 |
+
with open("openthink_clean.jsonl", "w") as f:
|
| 97 |
+
for r in clean:
|
| 98 |
+
f.write(json.dumps(r, ensure_ascii=False) + "\n")
|
| 99 |
+
with open("decontam_flagged.jsonl", "w") as f:
|
| 100 |
+
for r in flagged_hard:
|
| 101 |
+
f.write(json.dumps({**r, "_flag": "13gram"}, ensure_ascii=False) + "\n")
|
| 102 |
+
print(f"\nwrote openthink_clean.jsonl ({len(clean)}) and decontam_flagged.jsonl ({len(flagged_hard)})")
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
if __name__ == "__main__":
|
| 106 |
+
main()
|
decontamination/piqa.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""OpenThink vs PIQA (baber/piqa, the copy lm-eval uses; the original 13-gram pass could not load ybisk/piqa).
|
| 2 |
+
Questions + traces vs goal + both solutions: exact goal match and shared 13/10/8-word sequences."""
|
| 3 |
+
import json, re
|
| 4 |
+
from datasets import load_dataset
|
| 5 |
+
OT = [json.loads(l) for l in open("/home/joseph/openthink/openthink_clean.jsonl")]
|
| 6 |
+
norm = lambda s: re.sub(r"\s+", " ", re.sub(r"[^a-z0-9 ]", " ", s.lower())).strip()
|
| 7 |
+
def grams(s, n):
|
| 8 |
+
w = norm(s).split(); return {" ".join(w[i:i + n]) for i in range(len(w) - n + 1)}
|
| 9 |
+
ds = load_dataset("baber/piqa", cache_dir="/media/joseph/Media/hf-cache/datasets")
|
| 10 |
+
P = [r for sp in ds for r in ds[sp] if sp in ("validation", "test")]
|
| 11 |
+
print("PIQA items:", {sp: len(ds[sp]) for sp in ds}, "checked:", len(P))
|
| 12 |
+
pt = [r["goal"] + " " + r["sol1"] + " " + r["sol2"] for r in P]
|
| 13 |
+
ot = [o["question"] + " " + o["trace"] for o in OT]
|
| 14 |
+
for n in (13, 10, 8):
|
| 15 |
+
idx = set().union(*(grams(t, n) for t in pt))
|
| 16 |
+
hit = [(j, sorted(grams(t, n) & idx)[:3]) for j, t in enumerate(ot) if grams(t, n) & idx]
|
| 17 |
+
print(f"{n}-gram: {len(hit)} OpenThink rows share a sequence with PIQA")
|
| 18 |
+
for j, g in hit[:5]: print(" ", OT[j]["question"][:120], "|", g)
|
decontamination/piqa_report.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
PIQA items: {'train': 16113, 'validation': 1838, 'test': 3084} checked: 4922
|
| 2 |
+
13-gram: 0 OpenThink rows share a sequence with PIQA
|
| 3 |
+
10-gram: 0 OpenThink rows share a sequence with PIQA
|
| 4 |
+
8-gram: 0 OpenThink rows share a sequence with PIQA
|
decontamination/report.txt
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ArithMark items 1000, OpenThink rows 43101
|
| 2 |
+
exact matches: 0
|
| 3 |
+
13-gram: 0 pairs, 0 ArithMark items, 0 OpenThink rows
|
| 4 |
+
10-gram: 0 pairs, 0 ArithMark items, 0 OpenThink rows
|
| 5 |
+
8-gram: 0 pairs, 0 ArithMark items, 0 OpenThink rows
|
| 6 |
+
numeric signature (all numbers + gold answer): 9107
|
| 7 |
+
--- top 10gram ---
|
| 8 |
+
--- top 8gram ---
|
| 9 |
+
--- numeric signature ---
|
| 10 |
+
AM[2] 'Mateo put 11 stars into each of 3 boxes. In all the boxes together, there were' -> 33
|
| 11 |
+
OT[23185] 'Mara runs this Python code: a = [3, 7, 9]; b = a; b.append(11); c = a[:]; c.remove(7); b = b + [5]. What is sum(a) + len(c)?' -> '33'
|
| 12 |
+
|
| 13 |
+
AM[2] 'Mateo put 11 stars into each of 3 boxes. In all the boxes together, there were' -> 33
|
| 14 |
+
OT[41667] 'A bakery sells muffins in boxes of 4. Tama buys 11 boxes, then gives away 2 whole boxes and eats 3 loose muffins that fell out of a damaged thirteenth box. How many muffins does Tama still have?' -> '33'
|
| 15 |
+
|
| 16 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 17 |
+
OT[5667] 'A bakery sells rolls in bags of 4 and 9. Mara buys only bags of 9, Tomas buys only bags of 4, and they end up with the same total number of rolls. What is the smallest number of rolls each could have?' -> '36'
|
| 18 |
+
|
| 19 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 20 |
+
OT[6897] 'Mara writes: a = [4, 9, 2]; b = a; a.append(b.count(9) + 3); b[0] = b[2] + a[3]; a.sort(). What is b[-1] * len(a)?' -> '36'
|
| 21 |
+
|
| 22 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 23 |
+
OT[10450] 'At a kennel, each dog has 4 paws and each parrot has 2. Mira counts 30 paws in total among 9 animals. If every parrot is swapped for a dog, how many paws would she count?' -> '36'
|
| 24 |
+
|
| 25 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 26 |
+
OT[10515] 'Anika can buy a 4 kg bag of rice for $12 or a 9 kg bag for $25. She needs exactly 12 kg. What is the least amount she can spend to get at least 12 kg?' -> '36'
|
| 27 |
+
|
| 28 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 29 |
+
OT[18031] 'Rosa builds a list: a = [7, 2, 9]. She sets b = a, then does a[1] = 5, b.append(4), and a.pop(0). Finally she writes c = a + b. What is the sum of the elements of c?' -> '36'
|
| 30 |
+
|
| 31 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 32 |
+
OT[24820] 'Mara runs this code: total = 0; for i in range(4, 9, 2): total += i * 2. What is the value of total?' -> '36'
|
| 33 |
+
|
| 34 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 35 |
+
OT[29720] 'Four friends order a 12-slice pizza. Marcus eats 3 slices, Priya eats 2, Lena eats 4, and Tom eats the rest. They split the bill equally, each paying $9. What was the total cost of the pizza?' -> '36'
|
| 36 |
+
|
| 37 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 38 |
+
OT[32999] 'A ferry charges by distance: 4 coins per 2 nautical miles. Idris travels 9 nautical miles, but pays only in half-coins. How many half-coins does he hand over?' -> '36'
|
| 39 |
+
|
| 40 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 41 |
+
OT[36157] 'A marinade uses soy sauce, lime juice, and honey in a 4:2:1 ratio. Kenji has 9 tablespoons of honey, the limiting ingredient, and wants to use all of it. How many tablespoons of soy sauce does he need' -> '36'
|
| 42 |
+
|
| 43 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 44 |
+
OT[37097] 'A bakery sells muffins in boxes of 4 for $6 or boxes of 7 for $9. Rina needs exactly 28 muffins for a meeting. She can mix box sizes. What is the least she can pay?' -> '36'
|
| 45 |
+
|
| 46 |
+
AM[8] 'Finn arranged balloons in 9 equal rows. Each row had 4 balloons. The arrangement used' -> 36
|
| 47 |
+
OT[42293] 'Marta needs to wash dishes (12 minutes), then dry them (6 minutes), and sweep the floor (9 minutes). The dryer can run while she sweeps. If she starts at 4:15 pm, what is the earliest time all chores ' -> '4:36pm'
|
| 48 |
+
|
| 49 |
+
AM[14] 'Leo saved 7 buttons each day for 6 days. Altogether, Leo saved' -> 42
|
| 50 |
+
OT[2163] 'Maya wakes at 6:30, needs to catch a 7:15 bus, and her bread takes 12 minutes to toast while she gets dressed in 10 minutes. Both must be done before leaving, and she can do them at the same time. Wha' -> '6:42'
|
| 51 |
+
|
| 52 |
+
AM[14] 'Leo saved 7 buttons each day for 6 days. Altogether, Leo saved' -> 42
|
| 53 |
+
OT[18551] 'A bakery arranges scones in rows of 6 or 7, both fitting exactly with no leftovers. What is the smallest number of scones that could be in the batch?' -> '42'
|
| 54 |
+
|
decontamination/report_13gram_other_benchmarks.txt
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/home/joseph/.pyenv/versions/3.10.13/lib/python3.10/site-packages/requests/__init__.py:113: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (6.0.0.post1)/charset_normalizer (3.4.4) doesn't match a supported version!
|
| 2 |
+
warnings.warn(
|
| 3 |
+
loading benchmark datasets...
|
| 4 |
+
arc_easy 14728 texts
|
| 5 |
+
arc_challenge 7352 texts
|
| 6 |
+
hellaswag 50210 texts
|
| 7 |
+
WARN piqa/validation: Dataset scripts are no longer supported, but found piqa.py
|
| 8 |
+
piqa 0 texts
|
| 9 |
+
sciq 3771 texts
|
| 10 |
+
openbookqa 5000 texts
|
| 11 |
+
winogrande 1267 texts
|
| 12 |
+
index: 1,029,034 13-grams, 1,289,672 8-grams
|
decontamination/strict.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Strict numeric check: OpenThink question with EXACTLY the ArithMark item's numbers (same multiset), the same gold
|
| 2 |
+
answer, ranked by content-word overlap (Jaccard) between the two questions. Prints the closest pairs for inspection."""
|
| 3 |
+
import json, re
|
| 4 |
+
AM = [json.loads(l) for l in open("/media/joseph/Media/Boris-2-0920/ability_audit/arithmark-3_official.jsonl")]
|
| 5 |
+
OT = [json.loads(l) for l in open("/home/joseph/openthink/openthink_clean.jsonl")]
|
| 6 |
+
STOP = set("a an the of to in and is was were had has have each for on at all with into then how many much did does do what more".split())
|
| 7 |
+
nums = lambda s: sorted(re.findall(r"\d+(?:\.\d+)?", s.replace(",", "")))
|
| 8 |
+
words = lambda s: {w for w in re.findall(r"[a-z]+", s.lower()) if w not in STOP and len(w) > 2}
|
| 9 |
+
H = json.load(open("hits.json"))["numsig"]
|
| 10 |
+
rows = []
|
| 11 |
+
for i, j in H:
|
| 12 |
+
a, o = AM[i], OT[j]
|
| 13 |
+
if nums(a["ctx"]) != nums(o["question"]): continue
|
| 14 |
+
wa, wo = words(a["ctx"]), words(o["question"]); jac = len(wa & wo) / max(1, len(wa | wo))
|
| 15 |
+
rows.append((jac, i, j))
|
| 16 |
+
rows.sort(reverse=True)
|
| 17 |
+
print(f"pairs with identical number set + same answer: {len(rows)} (of {len(H)} loose matches)")
|
| 18 |
+
print("Jaccard distribution:", {t: sum(r[0] >= t for r in rows) for t in (0.1, 0.2, 0.3, 0.5)})
|
| 19 |
+
for jac, i, j in rows[:12]:
|
| 20 |
+
print(f"\n[{jac:.2f}] AM: {AM[i]['ctx']!r} -> {AM[i]['metadata']['answer']}\n OT: {OT[j]['question']!r} -> {OT[j]['answer']!r}")
|
decontamination/strict_report.txt
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pairs with identical number set + same answer: 238 (of 9107 loose matches)
|
| 2 |
+
Jaccard distribution: {0.1: 1, 0.2: 0, 0.3: 0, 0.5: 0}
|
| 3 |
+
|
| 4 |
+
[0.10] AM: 'Sofia cut a loaf into 5 equal pieces and ate 4 pieces. The number of pieces left was' -> 1
|
| 5 |
+
OT: "Mara packs 5 identical granola bars for a hiking group of 4 people. Each person must get the same whole number of bars, and no bars may be cut. After everyone has taken their share, how many bars are left in Mara's pack?" -> '1'
|
| 6 |
+
|
| 7 |
+
[0.09] AM: 'Mei saved 2 rubber bands each day for 3 days. Altogether, Mei saved' -> 6
|
| 8 |
+
OT: 'Maya packs for 3 days. She always packs one extra shirt beyond the number of days, plus one outfit per day. Each outfit needs 2 socks. How many socks go in the bag?' -> '6'
|
| 9 |
+
|
| 10 |
+
[0.08] AM: 'Mei saved 2 rubber bands each day for 3 days. Altogether, Mei saved' -> 6
|
| 11 |
+
OT: 'Maya packs 2 shirts and 3 scarves and must wear exactly one shirt and one scarf each day. If no outfit combination may repeat, how many full days can she go before she must reuse a combination?' -> '6'
|
| 12 |
+
|
| 13 |
+
[0.08] AM: 'Mei saved 2 rubber bands each day for 3 days. Altogether, Mei saved' -> 6
|
| 14 |
+
OT: 'Maya packs 2 different hats and 3 different scarves. She takes one hat and one scarf per day, never repeating the same hat-scarf pair. How many days can she go before she must reuse a pair?' -> '6'
|
| 15 |
+
|
| 16 |
+
[0.08] AM: 'Yara cut a cake into 4 equal pieces and ate 1 pieces. The number of pieces left was' -> 3
|
| 17 |
+
OT: "Four neighbors in a row of houses: Bea lives directly left of Chen. Ana lives at one end. Dora is not next to Ana. Bea is not next to Ana. What is Chen's house number, counting houses from left 1 through 4?" -> '3'
|
| 18 |
+
|
| 19 |
+
[0.07] AM: 'Mateo saved 5 books each day for 3 days. Altogether, Mateo saved' -> 15
|
| 20 |
+
OT: 'Mara packs for a trip with 3 jackets and 5 scarves, and she wears exactly one jacket and one scarf each day. If she refuses to repeat the same combination, what is the maximum number of days she can go without repeating an outfit?' -> '15'
|
| 21 |
+
|
| 22 |
+
[0.07] AM: 'Mei saved 2 rubber bands each day for 3 days. Altogether, Mei saved' -> 6
|
| 23 |
+
OT: 'Maya packs 3 shirts and 2 scarves into a carry-on. On each of two days she wears one shirt and one scarf, and she never repeats the same shirt-scarf combination on the two days. How many different outfits could she wear on the first day?' -> '6'
|
| 24 |
+
|
| 25 |
+
[0.07] AM: 'Yara cut a cake into 4 equal pieces and ate 1 pieces. The number of pieces left was' -> 3
|
| 26 |
+
OT: "Four shelves stand in a row, left to right. Mira's pot is not on an end shelf. The cactus is immediately right of Mira's pot. The fern is on the far-left shelf. Kai's pot holds the cactus. Which shelf number, counting from left as 1 to 4, holds Kai's pot?" -> '3'
|
| 27 |
+
|
| 28 |
+
[0.07] AM: 'Sam saved 6 muffins each day for 3 days. Altogether, Sam saved' -> 18
|
| 29 |
+
OT: "A ferry captain makes 6 round trips between Miller's Island and the mainland each day. On each round trip, her ticket puncher breaks exactly once on the way to the island, never on the return. After 3 days, how many times has the ticket puncher broken?" -> '18'
|
| 30 |
+
|
| 31 |
+
[0.07] AM: 'Yara cut a cake into 4 equal pieces and ate 1 pieces. The number of pieces left was' -> 3
|
| 32 |
+
OT: "Four friends sit in a row facing north: Pia, Quill, Rhea, and Sam. Pia is not at either end. Rhea sits directly left of Sam. Quill sits somewhere to Pia's right. What seat number (1–4 from left) does Pia occupy?" -> '3'
|
| 33 |
+
|
| 34 |
+
[0.07] AM: 'Mei saved 2 rubber bands each day for 3 days. Altogether, Mei saved' -> 6
|
| 35 |
+
OT: 'Maya packs 3 different shirts and 2 different scarves for a trip to Porto. Each day she wears exactly one shirt and one scarf, and she refuses to repeat any full combination. How many days can she go without repeating an outfit?' -> '6'
|
| 36 |
+
|
| 37 |
+
[0.07] AM: 'Aria cut a pizza into 5 equal pieces and ate 1 pieces. The number of pieces left was' -> 4
|
| 38 |
+
OT: 'Five friends sit in a row: Priya, Omar, Lena, Tom, and Yuki. Tom is not at either end. Omar sits directly to the right of Priya. Lena sits exactly in the middle. Yuki is somewhere to the left of Tom. What seat number is Priya in, counting 1 to 5 from left?' -> '4'
|