thanhdath commited on
Commit
8377cfd
Β·
verified Β·
1 Parent(s): 45e8588

Upload PROGRESS.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. PROGRESS.md +123 -0
PROGRESS.md ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) | Selector pick | Notes |
28
+ |---|---|---|---|---|
29
+ | 1-stage iter-2 uniform-temp | 1524 | 64.96% | 64.96%* | * selector currently leaks gold label β€” overstates |
30
+ | 1-stage iter-2 mixed-temp (0.5/0.7/0.9/1.1) | 1525 | **65.38%** | 65.38%* | best vanilla planner-only |
31
+ | 3-stage iter-2 + 0.6B v_s/v_c + ORPO fixer iter-1 | 1525 | 65.05% | 65.05%* | V+F neutral, 0 rescues |
32
+ | 3-stage iter-2 + 0.5B v_s/v_c + replanner-fixer iter-2 | 1534 (in flight) | pending | pending | current eval, ETA 30 min |
33
+
34
+ (*) The selector apply path had a gold-label leak (`is_planner_correct` used in prompt); patched in `compute_bestofn_with_selector.py` β€” re-run pending.
35
+
36
+ ### Per-model status
37
+
38
+ | Agent | Model | Params | Status |
39
+ |---|---|---|---|
40
+ | Planner | Qwen2.5-Coder-3B-Instruct + ORPO iter-2 (collab) | 3B | trained βœ“ |
41
+ | Selector | Qwen2.5-Coder-3B-Instruct + SFT (YES/NO binary) | 3B | trained βœ“ |
42
+ | Validator-Selection (v_s) | Qwen2.5-Coder-0.5B-Instruct + SFT v3 | 0.5B | trained βœ“ |
43
+ | Validator-Condition (v_c) | Qwen3-0.6B-Instruct + SFT v3 | 0.6B | trained βœ“ (0.5B variant truncated, retrain pending) |
44
+ | Fixer (re-planner) | Qwen2.5-Coder-0.5B + ORPO iter-2 (replanner data) | 0.5B | trained βœ“ |
45
+
46
+ ### V+F contribution diagnostic (mixed-temp iter-2 K=8, 1525 q)
47
+
48
+ - Validators critique 91.6% of trajectories; old fixer ignored 98.6% β†’ 0 rescues at pass@8
49
+ - Replanner fixer (iter-2) currently flipping ~40% of trajectories (winloss=605 at 1360/1534) β€” net effect being measured
50
+
51
+ ### Key findings
52
+
53
+ - ORPO planner: SFT 64.11% β†’ iter-1 64.26% β†’ iter-2 64.96% (+0.70pp, diminishing returns)
54
+ - Mixed-temp sampling adds +0.42pp over uniform-temp at K=8
55
+ - v3 validator data rebalanced from 8% all-OK (over-critique) to 34.5%/61% all-OK
56
+ - 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
57
+ - pass@8 (true recall) is the *upper bound* for trained-selector accuracy; need recall β‰₯70% to land headline β‰₯67% after selector picks
58
+
59
+ ---
60
+
61
+ ## What's Next (in priority order)
62
+
63
+ 1. **Phase4 K=8 3-stage eval finishes** (currently 89% done, ETA 30 min) β†’ get pass@8 with replanner-fixer.
64
+ 2. **Apply patched (leak-free) selector** to all K=8 JSONLs β†’ get true selector accuracy (not oracle).
65
+ 3. **If pass@8 selector β‰₯67%: DONE.** Write results table with per-agent sizes.
66
+ 4. **If pass@8 selector <67%:**
67
+ - Re-mine fixer ORPO data on **iter-2 planner** BIRD-train rollouts (current data was from iter-1 planner β†’ distribution shift).
68
+ - Re-train fixer ORPO iter-2 on fresh data.
69
+ - Consider planner sampling tricks: wider mixed-temp (0.3-1.3), nucleus variation.
70
+ 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.
71
+
72
+ ---
73
+
74
+ ## Repo contents
75
+
76
+ ```
77
+ mats-sql-bundle/
78
+ β”œβ”€β”€ PROGRESS.md # this file
79
+ β”œβ”€β”€ models/
80
+ β”‚ β”œβ”€β”€ planner-iter2-collab-3B/ # 3B ORPO iter-2 planner
81
+ β”‚ β”œβ”€β”€ selector-3B-sft/ # 3B trained selector
82
+ β”‚ β”œβ”€β”€ validator-selection-0.5B-v3/ # v_s SFT
83
+ β”‚ β”œβ”€β”€ validator-condition-0.6B-v3/ # v_c SFT
84
+ β”‚ └── fixer-replanner-0.5B-iter2-orpo/ # ORPO iter-2 re-planner fixer
85
+ β”œβ”€β”€ data/
86
+ β”‚ β”œβ”€β”€ sft-validator-selection-v3/ # SFT data for v_s
87
+ β”‚ β”œβ”€β”€ sft-validator-condition-v3/ # SFT data for v_c
88
+ β”‚ β”œβ”€β”€ hf_fixer_replanner/ # ORPO data for fixer iter-2
89
+ β”‚ └── hf_planner_collaborative_iter2/ # ORPO data for planner iter-2
90
+ β”œβ”€β”€ recipes/
91
+ β”‚ β”œβ”€β”€ orpo-planner-collab-iter2.yaml
92
+ β”‚ β”œβ”€β”€ orpo-fixer-replanner-0.5b-iter2.yaml
93
+ β”‚ β”œβ”€β”€ validator-selection-fft-0.5b-v3.yaml
94
+ β”‚ └── validator-condition-fft-0.5b-v3.yaml
95
+ └── scripts/
96
+ β”œβ”€β”€ run_pipeline_rollouts.py # rollout / 3-stage runner
97
+ β”œβ”€β”€ compute_bestofn_with_selector.py # selector apply (patched)
98
+ β”œβ”€β”€ compute_bestofn_metrics.py # oracle/greedy metrics
99
+ β”œβ”€β”€ build_validator_2agents_v3.py # v_s/v_c data builder
100
+ └── build_fixer_replanner_iter2.py # fixer re-planner data builder
101
+ ```
102
+
103
+ ## How to continue from this bundle
104
+
105
+ ```bash
106
+ # 1. Clone the bundle (~16 GB)
107
+ git clone https://huggingface.co/datasets/thanhdath/mats-sql-bundle
108
+ cd mats-sql-bundle
109
+
110
+ # 2. Symlink to alignment-handbook layout
111
+ ln -s $(pwd)/models /path/to/alignment-handbook/output
112
+ ln -s $(pwd)/data /path/to/mats-sql-tist/data/llm_alignment_imported
113
+
114
+ # 3. Continue from where we left off: BIRD-dev K=8 3-stage with iter-2 planner + 0.5B agents
115
+ bash scripts/run_pipeline_rollouts.py --K 8 --mixed_temp "0.5,0.7,0.9,1.1" ...
116
+
117
+ # 4. To do iter-3 (if needed), re-mine fixer data on iter-2 planner BIRD-train rollouts first.
118
+ ```
119
+
120
+ ---
121
+
122
+ **Maintainer**: thanhdath@gmail.com / thanhdath97@gmail.com
123
+ **Source repo**: /home/datht/mats-sql-tist (private dev machine)