AlioLeuchtmann commited on
Commit
c6a9bef
·
verified ·
1 Parent(s): 7b5df48

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -3
README.md CHANGED
@@ -83,6 +83,8 @@ All scores are **BIRD test-set execution accuracy**. Markers show how many candi
83
 
84
  **Frontier and large general-purpose LLMs** (single-model leaderboard):
85
 
 
 
86
  | model | provider | size | test EX |
87
  |---|---|---|---|
88
  | **flash-sqlite (this model)** | — | **2B** | **73.73\*\*** |
@@ -97,7 +99,11 @@ All scores are **BIRD test-set execution accuracy**. Markers show how many candi
97
  | Mistral (2024 baseline) | Mistral AI | 123B | 55.84 |
98
  | GPT-4 | OpenAI | proprietary | 54.89 |
99
 
100
- **Specialised text-to-SQL models** (single-model leaderboard):
 
 
 
 
101
 
102
  | model | size | test EX |
103
  |---|---|---|
@@ -120,7 +126,7 @@ flash-sqlite samples 32 candidates and selects one with its own judge (see [How
120
  - The 32 samples per question come from one request (`n=32`), and vLLM batches them together.
121
  - With **prefix caching**, the long schema prompt is prefilled once and shared by all 32 samples.
122
  - The judge prompts of the same question also share their schema prefix.
123
- - **Throughput:** about **6,400–7,600 output tokens/s** on one 96 GB RTX 6000 MaxQ GPU, which is 8–11 finished candidates per second.
124
  - **The judge is almost free:**
125
  - It reads one token (P(Yes)) per result group instead of generating text.
126
  - On BIRD dev, **38% of questions needed no judge call at all**, because all executable candidates agreed.
@@ -131,7 +137,7 @@ flash-sqlite samples 32 candidates and selects one with its own judge (see [How
131
 
132
  ## BIRD dev results
133
 
134
- These come from the dev revision `bird-sql-dev-1106`: 1,532 questions with executable gold SQL, scored by execution accuracy with set comparison. All three rows come from the same generation run.
135
 
136
  | inference | EX | simple | moderate | challenging |
137
  |---|---|---|---|---|
@@ -156,6 +162,34 @@ For each question:
156
  - P(Yes) is read from the first generated token, restricted to *Yes* / *No* and renormalised.
157
  4. **Select** the group with the highest **votes × P(Yes)**.
158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  ## Usage
160
 
161
  The model expects the OmniSQL-style prompt shown below and answers with its reasoning followed by a fenced SQL block. Always take the **last** ```sql block. Use **non-thinking mode** (`enable_thinking=False`).
 
83
 
84
  **Frontier and large general-purpose LLMs** (single-model leaderboard):
85
 
86
+ ![flash-sqlite vs frontier LLM baselines on the BIRD test set](bird_test_frontier.png)
87
+
88
  | model | provider | size | test EX |
89
  |---|---|---|---|
90
  | **flash-sqlite (this model)** | — | **2B** | **73.73\*\*** |
 
99
  | Mistral (2024 baseline) | Mistral AI | 123B | 55.84 |
100
  | GPT-4 | OpenAI | proprietary | 54.89 |
101
 
102
+ **Accuracy per parameter.** The chart shows every single-model entry with a published size. flash-sqlite lies on the Pareto frontier, so no smaller entry scores higher. It is the highest-scoring model at 2B parameters or fewer.
103
+
104
+ ![BIRD test EX by model size, single-model leaderboard](bird_size_vs_score.png)
105
+
106
+ **Specialised text-to-SQL models** (single-model leaderboard, selection):
107
 
108
  | model | size | test EX |
109
  |---|---|---|
 
126
  - The 32 samples per question come from one request (`n=32`), and vLLM batches them together.
127
  - With **prefix caching**, the long schema prompt is prefilled once and shared by all 32 samples.
128
  - The judge prompts of the same question also share their schema prefix.
129
+ - **Throughput:** about **6,400–7,600 output tokens/s** on one 96 GB workstation GPU, which is 8–11 finished candidates per second.
130
  - **The judge is almost free:**
131
  - It reads one token (P(Yes)) per result group instead of generating text.
132
  - On BIRD dev, **38% of questions needed no judge call at all**, because all executable candidates agreed.
 
137
 
138
  ## BIRD dev results
139
 
140
+ These come from the dev revision `bird-sql-dev-1106`: 1,532 questions with executable gold SQL, scored by execution accuracy with set comparison. The three candidate-based rows come from the same generation run; the greedy row comes from a separate single-answer run.
141
 
142
  | inference | EX | simple | moderate | challenging |
143
  |---|---|---|---|---|
 
162
  - P(Yes) is read from the first generated token, restricted to *Yes* / *No* and renormalised.
163
  4. **Select** the group with the highest **votes × P(Yes)**.
164
 
165
+
166
+ ## Training
167
+
168
+ Training is **supervised fine-tuning only**: no reinforcement learning, no preference optimisation and no reward model. Every SQL target is **execution-verified**. A chain-of-thought trace was only kept if its final SQL, run on the real database, returned the gold result set.
169
+
170
+ **Stage 1: synthetic pre-training.**
171
+ - Data: 57,178 execution-verified synthetic examples, over generated databases and questions designed to match BIRD's style.
172
+ - Training: 2 epochs.
173
+
174
+ **Stage 2: joint generator + judge SFT.** 27,179 rows in total:
175
+ - **14,327 SQL generation traces** (BIRD train and synthetic databases):
176
+ - The traces follow a structured chain of thought: question and hint mapping, schema selection, join path, filters, aggregation, edge-case checks, then the final SQL.
177
+ - They were rejection-sampled from a Qwen 27B teacher.
178
+ - **8,314 pointwise critiques:**
179
+ - Each one judges a single candidate query and its execution result, and ends in a Yes/No verdict.
180
+ - The teacher wrote them without seeing the label. Only critiques whose verdict matched the execution-based label were kept.
181
+ - **4,538 listwise judge rows:**
182
+ - Several candidates (grouped by execution result) are compared, then the model chooses one or answers "none".
183
+
184
+ Hyperparameters for stage 2:
185
+ - Full fine-tune in bf16, 3 epochs.
186
+ - Learning rate 2e-5 (cosine schedule), 50 warmup steps.
187
+ - Effective batch size 32.
188
+ - NEFTune α = 5.
189
+ - Maximum sequence length 16,384.
190
+
191
+ The prompts contain per-column descriptions, read from each BIRD database's `database_description/*.csv` files.
192
+
193
  ## Usage
194
 
195
  The model expects the OmniSQL-style prompt shown below and answers with its reasoning followed by a fenced SQL block. Always take the **last** ```sql block. Use **non-thinking mode** (`enable_thinking=False`).