thanhdath commited on
Commit
7aa32bf
·
verified ·
1 Parent(s): db36ed2

chore: remove stale PROGRESS.md

Browse files
Files changed (1) hide show
  1. PROGRESS.md +0 -144
PROGRESS.md DELETED
@@ -1,144 +0,0 @@
1
- # MATS-SQL Bundle — Progress Snapshot
2
-
3
- **Bundle**: `thanhdath/mats-sql-bundle` (HuggingFace)
4
- **Snapshot date**: 2026-05-13
5
-
6
- ---
7
-
8
- ## Original Task
9
-
10
- Multi-agent Text2SQL pipeline reaching **pass@8 ≥ 67%** (BIRD-dev, EX). Hard constraints from project owner:
11
-
12
- - Planner ≤ 3B params
13
- - Selection ≤ 3B params
14
- - Validator(s) and Fixer ≤ 1B params each (prefer 0.5B)
15
- - Max ORPO iter-2 (no iter-3+)
16
- - **No commercial APIs (no GPT teacher)** — collaborative training must be structurally necessary
17
- - V+F (validators + fixer) must **not hurt** final accuracy and **should contribute** to acc increase
18
- - Results tables must include per-agent parameter counts
19
- - Two specialized validators per paper §Combined Validator: **v_s (selection)** and **v_c (condition)**
20
-
21
- ---
22
-
23
- ## Current Progress (latest)
24
-
25
- ### Best result so far (BIRD-dev, K=8)
26
-
27
- | Config | N | pass@8 (recall, oracle) | Trained selector (real, no leak) | Notes |
28
- |---|---|---|---|---|
29
- | 1-stage iter-2 uniform-temp | 1524 | 64.96% | — | leak-pre-patch number was 64.96 |
30
- | 1-stage iter-2 mixed-temp (0.5/0.7/0.9/1.1) | 1525 | **65.38%** | — | best recall |
31
- | 3-stage iter-2 + 0.6B v_s/v_c + ORPO fixer iter-1 | 1525 | 65.05% | — | V+F neutral (0 rescues) |
32
- | 3-stage iter-2 + 0.5B v_s + 0.6B v_c + 0.5B **replanner**-fixer iter-2 | 1525 | 65.11% | **54.30%** | leak-free selector measurement; **fixer iter-2 +0.06pp vs iter-1** |
33
-
34
- **Critical finding (2026-05-13):** `compute_bestofn_with_selector.py` had `exec_response = "OK" if is_planner_correct else "Error / no rows"` — passed the gold-graded label to the selector → trivially matched oracle. **Patched** to use actual SQL execution result. Real trained-selector accuracy is **54.30%, NOT 65%**. Selector → oracle gap = 10.81pp.
35
-
36
- ### Two headline gaps to close (target = headline EX ≥ 67%)
37
-
38
- | Gap | Current | Target | Gap | Lever |
39
- |---|---|---|---|---|
40
- | **Oracle pass@8** (recall) | 65.38% (mixed-temp) | ≥70% | +4.6pp | More diverse sampling / better fixer rescues |
41
- | **Selector → oracle** | 57.25 / 65.38 = 87.6% | ≥95% | +8.13pp | Selector v3 (more data / different arch) |
42
-
43
- ### Selector v2 results (2026-05-13 — row preview added to prompt)
44
-
45
- Retrained 3B selector with `OK. Rows preview: <rows>` instead of bare `OK`. Closes ~3-4pp of the ~11pp gap.
46
-
47
- | Config (BIRD-dev K=8 iter-2 planner) | Oracle | Selector v1 (no rows) | **Selector v2 (rows)** | v2 gain |
48
- |---|---|---|---|---|
49
- | 1-stage uniform-temp | 64.96% | 53.94% | 56.43% | +2.49pp |
50
- | **1-stage mixed-temp** | **65.38%** | 53.64% | **57.25%** ← headline | +3.61pp |
51
- | 2-stage + ORPO fixer-iter1 | 63.04% | 52.72% | 56.02% | +3.30pp |
52
- | 3-stage + 0.6B V/V + ORPO fixer-iter1 | 65.05% | 53.11% | 56.98% | +3.87pp |
53
- | 3-stage + 0.5B V/V + 0.5B replanner-fixer | 65.11% | 53.51% | 56.66% | +3.15pp |
54
-
55
- **Headline pass@8 post-selector = 57.25%** (1-stage mixed-temp + v2 selector). Still −9.75pp from 67%.
56
-
57
- ### Per-model status
58
-
59
- | Agent | Model | Params | Status |
60
- |---|---|---|---|
61
- | Planner | Qwen2.5-Coder-3B-Instruct + ORPO iter-2 (collab) | 3B | trained ✓ |
62
- | Selector | Qwen2.5-Coder-3B-Instruct + SFT (YES/NO binary) | 3B | trained ✓ |
63
- | Validator-Selection (v_s) | Qwen2.5-Coder-0.5B-Instruct + SFT v3 | 0.5B | trained ✓ |
64
- | Validator-Condition (v_c) | Qwen3-0.6B-Instruct + SFT v3 | 0.6B | trained ✓ (0.5B variant truncated, retrain pending) |
65
- | Fixer (re-planner) | Qwen2.5-Coder-0.5B + ORPO iter-2 (replanner data) | 0.5B | trained ✓ |
66
-
67
- ### V+F contribution diagnostic (mixed-temp iter-2 K=8, 1525 q)
68
-
69
- - Validators critique 91.6% of trajectories; old fixer ignored 98.6% → 0 rescues at pass@8
70
- - Replanner fixer (iter-2) currently flipping ~40% of trajectories (winloss=605 at 1360/1534) — net effect being measured
71
-
72
- ### Key findings
73
-
74
- - ORPO planner: SFT 64.11% → iter-1 64.26% → iter-2 64.96% (+0.70pp, diminishing returns)
75
- - Mixed-temp sampling adds +0.42pp over uniform-temp at K=8
76
- - v3 validator data rebalanced from 8% all-OK (over-critique) to 34.5%/61% all-OK
77
- - Fixer dataset re-built as "re-planner" objective (1833 pairs): given a failed planner trajectory, produce a correct alternative from same question's K=4 trajectories
78
- - pass@8 (true recall) is the *upper bound* for trained-selector accuracy; need recall ≥70% to land headline ≥67% after selector picks
79
-
80
- ---
81
-
82
- ## What's Next (in priority order)
83
-
84
- 1. **Phase4 K=8 3-stage eval finishes** (currently 89% done, ETA 30 min) → get pass@8 with replanner-fixer.
85
- 2. **Apply patched (leak-free) selector** to all K=8 JSONLs → get true selector accuracy (not oracle).
86
- 3. **If pass@8 selector ≥67%: DONE.** Write results table with per-agent sizes.
87
- 4. **If pass@8 selector <67%:**
88
- - Re-mine fixer ORPO data on **iter-2 planner** BIRD-train rollouts (current data was from iter-1 planner → distribution shift).
89
- - Re-train fixer ORPO iter-2 on fresh data.
90
- - Consider planner sampling tricks: wider mixed-temp (0.3-1.3), nucleus variation.
91
- 5. **Make V+F contribute (currently neutral):** the 0.5B replanner fixer's `winloss` is now high (~40%) — need to check if those flips are net+ or net-. If net-, gate fixer to only run on `planner_exec_ok=False` cases.
92
-
93
- ---
94
-
95
- ## Repo contents
96
-
97
- ```
98
- mats-sql-bundle/
99
- ├── PROGRESS.md # this file
100
- ├── models/
101
- │ ├── planner-iter2-collab-3B/ # 3B ORPO iter-2 planner
102
- │ ├── selector-3B-sft/ # 3B trained selector
103
- │ ├── validator-selection-0.5B-v3/ # v_s SFT
104
- │ ├── validator-condition-0.6B-v3/ # v_c SFT
105
- │ └── fixer-replanner-0.5B-iter2-orpo/ # ORPO iter-2 re-planner fixer
106
- ├── data/
107
- │ ├── sft-validator-selection-v3/ # SFT data for v_s
108
- │ ├── sft-validator-condition-v3/ # SFT data for v_c
109
- │ ├── hf_fixer_replanner/ # ORPO data for fixer iter-2
110
- │ └── hf_planner_collaborative_iter2/ # ORPO data for planner iter-2
111
- ├── recipes/
112
- │ ├── orpo-planner-collab-iter2.yaml
113
- │ ├── orpo-fixer-replanner-0.5b-iter2.yaml
114
- │ ├── validator-selection-fft-0.5b-v3.yaml
115
- │ └── validator-condition-fft-0.5b-v3.yaml
116
- └── scripts/
117
- ├── run_pipeline_rollouts.py # rollout / 3-stage runner
118
- ├── compute_bestofn_with_selector.py # selector apply (patched)
119
- ├── compute_bestofn_metrics.py # oracle/greedy metrics
120
- ├── build_validator_2agents_v3.py # v_s/v_c data builder
121
- └── build_fixer_replanner_iter2.py # fixer re-planner data builder
122
- ```
123
-
124
- ## How to continue from this bundle
125
-
126
- ```bash
127
- # 1. Clone the bundle (~16 GB)
128
- git clone https://huggingface.co/datasets/thanhdath/mats-sql-bundle
129
- cd mats-sql-bundle
130
-
131
- # 2. Symlink to alignment-handbook layout
132
- ln -s $(pwd)/models /path/to/alignment-handbook/output
133
- ln -s $(pwd)/data /path/to/mats-sql-tist/data/llm_alignment_imported
134
-
135
- # 3. Continue from where we left off: BIRD-dev K=8 3-stage with iter-2 planner + 0.5B agents
136
- bash scripts/run_pipeline_rollouts.py --K 8 --mixed_temp "0.5,0.7,0.9,1.1" ...
137
-
138
- # 4. To do iter-3 (if needed), re-mine fixer data on iter-2 planner BIRD-train rollouts first.
139
- ```
140
-
141
- ---
142
-
143
- **Maintainer**: thanhdath@gmail.com / thanhdath97@gmail.com
144
- **Source repo**: /home/datht/mats-sql-tist (private dev machine)