Downloads · 30 days
67
29% of all-time downloads
shivenkk/sqlpup-394m-sft
sqlpup-394m-sft is a text generation model from shivenkk. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Supervised fine-tuning of a from-scratch 394M text-to-SQL decoder. 22.84% execution accuracy on BIRD dev.
Downloads · 30 days
67
29% of all-time downloads
All-time downloads
234
Public
Parameters
394M
789 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors789 MB · 100%
From the Hugging Face model README
Supervised fine-tuning of a from-scratch 394M text-to-SQL decoder. 22.84% execution accuracy on BIRD dev.
Pretrained from scratch on 9.67B tokens, then supervised fine-tuned on filtered natural-language-to-SQL pairs.
Code, configs, and the per-run artifacts behind every number here: github.com/shivenkk/sqlpup.
A 394M-parameter decoder trained from scratch for text-to-SQL: no pretrained initialisation, no distillation from a larger model. The corpus (9.67B tokens) and the 32,768-entry byte-level BPE tokenizer were built for this task.
Architecture: Llama-style, 1024 wide by 32 layers, grouped-query attention with 16 query heads and 4 key/value heads, RoPE, SwiGLU, RMSNorm, 2048-token context.
Execution accuracy on the BIRD development split, all 1534 questions:
| decoding | this model | sqlpup-394m-sft-grpo |
|---|---|---|
| greedy | 17.41% | 18.12% |
| + schema compaction | 17.86% | 19.23% |
| + compaction, 7-sample voting | 22.84% | 23.51% |
The voting rows are means over sampling seeds 0/101/202. Absolute accuracy is far from frontier systems; the point of the project was a controlled measurement of what from-scratch pretraining at this scale buys, not a leaderboard score.
The model expects the schema's CREATE TABLE statements verbatim, then the
question, then BIRD's evidence string. It emits a short comment block naming the
tables and columns it intends to use, then the SQL. Use the accompanying code so
the format and the SQL extraction match what the numbers were measured with.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("shivenkk/sqlpup-394m-sft")
tok = AutoTokenizer.from_pretrained("shivenkk/sqlpup-394m-sft")
For evaluation, prefer the project's own harness, which handles the prompt spec, over-context schema compaction, and execution-guided voting:
python -m sqlpup.cli eval predict --model-dir <dir> --examples dev.json \
--db-root dev_databases --out-dir out --compact-overflow --self-consistency 7
FineWeb-Edu, StarCoder, the Python subset of The Stack, SynSQL-2.5M, and SchemaPile, deduplicated and decontaminated against the evaluation sets.