nielsr HF Staff commited on
Commit
4cc51dc
Β·
verified Β·
1 Parent(s): 81c4c06

Add pipeline_tag and library_name to model card

Browse files

This PR enhances the model card for `SQL-R1` by adding `pipeline_tag: text-generation` and `library_name: transformers` to the YAML metadata.

- The `pipeline_tag: text-generation` is added to accurately classify the model's functionality as Natural Language to SQL generation, improving its discoverability on the Hugging Face Hub.
- The `library_name: transformers` is included based on evidence from `config.json` and `tokenizer_config.json` (e.g., `Qwen2ForCausalLM`, `Qwen2Tokenizer`, `transformers_version`), ensuring compatibility with the Transformers library and enabling the automated "How to use" widget on the Hub.

The existing `license: apache-2.0` tag has been retained. No sample usage snippet was added as none was found directly in the GitHub README, adhering to documentation guidelines. The existing content, including the GitHub badge link, remains unchanged.

Files changed (1) hide show
  1. README.md +3 -1
README.md CHANGED
@@ -1,5 +1,7 @@
1
  ---
2
  license: apache-2.0
 
 
3
  ---
4
 
5
  <div align="center">
@@ -35,7 +37,7 @@ license: apache-2.0
35
 
36
  ## πŸ“– Overview
37
 
38
- Natural Language to SQL (NL2SQL) enables intuitive interactions with databases by transforming natural language queries into structured SQL statements. Despite recent advancements in enhancing human-computer interaction within database applications, significant challenges persist, particularly regarding the inference performance in complex scenarios involving multi-table joins and nested queries. Current methodologies primarily utilize supervised fine-tuning (SFT) to train the NL2SQL model, which may limit adaptability and interpretability in new environments (e.g., finance and healthcare). In order to enhance the reasoning performance of the NL2SQL model in the above complex situations, we introduce SQL-R1, a novel NL2SQL reasoning model trained by the reinforcement learning (RL) algorithms. We design a specialized RL-based reward function tailored for NL2SQL tasks and discussed the impact of cold start on the effectiveness of intensive training. In addition, we achieve competitive accuracy using only a tiny amount of synthetic NL2SQL data for augmented training and further explore data engineering for RL. In existing experiments, SQL-R1 achieves execution accuracy of 88.6\% and 67.1\% on the benchmark Spider and BIRD, respectively.
39
 
40
  ## πŸ“š Citations
41
 
 
1
  ---
2
  license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
  ---
6
 
7
  <div align="center">
 
37
 
38
  ## πŸ“– Overview
39
 
40
+ Natural Language to SQL (NL2SQL) enables intuitive interactions with databases by transforming natural language queries into structured SQL statements. Despite recent advancements in enhancing human-computer interaction within database applications, significant challenges persist, particularly regarding the inference performance in complex scenarios involving multi-table joins and nested queries. Current methodologies primarily utilize supervised fine-tuning (SFT) to train the NL2SQL model, which may limit adaptability and interpretability in new environments (e.g., finance and healthcare). In order to enhance the reasoning performance of the NL2SQL model in the above complex situations, we introduce SQL-R1, a novel NL2SQL reasoning model trained by the reinforcement learning (RL) algorithms. We design a specialized RL-based reward function tailored for NL2SQL tasks and discussed the impact of cold start and synthetic data on the effectiveness of intensive training. In addition, we achieve competitive accuracy using only a tiny amount of synthetic NL2SQL data for augmented training and further explore data engineering for RL. In existing experiments, SQL-R1 achieves execution accuracy of 88.6\% and 67.1\% on the benchmark Spider and BIRD, respectively.
41
 
42
  ## πŸ“š Citations
43