Snowflake’s 7B Arctic-Text2SQL-R1 beat GPT-4o on a six-benchmark SQL average
Made by Zhewei Yao and nine co-authors
arXiv preprint; five of GPT-4o’s six scores from the OmniSQL paper
The result
The story
Questions in, SQL out
Text-to-SQL turns a plain-language question about a database into a query. The task is narrow and easy to check: run the model’s SQL and the reference SQL on the same database and compare what comes back. Snowflake AI Research, with co-authors at the University of Maryland and UC San Diego, used that check as the only training signal for a family of models, Arctic-Text2SQL-R1, in 7B, 14B and 32B sizes.

The reward is deliberately plain: 1 when the query’s results match the reference exactly, 0.1 when the SQL at least runs, 0 otherwise. Earlier RL systems for SQL added partial credit for syntax, schema or string overlap; the authors report that finer-grained rewards led their models to chase short-term credit instead of correct answers.
Small model
Arctic-Text2SQL-R1-7B
7B (7.6B on Hugging Face) · Snowflake AI Research
Trained with online RL (GRPO) on an execution-only reward, from OmniSQL’s supervised checkpoint, with a modified OmniSQL prompt that asks for step-by-step reasoning before the SQL
- Base
- OmniSQL-7B (a full fine-tune of Qwen2.5-Coder-7B-Instruct)
Where the training data came from
Training used the public BIRD and Spider training splits plus Spider’s dev set, after dropping reference queries that return nothing or run longer than five seconds, which removed about 1,400 BIRD and 1,700 Spider examples. The team added synthetic Gretel-Synth examples whose empty tables GPT-4o filled with rows, keeping only those their best 32B model solved at least once in ten tries. Paraphrased and LLM-written extra questions were tried and did not help.
Data
Filtered BIRD and Spider data plus synthetic Gretel-Synth examples
27,785 examples: BIRD train 8,017, Spider train 6,972, Spider dev 985, Gretel-Synth-Filtered 11,811
Public BIRD and Spider splits, minus queries that return nothing or run over five seconds; Gretel-Synth schemas filled with rows written by GPT-4o
Synthetic examples kept only if a trained 32B model got at least 1 of 10 tries right. Spider dev also underlies Spider-DK, one of the six test sets.
Starting point and recipe mattered. In the authors’ 32B experiments GRPO beat PPO, online RL beat batch RL, and starting from OmniSQL’s supervised checkpoint with OmniSQL’s prompt beat starting from Qwen2.5-Coder. The final 7B starts from OmniSQL-7B, itself a full fine-tune of Qwen2.5-Coder-7B-Instruct. The paper gives the RL settings but not the learning rate or the number of steps. All experiments ran on a cluster of 64 NVIDIA H100 GPUs, and the 7B took a few hours to train.
Training
Online reinforcement learning with GRPO from the OmniSQL-7B checkpoint
Reward 1 / 0.1 / 0; 16 rollouts per question at temperature 0.8, batch 256, KL penalty 0.001, clip 0.2
- Time
- A few hours for the 7B
Not reported: cost.
Six benchmarks, one average
The 7B and the general models were scored on the same six benchmarks, 5,658 questions in all, each with a single greedy answer and no voting, schema linking or re-ranking. Averaged over the six, the 7B scored 57.2%, GPT-4o 55.9%, and GPT-4-Turbo and DeepSeek-V3 55.6% each. The 7B led GPT-4o on BIRD-dev (68.9 vs 61.9), Spider-test (88.8 vs 83.2) and Spider-DK (81.5 vs 72.9), and trailed it on Spider2.0-SQLite (15.6 vs 17.0), EHRSQL (36.7 vs 44.9) and ScienceBenchmark (51.8 vs 55.5).
Large model
GPT-4o
Size not disclosed · OpenAI
Used as released through OpenAI’s API, one greedy answer per question; five of six scores taken from the OmniSQL paper (gpt-4o-2024-11-20); prompt not given
- Base
- General model, not trained for this task
Evaluation
- Test set
- BIRD-dev, Spider-test, Spider2.0-SQLite, Spider-DK, EHRSQL and ScienceBenchmark; the headline is their plain average
- Metric
- Execution accuracy: the model’s SQL must return the same results as the reference SQL; one greedy answer per question
- Items
- 1,534 / 2,147 / 135 / 535 / 1,008 / 299 questions (5,658 in all)
- How it was compared
- Same six sets and metric for both. GPT-4o’s prompt isn’t given; five of its six scores come from OmniSQL’s temperature-0 runs, and Spider2.0-SQLite was re-run for this paper.
What to keep in mind
Most of GPT-4o’s numbers were not run for this paper: five of the six equal the OmniSQL paper’s greedy results for gpt-4o-2024-11-20, and only Spider2.0-SQLite was re-evaluated after that benchmark changed. The authors note that prompt tuning matters for a fair comparison with general models, and leave it out of scope.
Model choices were first steered by BIRD-dev and Spider-test, two of the six test sets, before the evaluation was broadened. Spider-DK’s 535 questions were drawn from Spider’s dev set, 270 of them unchanged, and Spider dev is part of this model’s training data; the paper doesn’t discuss the overlap. There are no cost, latency or energy figures. The 7B’s weights are on Hugging Face under Apache 2.0 (the 14B and 32B aren’t released), with BIRD evaluation code on GitHub; the training code isn’t released.
All the numbers
Show all numbersHide all numbersEvery model · Cost, latency and energy · 11 more results
Every model on the headline test
Cost, latency and energy, as reported
- Cost
- Not reported
- Latency
- Not reported
- Energy
- Not reported
More from the source
BIRD dev
Small model 68.9Large model 61.9 %
Table 7
Spider test
Small model 88.8Large model 83.2 %
Table 7
Spider-DK
Small model 81.5Large model 72.9 %
Table 7
Spider2.0-SQLite
Small model 15.6Large model 17 %
GPT-4o ahead.
Table 7
EHRSQL
Small model 36.7Large model 44.9 %
GPT-4o ahead.
Table 7
ScienceBenchmark
Small model 51.8Large model 55.5 %
GPT-4o ahead.
Table 7
Six-benchmark average
Small model 57.2DeepSeek-V3 (671B, MoE) 55.6 %
Table 7
Six-benchmark average
Small model 57.2GPT-4-Turbo 55.6 %
Table 7
Six-benchmark average
Arctic-Text2SQL-R1-14B 59Large model 55.9 %
Table 7
Six-benchmark average
Small model 57.2OmniSQL-7B (its starting point) 54.4 %
Table 7
BIRD test, single-model leaderboard
68.5 %
Rank 6 on the BIRD single-model leaderboard as shown in the paper (screenshot dated 22 May 2025). GPT-4o has no BIRD test score in the paper.
Table 1
Worth knowing
- Builds directly on OmniSQL (starts from its checkpoints and prompt) and GPT-4o’s figures largely match OmniSQL’s paper, so this is not independent of the OmniSQL case.
- GPT-4o is ahead on Spider2.0-SQLite (17.0 vs 15.6), EHRSQL (44.9 vs 36.7) and ScienceBenchmark (55.5 vs 51.8).
- GPT-4o wrote the rows of the synthetic training databases (Gretel-Synth).
- Vendor-run preprint; no cost, latency or energy measured.
2 more caveats
- BIRD and Spider training data are used, so BIRD-dev and Spider-test are in-distribution for the small model; model selection was initially guided by those two sets.
- The authors did not explore prompt variations for general-purpose LLMs, which they note are prompt-sensitive.
Weights on Hugging Face
- Snowflake/Arctic-Text2SQL-R1-7BArctic-Text2SQL-R1-7B
Sources
- Zhewei Yao et al. (Snowflake AI Research, UMD, UCSD), ‘Arctic-Text2SQL-R1: Simple Rewards, Strong Reasoning in Text-to-SQL’, arXiv:2505.20315 (v2, 12 Jan 2026)
- Same paper, HTML version (Table 7)
- Arctic-Text2SQL-R1-7B model card, Hugging Face
- Training code (ArcticTraining), GitHub
- arXiv v1 22 May 2025; figures here from v2 (12 Jan 2026).
