CoolFace
Modelpublic

while-ai/text-to-sql-shop-sft-think

sourceHugging Faceapache-2.0updated 2d agoView on Hugging Face
0likes25downloads
Model Card

text-to-sql-shop-sft-think

<!-- while-ai: where this fits --> Recipe: [recipes/04-train/text-to-sql](https://github.com/whilehq/whileai-sdk/tree/main/recipes/04-train/text-to-sql) · Collection: [Analyst](https://huggingface.co/collections/while-ai/analyst-6aada4c396dfe31da497862d)

One rung of the text-to-SQL hill climb on Qwen3-4B, thinking on, graded by executing the query. Round sft-think starts from base: self-distillation: 199 verified traces, hosted SFT 2 epochs. The eval rows for this round are the eval-sft-think config of the text-to-sql-shop dataset.

Where it sits in the climb

81 held-out tasks, 4 samples each, temperature 0.7. The row in bold is this adapter.

RoundFromMethodpass@1 (95% CI)pass^4has_sql
r1baseGRPO 100 steps, lr 2e-5, beta 0.04, HF generate0.58 (0.52..0.64)0.290.89
r2r1GRPO 200 steps, lr 5e-5, beta 0.010.60 (0.54..0.67)0.340.90
sft-thinkbaseself-distillation: 199 verified traces, hosted SFT 2 epochs0.60 (0.54..0.67)0.390.96
r3r2GRPO 1,000 steps, lr 2e-5, beta 0.01, vLLM generation, 8 prompts per generate0.61 (0.56..0.67)0.290.86
r4r3GRPO 1,000 more steps, same settings0.61 (0.54..0.67)0.320.85

Rounds r1 to r4 are within each other's intervals: two thousand GRPO steps did not move pass@1 on this holdout. The move came in r5, from a re-cut prompt band and masked truncation, and is the text-to-sql-shop-r5 repo. The recipe README explains what each round changed and why.

Arms in this repo

The root holds the arm the recipe README's headline number reports. Every other arm is a subfolder named after it. checkpoints/ never ships.

folderarm
.round sft-think adapter

Load

python
from peft import PeftModel
from transformers import AutoModelForCausalLM

base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B")
model = PeftModel.from_pretrained(base, "while-ai/text-to-sql-shop-sft-think")  # the headline arm

Reproduce

bash
git clone https://github.com/whilehq/whileai-sdk && cd whileai-sdk/recipes/04-train/text-to-sql
modal run train_grpo_modal.py --run-name t2s-r1

The recipe README pins the seed, the library versions and the GPU, and its Checks table says what the eval verified. Read the Learned section before quoting a number from this card.