Upload folder using huggingface_hub
Browse files- configs/verifier_v_7b.yaml +29 -0
- results/M1_verifier_findings.md +85 -0
configs/verifier_v_7b.yaml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model V on the 7B-Math base — tests whether raw capability lifts the
|
| 2 |
+
# arithmetic-verification ceiling the 1.5B hit. Apache-2.0, fits an 80GB A100.
|
| 3 |
+
# Run with --gpu-preset none so these (7B-sized) batch settings apply instead of
|
| 4 |
+
# the 1.5B a100 preset:
|
| 5 |
+
# python -m mathcompose.train.train --task v --config configs/verifier_v_7b.yaml --gpu-preset none
|
| 6 |
+
extends: "base.yaml"
|
| 7 |
+
|
| 8 |
+
task: "v"
|
| 9 |
+
output_dir: "runs/verifier_v_7b"
|
| 10 |
+
hub_model_id: null # e.g. "42e/mathcompose-verifier-7b"
|
| 11 |
+
|
| 12 |
+
model:
|
| 13 |
+
base_id: "Qwen/Qwen2.5-Math-7B-Instruct"
|
| 14 |
+
max_context: 4096
|
| 15 |
+
|
| 16 |
+
data:
|
| 17 |
+
train_path: "data/verifier/train.jsonl" # same v2 genuine-detection data
|
| 18 |
+
val_path: "data/verifier/val.jsonl"
|
| 19 |
+
|
| 20 |
+
train:
|
| 21 |
+
max_length: 4096
|
| 22 |
+
per_device_train_batch_size: 4 # 7B: smaller batch than the 1.5B preset
|
| 23 |
+
gradient_accumulation_steps: 4 # eff batch 16
|
| 24 |
+
gradient_checkpointing: true
|
| 25 |
+
|
| 26 |
+
eval:
|
| 27 |
+
processbench_splits: ["gsm8k", "math", "olympiadbench", "omnimath"]
|
| 28 |
+
maj_k: 8
|
| 29 |
+
gpt4o_reference_f1: 61.9
|
results/M1_verifier_findings.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# M1 findings — a 1.5B SFT process-verifier hits an arithmetic-verification ceiling
|
| 2 |
+
|
| 3 |
+
**Behavior:** Model V, a generative process verifier that reads a problem + a step-indexed
|
| 4 |
+
solution and returns the 0-based index of the first wrong step (`-1` = all correct), scored on
|
| 5 |
+
**ProcessBench** (first-error F1) with **PRMBench** as an adversarial check.
|
| 6 |
+
|
| 7 |
+
**Headline:** across two data recipes, more data, and higher LoRA rank, fine-tuning **did not
|
| 8 |
+
teach a Qwen2.5-Math-1.5B model to localize math errors** on ProcessBench. It instead made the
|
| 9 |
+
model *more* confident that solutions are correct. The failure is concentrated on **arithmetic**
|
| 10 |
+
verification, which a 1.5B model cannot do reliably without a calculator — exactly why GenPRM-1.5B
|
| 11 |
+
(the sub-4B precedent) needed **code execution**, a component we deliberately scoped out. This is
|
| 12 |
+
the sub-4B fragility `notes/research-small-vs-large-math.md` warned about, observed directly.
|
| 13 |
+
|
| 14 |
+
## Setup
|
| 15 |
+
- Base: `Qwen/Qwen2.5-Math-1.5B-Instruct` (Apache-2.0, 4096 ctx). QLoRA, TRL 1.7.1 SFT.
|
| 16 |
+
- Data: PRM800K first-error labels (MIT), critiques distilled from `claude-opus-4-8`,
|
| 17 |
+
deduped vs ProcessBench/MATH-500. Two recipes (below).
|
| 18 |
+
- Eval: ProcessBench (objective F1) + PRMBench (adversarial). Objective checkers, **no LLM judge**.
|
| 19 |
+
- Baseline to beat: GPT-4o ProcessBench avg F1 = **61.9** (4-subset average).
|
| 20 |
+
|
| 21 |
+
## Two data recipes tried
|
| 22 |
+
- **v1 — rationalized:** teacher told the gold index, writes a consistent critique. 1,430 examples
|
| 23 |
+
(rebalanced 50/50), LoRA r=16.
|
| 24 |
+
- **v2 — genuine detection:** teacher critiques *blind*; keep a critique only if its predicted
|
| 25 |
+
index matches the PRM800K gold (rejection sampling, **77% keep-rate**). 8,127 examples
|
| 26 |
+
(naturally ~50/50), LoRA r=32. This is the "distill the process, not the style" fix.
|
| 27 |
+
|
| 28 |
+
## Results (ProcessBench gsm8k, 100 random examples)
|
| 29 |
+
|
| 30 |
+
| model | decode | acc_error | acc_correct | F1 | pred=−1 rate |
|
| 31 |
+
|---|---|---|---|---|---|
|
| 32 |
+
| base (untuned) | greedy | 0.089 | 0.855 | 0.161 | **0.76** |
|
| 33 |
+
| **v1** (rationalized, 1.4k, r16) | greedy | 0.111 | 0.945 | 0.199 | **0.83** |
|
| 34 |
+
| **v2** (genuine, 8.1k, r32) | greedy | 0.089 | 0.982 | 0.163 | **0.92** |
|
| 35 |
+
| v2 | Maj@4 | 0.067 | 1.000 | 0.125 | **0.94** |
|
| 36 |
+
|
| 37 |
+
**Reading it:**
|
| 38 |
+
- **Fine-tuning raised the "all-correct" rate (0.76 → 0.83 → 0.92)** — SFT taught the model to
|
| 39 |
+
*pass* solutions more confidently, the opposite of a verifier's job. `acc_error` never moved off
|
| 40 |
+
the base's ~0.09.
|
| 41 |
+
- **The "better" recipe was worse here:** v2 (genuine detection, 5.7× data, 2× rank) collapsed to
|
| 42 |
+
−1 *more* than v1 and scored *below* it on gsm8k. More/cleaner data did not help — a capability
|
| 43 |
+
signal, not a data-quantity signal (cf. LoRA-Learns-Less: hard new skills need more than low-rank
|
| 44 |
+
small-data SFT).
|
| 45 |
+
- **Maj@k hurts a non-confident verifier:** sampling scatters the error-index votes while −1 stays
|
| 46 |
+
the modal vote, so majority amplifies the −1 collapse (Maj@4 worse than greedy). Maj@k only helps
|
| 47 |
+
once the base predictions are good (the GenPRM regime).
|
| 48 |
+
|
| 49 |
+
## The bright spot that explains the failure — PRMBench (196 modified, Maj@1)
|
| 50 |
+
- **detection 0.413** (flags *some* error on 41% of erroneous items), localization 0.148,
|
| 51 |
+
false-positive 0.205.
|
| 52 |
+
- Per category: **confidence 0.60, step_contradiction 0.50, domain_inconsistency 0.46,
|
| 53 |
+
counterfactual 0.46**, circular 0.39, missing_condition 0.39, deception 0.30, **redundancy 0.26**.
|
| 54 |
+
|
| 55 |
+
The same model that flags errors only ~8% of the time on gsm8k flags them **41%** of the time on
|
| 56 |
+
PRMBench — because PRMBench's injected errors are **structural/logical** (circular reasoning, step
|
| 57 |
+
contradictions, confidence), which are detectable from language, whereas gsm8k errors are
|
| 58 |
+
**arithmetic**, which a 1.5B model can't verify by "reading." V learned to catch the errors it can
|
| 59 |
+
*reason about* and punts (→ −1) on the ones requiring *computation*.
|
| 60 |
+
|
| 61 |
+
## Diagnosis (why SFT alone can't fix it)
|
| 62 |
+
1. **Arithmetic-verification ceiling.** 1.5B can't reliably recompute steps, so it hedges to "looks
|
| 63 |
+
correct" on arithmetic-heavy gsm8k. GenPRM-1.5B needed **code execution** to reach 63 F1.
|
| 64 |
+
2. **The decision is a needle in the critique.** With `completion_only_loss` over ~400-token
|
| 65 |
+
critiques, the boxed index is ~1 token; SFT optimizes critique *prose* (token-acc 0.78) and
|
| 66 |
+
under-weights the actual verdict.
|
| 67 |
+
3. **Distribution shift.** Trained on MATH-based PRM800K (opus critiques); ProcessBench-gsm8k
|
| 68 |
+
solutions come from other models with different, arithmetic-heavy error styles.
|
| 69 |
+
|
| 70 |
+
## What this validates (the honest thesis)
|
| 71 |
+
The project's premise — "a small model can win on the *easy side* of the generator–verifier
|
| 72 |
+
asymmetry" — holds **only where the checkable signal is cheap** (a compiler, a step label the model
|
| 73 |
+
can *read*). For **arithmetic** step-checking, a 1.5B model without a calculator is on the *hard*
|
| 74 |
+
side after all. This is a concrete, reproducible instance of the note's "sub-4B evidence is thin"
|
| 75 |
+
caveat, with the mechanism identified.
|
| 76 |
+
|
| 77 |
+
## Next steps (decided)
|
| 78 |
+
1. **7B verifier** �� retrain V on `Qwen2.5-Math-7B-Instruct` (Apache, fits the 80GB A100). Tests
|
| 79 |
+
whether raw capability alone lifts arithmetic verification. `configs/verifier_v_7b.yaml`.
|
| 80 |
+
2. **Code execution (GenPRM's actual recipe)** — let V run Python to check steps, targeting the
|
| 81 |
+
arithmetic ceiling directly. The principled fix; bigger build.
|
| 82 |
+
|
| 83 |
+
## Reproduce
|
| 84 |
+
`results/processbench_base.json`, `processbench_tuned*.json`, `prmbench_tuned.json` (this dir).
|
| 85 |
+
Datasets: `42e/mathcompose-verifier` (v2, genuine detection). Code: `42e/mathcompose`.
|