RustamHuseynov xia01ongLi commited on
Commit
958a826
·
0 Parent(s):

Duplicate from birdsql/bird23-train-filtered

Browse files

Co-authored-by: Xiaolong Li <xia01ongLi@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
+ *.model filter=lfs diff=lfs merge=lfs -text
15
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
16
+ *.npy filter=lfs diff=lfs merge=lfs -text
17
+ *.npz filter=lfs diff=lfs merge=lfs -text
18
+ *.onnx filter=lfs diff=lfs merge=lfs -text
19
+ *.ot filter=lfs diff=lfs merge=lfs -text
20
+ *.parquet filter=lfs diff=lfs merge=lfs -text
21
+ *.pb filter=lfs diff=lfs merge=lfs -text
22
+ *.pickle filter=lfs diff=lfs merge=lfs -text
23
+ *.pkl filter=lfs diff=lfs merge=lfs -text
24
+ *.pt filter=lfs diff=lfs merge=lfs -text
25
+ *.pth filter=lfs diff=lfs merge=lfs -text
26
+ *.rar filter=lfs diff=lfs merge=lfs -text
27
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
28
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar filter=lfs diff=lfs merge=lfs -text
31
+ *.tflite filter=lfs diff=lfs merge=lfs -text
32
+ *.tgz filter=lfs diff=lfs merge=lfs -text
33
+ *.wasm filter=lfs diff=lfs merge=lfs -text
34
+ *.xz filter=lfs diff=lfs merge=lfs -text
35
+ *.zip filter=lfs diff=lfs merge=lfs -text
36
+ *.zst filter=lfs diff=lfs merge=lfs -text
37
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ task_categories:
4
+ - table-question-answering
5
+ - question-answering
6
+ language:
7
+ - en
8
+ size_categories:
9
+ - 1K<n<10K
10
+ ---
11
+ # BIRD-SQL Train (Filtered)
12
+
13
+ A high-quality subset of the original BIRD train split for text-to-SQL finetuning.
14
+
15
+ ## Overview
16
+
17
+ Over the past year the community has shared many observations about data quality in BIRD. We performed a rigorous data quality check process to retain examples that are **consistent with schema** and **faithfully answer the question**. The resulting set keeps **6,601** instances out of **9,428** (≈70%), and serves as a drop-in replacement for training.
18
+
19
+ - **Original Train:** 9,428
20
+ - **Filtered Train (this release):** 6,601
21
+
22
+ The example code for training and inference can be found [here](https://github.com/bird-bench/mini_dev/tree/main)
23
+
24
+ ### For New Users
25
+ If you are new to BIRD project, you can download the complete databases for the training set using the following link:
26
+ [Download BIRD Train](https://bird-bench.oss-cn-beijing.aliyuncs.com/train.zip)
27
+
28
+ ### For Existing Users
29
+ If you have already downloaded the BIRD training databases, you can pull the latest filtered data updates through Hugging Face using the following scripts:
30
+
31
+ ```python
32
+ from datasets import load_dataset
33
+ # Load the dataset
34
+ dataset = load_dataset("birdsql/bird23-train-filtered")
35
+ # Access the dataset
36
+ print(dataset["train"][0])
37
+ ```
38
+
39
+ You can find the column meaning json file [here](https://huggingface.co/datasets/birdsql/bird23-train-filtered/resolve/main/train_column_meaning.json) the key is composed of `database_id|table_name|column_name`, and the value is key information about each column and their value summarized from raw CSVs.
40
+
41
+ ## Training Quality
42
+ We validate by finetuning a single open model with a standard SFT recipe and evaluating on the official BIRD Mini Dev and Dev set. We use the [Qwen/Qwen2.5-3B](https://huggingface.co/Qwen/Qwen2.5-3B) as the base model and follow the [Arctic-Text2SQL-R1 project ](https://www.snowflake.com/en/product/ai/ai-research/) data processing. You can find the original [repo](https://github.com/snowflakedb/ArcticTraining/tree/main/projects/arctic_text2sql_r1) and [paper](https://arxiv.org/abs/2505.20315) here.
43
+
44
+ ### Performance Comparison (EX)
45
+
46
+ | Setting | Mini-Dev | Dev |
47
+ | ------------------------- | -------- | -------- |
48
+ | **Baseline** | 26.2 | 31.88 |
49
+ | **Original Train** | 45.4 | 50.46 |
50
+ | **Filtered Train** | **46.0** | **50.0** |
51
+
52
+ Takeaway: with **~30%** fewer training items, the filtered set matches the full set on the Mini-Dev and Dev set.
53
+
54
+ ### Data scaling on the filtered set
55
+
56
+
57
+ <p align="left">
58
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/653693cb8ee17cfd44eed8ce/6_0KJzy4o1GfMDnqP3nA1.png" width="520">
59
+ </p>
60
+
61
+ ## Dataset Introduction
62
+
63
+ The dataset contains the main following resources:
64
+
65
+ - `database`: The database should be stored under the [`./train_databases/`](./train_databases/). In each database folder, it has two components:
66
+ - `database_description`: the csv files are manufactured to describe database schema and its values for models to explore or references.
67
+ - `sqlite`: The database contents in BIRD.
68
+ - `data`: Each text-to-SQL pairs with the oracle knowledge evidence is stored as a JSONL file, i.e., `train.jsonl`. It has four main parts:
69
+ - `db_id`: the names of databases
70
+ - `question`: the questions curated by human crowdsourcing according to database descriptions, database contents.
71
+ - `evidence`: the external knowledge evidence annotated by experts for assistance of models or SQL annotators.
72
+ - `SQL`: SQLs annotated by crowdsource referring to database descriptions, database contents, to answer the questions accurately.
73
+
74
+ ## Acknowledgements
75
+ This work builds on the BIRD benchmark and the efforts of its creators and contributors. We thank the community for continuous feedback that helped shape this release.
76
+
77
+
78
+
79
+ ## Citation
80
+ Please cite the repo if you think our work is helpful to you.
81
+ ```
82
+ @article{li2024can,
83
+ title={Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls},
84
+ author={Li, Jinyang and Hui, Binyuan and Qu, Ge and Yang, Jiaxi and Li, Binhua and Li, Bowen and Wang, Bailin and Qin, Bowen and Geng, Ruiying and Huo, Nan and others},
85
+ journal={Advances in Neural Information Processing Systems},
86
+ volume={36},
87
+ year={2024}
88
+ }
89
+ ```
data/train-00000-of-00001.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
train_column_meaning.json ADDED
The diff for this file is too large to render. See raw diff