MATS-SQL Bundle — Progress Snapshot
Bundle: thanhdath/mats-sql-bundle (HuggingFace)
Snapshot date: 2026-05-13
Original Task
Multi-agent Text2SQL pipeline reaching pass@8 ≥ 67% (BIRD-dev, EX). Hard constraints from project owner:
- Planner ≤ 3B params
- Selection ≤ 3B params
- Validator(s) and Fixer ≤ 1B params each (prefer 0.5B)
- Max ORPO iter-2 (no iter-3+)
- No commercial APIs (no GPT teacher) — collaborative training must be structurally necessary
- V+F (validators + fixer) must not hurt final accuracy and should contribute to acc increase
- Results tables must include per-agent parameter counts
- Two specialized validators per paper §Combined Validator: v_s (selection) and v_c (condition)
Current Progress (latest)
Best result so far (BIRD-dev, K=8)
| Config | N | pass@8 (recall, oracle) | Selector pick | Notes |
|---|---|---|---|---|
| 1-stage iter-2 uniform-temp | 1524 | 64.96% | 64.96%* | * selector currently leaks gold label — overstates |
| 1-stage iter-2 mixed-temp (0.5/0.7/0.9/1.1) | 1525 | 65.38% | 65.38%* | best vanilla planner-only |
| 3-stage iter-2 + 0.6B v_s/v_c + ORPO fixer iter-1 | 1525 | 65.05% | 65.05%* | V+F neutral, 0 rescues |
| 3-stage iter-2 + 0.5B v_s/v_c + replanner-fixer iter-2 | 1534 (in flight) | pending | pending | current eval, ETA 30 min |
(*) 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.
Per-model status
| Agent | Model | Params | Status |
|---|---|---|---|
| Planner | Qwen2.5-Coder-3B-Instruct + ORPO iter-2 (collab) | 3B | trained ✓ |
| Selector | Qwen2.5-Coder-3B-Instruct + SFT (YES/NO binary) | 3B | trained ✓ |
| Validator-Selection (v_s) | Qwen2.5-Coder-0.5B-Instruct + SFT v3 | 0.5B | trained ✓ |
| Validator-Condition (v_c) | Qwen3-0.6B-Instruct + SFT v3 | 0.6B | trained ✓ (0.5B variant truncated, retrain pending) |
| Fixer (re-planner) | Qwen2.5-Coder-0.5B + ORPO iter-2 (replanner data) | 0.5B | trained ✓ |
V+F contribution diagnostic (mixed-temp iter-2 K=8, 1525 q)
- Validators critique 91.6% of trajectories; old fixer ignored 98.6% → 0 rescues at pass@8
- Replanner fixer (iter-2) currently flipping ~40% of trajectories (winloss=605 at 1360/1534) — net effect being measured
Key findings
- ORPO planner: SFT 64.11% → iter-1 64.26% → iter-2 64.96% (+0.70pp, diminishing returns)
- Mixed-temp sampling adds +0.42pp over uniform-temp at K=8
- v3 validator data rebalanced from 8% all-OK (over-critique) to 34.5%/61% all-OK
- 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
- pass@8 (true recall) is the upper bound for trained-selector accuracy; need recall ≥70% to land headline ≥67% after selector picks
What's Next (in priority order)
- Phase4 K=8 3-stage eval finishes (currently 89% done, ETA 30 min) → get pass@8 with replanner-fixer.
- Apply patched (leak-free) selector to all K=8 JSONLs → get true selector accuracy (not oracle).
- If pass@8 selector ≥67%: DONE. Write results table with per-agent sizes.
- If pass@8 selector <67%:
- Re-mine fixer ORPO data on iter-2 planner BIRD-train rollouts (current data was from iter-1 planner → distribution shift).
- Re-train fixer ORPO iter-2 on fresh data.
- Consider planner sampling tricks: wider mixed-temp (0.3-1.3), nucleus variation.
- Make V+F contribute (currently neutral): the 0.5B replanner fixer's
winlossis now high (~40%) — need to check if those flips are net+ or net-. If net-, gate fixer to only run onplanner_exec_ok=Falsecases.
Repo contents
mats-sql-bundle/
├── PROGRESS.md # this file
├── models/
│ ├── planner-iter2-collab-3B/ # 3B ORPO iter-2 planner
│ ├── selector-3B-sft/ # 3B trained selector
│ ├── validator-selection-0.5B-v3/ # v_s SFT
│ ├── validator-condition-0.6B-v3/ # v_c SFT
│ └── fixer-replanner-0.5B-iter2-orpo/ # ORPO iter-2 re-planner fixer
├── data/
│ ├── sft-validator-selection-v3/ # SFT data for v_s
│ ├── sft-validator-condition-v3/ # SFT data for v_c
│ ├── hf_fixer_replanner/ # ORPO data for fixer iter-2
│ └── hf_planner_collaborative_iter2/ # ORPO data for planner iter-2
├── recipes/
│ ├── orpo-planner-collab-iter2.yaml
│ ├── orpo-fixer-replanner-0.5b-iter2.yaml
│ ├── validator-selection-fft-0.5b-v3.yaml
│ └── validator-condition-fft-0.5b-v3.yaml
└── scripts/
├── run_pipeline_rollouts.py # rollout / 3-stage runner
├── compute_bestofn_with_selector.py # selector apply (patched)
├── compute_bestofn_metrics.py # oracle/greedy metrics
├── build_validator_2agents_v3.py # v_s/v_c data builder
└── build_fixer_replanner_iter2.py # fixer re-planner data builder
How to continue from this bundle
# 1. Clone the bundle (~16 GB)
git clone https://huggingface.co/datasets/thanhdath/mats-sql-bundle
cd mats-sql-bundle
# 2. Symlink to alignment-handbook layout
ln -s $(pwd)/models /path/to/alignment-handbook/output
ln -s $(pwd)/data /path/to/mats-sql-tist/data/llm_alignment_imported
# 3. Continue from where we left off: BIRD-dev K=8 3-stage with iter-2 planner + 0.5B agents
bash scripts/run_pipeline_rollouts.py --K 8 --mixed_temp "0.5,0.7,0.9,1.1" ...
# 4. To do iter-3 (if needed), re-mine fixer data on iter-2 planner BIRD-train rollouts first.
Maintainer: thanhdath@gmail.com / thanhdath97@gmail.com Source repo: /home/datht/mats-sql-tist (private dev machine)