README
Browse files
README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Reproduction: "Beyond Confidence: Adaptive and Coherent Decoding for Diffusion Language Models"
|
| 2 |
+
|
| 3 |
+
Independent reproduction of ICML 2026 paper #6883 (OpenReview `b0O96emqNj`, arXiv
|
| 4 |
+
[2512.02044](https://arxiv.org/abs/2512.02044)). **No official code was released**, so
|
| 5 |
+
everything here is written from the equations in Section 3.
|
| 6 |
+
|
| 7 |
+
## Layout
|
| 8 |
+
|
| 9 |
+
| path | what |
|
| 10 |
+
|---|---|
|
| 11 |
+
| `scripts/ccd_decode.py` | CCD + CCD-DS decoder for Dream (Eq. 1, 6, 16, 17, 18, 20) |
|
| 12 |
+
| `scripts/run_eval.py` | Trip Plan / HumanEval driver, Dream's official hyperparameters |
|
| 13 |
+
| `scripts/check_propositions.py` | Claim 2: exact numerical audit of Prop. 1 and Prop. 2 |
|
| 14 |
+
| `scripts/check_budget_bound.py` | the `k <= V/(d+1)` speedup ceiling + simulation |
|
| 15 |
+
| `scripts/smoke_test.py` | decoder mechanics on a tiny random Dream (CPU) |
|
| 16 |
+
| `scripts/test_scorers.py` | metric validation against gold answers (CPU) |
|
| 17 |
+
| `scripts/make_figures.py` | logbook figures + raw CSVs |
|
| 18 |
+
| `scripts/job_*.sh` | the exact HF Jobs run scripts |
|
| 19 |
+
| `data/trip_planning.json` | Trip Plan benchmark (from DreamLM/Dream `eval/data/`) |
|
| 20 |
+
| `outputs/` | all results, per-example scores/steps/responses, figures |
|
| 21 |
+
|
| 22 |
+
## Reproducing
|
| 23 |
+
|
| 24 |
+
```bash
|
| 25 |
+
pip install torch "transformers==4.46.2" "huggingface_hub<1.0" "datasets<4" accelerate
|
| 26 |
+
# free, no GPU: mechanism + metric gates + both analytical claims
|
| 27 |
+
python scripts/smoke_test.py
|
| 28 |
+
python scripts/test_scorers.py
|
| 29 |
+
python scripts/check_propositions.py
|
| 30 |
+
python scripts/check_budget_bound.py
|
| 31 |
+
# GPU (~24GB): one benchmark config
|
| 32 |
+
python scripts/run_eval.py --task trip --method ccd_ds --limit 64 --out outputs/x.json
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Hyperparameters
|
| 36 |
+
|
| 37 |
+
Taken from the Dream authors' own eval scripts, which is what the paper says it does
|
| 38 |
+
("we follow the base models' default settings without tuning"):
|
| 39 |
+
|
| 40 |
+
* Trip Plan: `steps=256, max_new_tokens=256, temperature=0, top_p=1, alg=entropy`, 2-shot
|
| 41 |
+
(`DreamLM/Dream eval/eval_dream_gen_planning.sh`)
|
| 42 |
+
* HumanEval: `steps=768, max_new_tokens=768, temperature=0.1, top_p=0.9, alg=entropy`, 0-shot
|
| 43 |
+
chat template (`DreamLM/Dream eval_instruct/eval.sh`)
|
| 44 |
+
|
| 45 |
+
CCD: `V=4`, `d=3` for Dream (paper Sec. 4.2).
|
| 46 |
+
|
| 47 |
+
## Gotchas found
|
| 48 |
+
|
| 49 |
+
* The Trip Plan file is **ordered by difficulty** (first 200 examples are all
|
| 50 |
+
`num_cities=3`). Prefix sampling inflates the score ~55% vs ~15%. Use the
|
| 51 |
+
stratified sampler in `load_trip`.
|
| 52 |
+
* HumanEval responses are the function **body only** (the prompt's `gen_prefix`
|
| 53 |
+
already contains the signature), so the `\ndef` stop sequence must be applied to
|
| 54 |
+
the continuation, not to prompt+continuation.
|