MPX0222forHF/SQL-R1-7B

TEXT GENERATIONConcurrency Cost:1Model Size:7.6BQuant:FP8Ctx Length:32kPublished:May 15, 2025License:apache-2.0Architecture:Transformer0.0K Open Weights Cold

SQL-R1-7B is a 7.6 billion parameter Natural Language to SQL (NL2SQL) reasoning model developed by MPX0222, trained using reinforcement learning (RL) algorithms. It is specifically designed to enhance inference performance in complex SQL scenarios, including multi-table joins and nested queries, addressing limitations of supervised fine-tuning methods. The model achieves 88.6% execution accuracy on the Spider benchmark and 67.1% on BIRD, making it suitable for transforming natural language queries into structured SQL statements for database interaction.

Loading preview...

Overview of SQL-R1-7B

SQL-R1-7B is a 7.6 billion parameter model developed by MPX0222, specifically engineered for Natural Language to SQL (NL2SQL) tasks. Unlike traditional supervised fine-tuning (SFT) approaches, this model leverages reinforcement learning (RL) algorithms to improve its reasoning capabilities, particularly in complex database query scenarios.

Key Capabilities

  • Enhanced Reasoning for Complex SQL: Designed to handle intricate queries involving multi-table joins and nested structures, which are often challenging for SFT-based models.
  • Reinforcement Learning Training: Utilizes a specialized RL-based reward function tailored for NL2SQL tasks, addressing adaptability and interpretability issues in new environments like finance and healthcare.
  • Competitive Accuracy: Achieves an execution accuracy of 88.6% on the Spider benchmark and 67.1% on the BIRD benchmark, demonstrating strong performance in converting natural language to SQL.
  • Data Efficiency: Achieves competitive accuracy using only a small amount of synthetic NL2SQL data for augmented training, with further exploration into data engineering for RL.

When to Use SQL-R1-7B

This model is ideal for applications requiring robust and accurate conversion of natural language questions into SQL queries, especially when dealing with:

  • Databases that necessitate complex SQL constructs.
  • Scenarios where adaptability to new data schemas or domains is crucial.
  • Improving human-computer interaction with database systems through intuitive natural language interfaces.