XGenerationLab commited on
Commit
60ec22d
·
verified ·
1 Parent(s): 16ee2fc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -31
README.md CHANGED
@@ -1,28 +1,36 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
3
  ---
4
- ### Important Links
5
 
 
6
  📖[Github](https://github.com/XGenerationLab/XiYanSQL-QwenCoder) |
7
  🤖[ModelScope](https://modelscope.cn/collections/XiYanSQL-Models-4483337b614241) |
8
  🌐[XiYan-SQL](https://github.com/XGenerationLab/XiYan-SQL) |
9
  🌕[析言GBI](https://bailian.console.aliyun.com/xiyan) |
10
- 💻[ModelScope Space](https://www.modelscope.cn/studios/XGenerationLab/XiYanSQL-QwenCoder-32B)
11
 
12
 
13
  ## Introduction
14
- We are excited to update our new XiYanSQL-QwenCoder series model, demonstrating improvements over its predecessor in some key features.
15
- - The new XiYanSQL-QwenCoder model applies the merits of GRPO training strategy without thinking process, maintaining high efficiency and accuracy in SQL generation.
16
- - The new XiYanSQL-QwenCoder model keeps its great performance in various benchmarks, including BIRD, Spider and DW benchmarks which will be released in the future.
17
- - The new XiYanSQL-QwenCoder model demonstrates better generalization than its predecessor, especially in different dialects and out-of-domain datasets.
18
 
 
19
 
20
  ## Model Downloads
21
 
22
 
23
  | **Model** | **Download Latest** |
24
  |-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 
25
  |XiYanSQL-QwenCoder-7B | 🤗[HuggingFace](https://huggingface.co/XGenerationLab/XiYanSQL-QwenCoder-7B-2504) 🤖[Modelscope](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-7B-2504) |
 
26
  |XiYanSQL-QwenCoder-32B | 🤗[HuggingFace](https://huggingface.co/XGenerationLab/XiYanSQL-QwenCoder-32B-2504) 🤖[Modelscope](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-32B-2504) |
27
 
28
 
@@ -30,34 +38,41 @@ We are excited to update our new XiYanSQL-QwenCoder series model, demonstrating
30
  ## Performance
31
  The XiYanSQL-QwenCoder models, as multi-dialect SQL base models, demonstrating robust SQL generation capabilities. The following presents the evaluation results at the time of release. We conducted a comprehensive evaluation of the model's performance under two schema formats, M-Schema, and original DDL, using the BIRD and Spider as SQLite benchmarks in the Text-to-SQL domain, as well as DW benchmarks for PostgreSQL and MySQL dialects.
32
 
33
- | Model name | Size | BIRD Dev@M-Schema | BIRD Dev@DDL | Spider Test@M-Schema | Spider Test@DDL | DW PostgreSQL@M-Schema | DW MySQL@M-Schema |
34
- |------------------------------|:------:|:-----------------:|:------------:|:--------------------:|:---------------:|:----------------------:|:-----------------:|
35
- | GPT-4o-0806 | UNK | 58.47% | 54.82% | 82.89% | 78.45% | 46.79% | 57.77% |
36
- | GPT-4.1-0414 | UNK | 59.39% | 54.11% | 84.45% | 79.86% | 54.29% | 63.18% |
37
- | Claude3.5-sonnet-1022 | UNK | 53.32% | 50.46% | 76.27% | 73.04% | 55.22% | 52.84% |
38
- | Claude3.7-sonnet | UNK | 54.82% | 49.22% | 78.04% | 74.66% | 53.23% | 54.61% |
39
- | Gemini-1.5-Pro | UNK | 61.34% | 57.89% | 85.11% | 84.00% | 52.78% | 62.78% |
40
- | Gemini-2.5-Pro | UNK | 67.21% | 63.43% | 88.29% | 86.27% | 63.16% | 65.37% |
41
- | DeepSeek-V2.5-1210 | 236B | 55.74% | 55.61% | 82.08% | 80.57% | 45.74% | 52.18% |
42
- | DeepSeek-V3 | 685B | 59.58% | 56.71% | 81.52% | 79.91% | 52.56% | 55.95% |
43
- | DeepSeek-R1 | 685B | 58.15% | 55.61% | 80.72% | 78.85% | 60.56% | xx% |
44
- | DeepSeek-R1-Distill-Qwen-32B | 32B | 50.65% | 48.31% | 78.65% | 77.33% | 37.22% | 44.72% |
45
- | Deepseek-Coder-33B-Instruct | 33B | 47.52% | 44.72% | 72.39% | xx% | 31.48% | 36.17% |
46
- | OmniSQL-32B | 32B | 60.37% | 55.87% | 85.16% | 83.19% | 38.19% | 42.34% |
47
- | XiYanSQL-QwenCoder-32B-2412 | 32B | 67.07% | 63.04% | 88.39% | 85.46% | 45.07% | 52.84% |
48
- | XiYanSQL-QwenCoder-32B-2504 | 32B | 67.14% | 62.26% | 89.20% | 86.17% | 53.52% | 57.74% |
49
-
50
-
51
- ## Requirements
52
-
53
- transformers >= 4.37.0
54
- vllm >= 0.7.2
 
 
55
 
56
  ## Quickstart with Transformers and vLLM
57
 
58
  Here is a simple code snippet for quickly using **XiYanSQL-QwenCoder** model. We provide a Chinese version of the prompt, and you just need to replace the placeholders for "question," "db_schema," and "evidence" to get started. We recommend using our [M-Schema](https://github.com/XGenerationLab/M-Schema) format for the schema; other formats such as DDL are also acceptable, but they may affect performance.
59
  Currently, we mainly support mainstream dialects like SQLite, PostgreSQL, and MySQL.
60
 
 
 
 
 
 
61
  ### Prompt Template
62
  ```python
63
  nl2sqlite_template_cn = """你是一名{dialect}专家,现在需要阅读并理解下面的【数据库schema】描述,以及可能用到的【参考信息】,并运用{dialect}知识生成sql语句回答【用户问题】。
@@ -82,7 +97,7 @@ nl2sqlite_template_cn = """你是一名{dialect}专家,现在需要阅读并
82
  import torch
83
  from transformers import AutoModelForCausalLM, AutoTokenizer
84
 
85
- model_name = "XGenerationLab/XiYanSQL-QwenCoder-32B-2502"
86
  model = AutoModelForCausalLM.from_pretrained(
87
  model_name,
88
  torch_dtype=torch.bfloat16,
@@ -121,13 +136,13 @@ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
121
  ```python
122
  from vllm import LLM, SamplingParams
123
  from transformers import AutoTokenizer
124
- model_path = "XGenerationLab/XiYanSQL-QwenCoder-32B-2502"
125
  llm = LLM(model=model_path, tensor_parallel_size=8)
126
  tokenizer = AutoTokenizer.from_pretrained(model_path)
127
  sampling_params = SamplingParams(
128
  n=1,
129
  temperature=0.1,
130
- max_tokens=2048
131
  )
132
 
133
  ## dialects -> ['SQLite', 'PostgreSQL', 'MySQL']
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
+ - zh
6
+ base_model:
7
+ - XGenerationLab/XiYanSQL-QwenCoder-32B-2412
8
  ---
 
9
 
10
+ ### Important Links
11
  📖[Github](https://github.com/XGenerationLab/XiYanSQL-QwenCoder) |
12
  🤖[ModelScope](https://modelscope.cn/collections/XiYanSQL-Models-4483337b614241) |
13
  🌐[XiYan-SQL](https://github.com/XGenerationLab/XiYan-SQL) |
14
  🌕[析言GBI](https://bailian.console.aliyun.com/xiyan) |
15
+ 💻[Modelscope Space](https://www.modelscope.cn/studios/XGenerationLab/XiYanSQL-QwenCoder-32B)
16
 
17
 
18
  ## Introduction
19
+ We are excited to release the **XiYanSQL-QwenCoder-2504** version, our latest SQL generation model. This version continues to optimize upon the previous version, delivering enhanced performance.
20
+ - Our model incorporates important explorations combining **fine-tuning and GRPO training**, leveraging the post-training strategies of GRPO without a thinking process, achieving both efficiency and accuracy in SQL generation.
21
+ - It demonstrates **impressive performance** and supports **multiple dialects**, ready to use out of the box.
22
+ - Improved generalization capabilities, excelling on different dialects and **out-of-domain datasets**.
23
 
24
+ In this evaluation, we have also added **a real-world SQL benchmark (the DW test set)**, which serves as an important internal evaluation baseline. This test set includes thousands of complex queries from real scenarios in both PostgreSQL and MySQL dialects, effectively reflecting the model's performance across multiple dialects and out-of-domain data.
25
 
26
  ## Model Downloads
27
 
28
 
29
  | **Model** | **Download Latest** |
30
  |-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
31
+ |XiYanSQL-QwenCoder-3B | 🤗[HuggingFace](https://huggingface.co/XGenerationLab/XiYanSQL-QwenCoder-3B-2504) 🤖[Modelscope](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-3B-2504) |
32
  |XiYanSQL-QwenCoder-7B | 🤗[HuggingFace](https://huggingface.co/XGenerationLab/XiYanSQL-QwenCoder-7B-2504) 🤖[Modelscope](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-7B-2504) |
33
+ |XiYanSQL-QwenCoder-14B | 🤗[HuggingFace](https://huggingface.co/XGenerationLab/XiYanSQL-QwenCoder-14B-2504) 🤖[Modelscope](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-14B-2504) |
34
  |XiYanSQL-QwenCoder-32B | 🤗[HuggingFace](https://huggingface.co/XGenerationLab/XiYanSQL-QwenCoder-32B-2504) 🤖[Modelscope](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-32B-2504) |
35
 
36
 
 
38
  ## Performance
39
  The XiYanSQL-QwenCoder models, as multi-dialect SQL base models, demonstrating robust SQL generation capabilities. The following presents the evaluation results at the time of release. We conducted a comprehensive evaluation of the model's performance under two schema formats, M-Schema, and original DDL, using the BIRD and Spider as SQLite benchmarks in the Text-to-SQL domain, as well as DW benchmarks for PostgreSQL and MySQL dialects.
40
 
41
+ | Model name | Size | BIRD Dev@M-Schema | BIRD Dev@DDL | Spider Test@M-Schema | Spider Test@DDL | DW PostgreSQL@M-Schema | DW MySQL@M-Schema |
42
+ |------------------------------|:----:|:-----------------:|:------------:|:--------------------:|:---------------:|:----------------------:|:-----------------:|
43
+ | GPT-4o-0806 | UNK | 58.47% | 54.82% | 82.89% | 78.45% | 46.79% | 57.77% |
44
+ | GPT-4.1-0414 | UNK | 59.39% | 54.11% | 84.45% | 79.86% | 54.29% | 63.18% |
45
+ | Claude3.5-sonnet-1022 | UNK | 53.32% | 50.46% | 76.27% | 73.04% | 55.22% | 52.84% |
46
+ | Claude3.7-sonnet | UNK | 54.82% | 49.22% | 78.04% | 74.66% | 53.23% | 54.61% |
47
+ | Gemini-1.5-Pro | UNK | 61.34% | 57.89% | 85.11% | 84.00% | 52.78% | 62.78% |
48
+ | DeepSeek-V2.5-1210 | 236B | 55.74% | 55.61% | 82.08% | 80.57% | 45.74% | 52.18% |
49
+ | DeepSeek-V3 | 685B | 59.58% | 56.71% | 81.52% | 79.91% | 52.56% | 55.95% |
50
+ | DeepSeek-R1 | 685B | 58.15% | 55.61% | 80.72% | 78.85% | 60.56% | 62.00% |
51
+ | DeepSeek-R1-Distill-Qwen-32B | 32B | 50.65% | 48.31% | 78.65% | 77.33% | 37.22% | 44.72% |
52
+ | Deepseek-Coder-33B-Instruct | 33B | 47.52% | 44.72% | 72.39% | 62.0% | 31.48% | 36.17% |
53
+ | OmniSQL-32B | 32B | 60.37% | 55.87% | 85.16% | 83.19% | 38.19% | 42.34% |
54
+ | XiYanSQL-QwenCoder-3B-2502 | 3B | 53.52% | 52.54% | 83.34% | 79.10% | 34.75% | 35.62% |
55
+ | XiYanSQL-QwenCoder-3B-2504 | 3B | 55.08% | 52.09% | 84.10% | 80.57% | 36.65% | 37.63% |
56
+ | XiYanSQL-QwenCoder-7B-2502 | 7B | 59.65% | 56.32% | 84.15% | 80.01% | 39.38% | 42.10% |
57
+ | XiYanSQL-QwenCoder-7B-2504 | 7B | 62.13% | 57.43% | 85.97% | 82.48% | 42.08% | 44.67% |
58
+ | XiYanSQL-QwenCoder-14B-2502 | 14B | 63.23% | 60.10% | 85.31% | 82.84% | 38.51% | 41.62% |
59
+ | XiYanSQL-QwenCoder-14B-2504 | 14B | 65.32% | 60.17% | 86.82% | 83.75% | 40.52% | 44.60% |
60
+ | XiYanSQL-QwenCoder-32B-2412 | 32B | 67.07% | 63.04% | 88.39% | 85.46% | 45.07% | 52.84% |
61
+ | XiYanSQL-QwenCoder-32B-2504 | 32B | 67.14% | 62.26% | 89.20% | 86.17% | 53.52% | 57.74% |
62
+
63
+
64
+
65
 
66
  ## Quickstart with Transformers and vLLM
67
 
68
  Here is a simple code snippet for quickly using **XiYanSQL-QwenCoder** model. We provide a Chinese version of the prompt, and you just need to replace the placeholders for "question," "db_schema," and "evidence" to get started. We recommend using our [M-Schema](https://github.com/XGenerationLab/M-Schema) format for the schema; other formats such as DDL are also acceptable, but they may affect performance.
69
  Currently, we mainly support mainstream dialects like SQLite, PostgreSQL, and MySQL.
70
 
71
+ ### Requirements
72
+ - transformers >= 4.37.0
73
+ - vllm >= 0.7.2
74
+
75
+
76
  ### Prompt Template
77
  ```python
78
  nl2sqlite_template_cn = """你是一名{dialect}专家,现在需要阅读并理解下面的【数据库schema】描述,以及可能用到的【参考信息】,并运用{dialect}知识生成sql语句回答【用户问题】。
 
97
  import torch
98
  from transformers import AutoModelForCausalLM, AutoTokenizer
99
 
100
+ model_name = "XGenerationLab/XiYanSQL-QwenCoder-32B-2504"
101
  model = AutoModelForCausalLM.from_pretrained(
102
  model_name,
103
  torch_dtype=torch.bfloat16,
 
136
  ```python
137
  from vllm import LLM, SamplingParams
138
  from transformers import AutoTokenizer
139
+ model_path = "XGenerationLab/XiYanSQL-QwenCoder-32B-2504"
140
  llm = LLM(model=model_path, tensor_parallel_size=8)
141
  tokenizer = AutoTokenizer.from_pretrained(model_path)
142
  sampling_params = SamplingParams(
143
  n=1,
144
  temperature=0.1,
145
+ max_tokens=1024
146
  )
147
 
148
  ## dialects -> ['SQLite', 'PostgreSQL', 'MySQL']