Feather-SQL: A Lightweight NL2SQL Framework with Dual-Model Collaboration Paradigm for Small Language Models

Wenqi Pei, Hailing Xu, Hengyuan Zhao, Shizheng Hou, Han Chen, Zining Zhang, Pingyi Luo, Bingsheng He · 2025

Read Feather-SQL: A Lightweight NL2SQL Framework with Dual-Model Collaboration Paradigm for Small Language Models by Wenqi Pei, Hailing Xu, Hengyuan Zhao, Shizheng Hou, Han Chen, Zining Zhang, Pingyi Luo, Bingsheng He (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-17811.txt.

Introduction

Wenqi Pei and co-authors present a light framework in 2025 that lets small language models turn plain questions into database queries. Big models do this task well, but they are often closed, costly, and a risk for private data. Small models that a team can run itself tend to fail at the task and do not fit frames built for big ones.

Their framework first prunes the database layout to the parts a question needs, and links words in the question to those parts. It then drafts several query paths and several candidate queries. A pairing scheme joins a small model with a second one, so the two cover each other's weak spots. The aim is queries that run and give the right answer, from models cheap enough to keep in house.

Catalog record

CREATORWenqi Pei, Hailing Xu, Hengyuan Zhao, Shizheng Hou, Han Chen, Zining Zhang, Pingyi Luo, Bingsheng He
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE45 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-17811

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Feather-SQL: A Lightweight NL2SQL Framework with Dual-Model Collaboration Paradigm for Small Language Models Wenqi Pei, Hailing Xu, Hengyuan Zhao, Shizheng Hou, Han Chen, Zining Zhang, Pingyi Luo, Bingsheng He Abstract Natural Language to SQL (NL2SQL) has seen significant advancements with large language models (LLMs). However, these models often depend on closed-source systems and high computational resources, posing challenges in data privacy and deployment. In contrast, small language models (SLMs) struggle with NL2SQL tasks, exhibiting poor performance and incompatibility with existing frameworks. To address these issues, we introduce Feather-SQL , a new lightweight framework tailored for SLMs. Feather-SQL improves SQL executability and accuracy through 1) schema pruning and linking, 2) multi-path and multi-candidate generation. Additionally, we introduce the 1+1 Model Collaboration Paradigm , which pairs a strong general-purpose chat model with a fine-tuned SQL specialist, combining strong analytical reasoning with high-precision SQL generation. Experimental results on BIRD demonstrate that Feather-SQL improves NL2SQL performance on SLMs, with around 10% boost for models without fine-tuning. The proposed paradigm raises the accuracy ceiling of SLMs to 54.76%, highlighting its effectiveness. 1 Introduction Figure 1 : NL2SQL performance on the BIRD DEV dataset. EXE (Executability) measures successful query executions, while ACC (Accuracy) measures correct result matches. Natural Language to SQL (NL2SQL) is the task of converting natural language questions into corresponding SQL queries, allowing users to retrieve structured data from databases without requiring proficiency in SQL language. In recent years, the field has seen significant advancements with the emergence of large language models (LLMs) such as GPT-4 ( OpenAI et al., 2024 ) , enabling frameworks like CHASE-SQL ( Pourreza et al., 2024 ) and XiYan-SQL ( Gao et al., 2025b ) to achieve state-of-the-art (SOTA) performance. However, two limitations hinder their practical adoption. First, mainstream methods depend on closed-source models, and their reliance on external APIs introduces data privacy risks in sensitive domains like healthcare and finance ( Liu et al., 2024 ) . Second, most open-source research focuses on models with 7B–30B parameters, leaving small language models (SLMs) with 4B or fewer parameters relatively underexplored. Meanwhile, many relational databases are deployed on high-performance systems with limited GPU resources. With efficient inference frameworks (e.g., Intel IPEX-LLM ( Intel, 2024 ) ) or quantization techniques, SLMs can help drive the broader adoption of NL2SQL in real-world scenarios while preserving data privacy. Figure 2 : Examples of typical syntax errors produced by small language models (SLMs) in an NL2SQL scenario. In this paper, we focus on enhancing NL2SQL performance using SLMs. As shown in Figure 1 , SLMs face two key challenges: (1) one critical issue is their sharp decline in executability . Unlike LLMs, which can effectively handle long-context dependencies, SLMs struggle with complex database schema and verbose prompts, often leading to confusion or hallucinated outputs ( Nguyen et al., 2024 ; Qu et al., 2024 ) (Figure 2 ); (2) existing frameworks for NL2SQL tasks with LLMs are incompatible with SLMs , as they rely on strong instruction-following capabilities to produce intermediate results, which SLMs lack. As illustrated in Figure 3 , SLM outputs frequently violate imposed requirements: they often fail to conform to JSON or array specifications and do not meet predefined constraints. Directly applying these frameworks to SLMs may further degrade executability. Figure 3 : Experiments conducted on a CHESS-provided BIRD subset for schema linking. Models are required to output a JSON-formatted response containing no more than five relevant columns related to the question, without generating any extraneous content. To address these challenges, we propose Feather-SQL , a lightweight framework tailored for SLMs to enhance both executability and accuracy in NL2SQL tasks. Feather-SQL consists of six key components: schema pruning, schema linking, multi-path generation, multi-candidate generation, correction, and selection. Designed specifically for SLMs, schema pruning streamlines input processing by discarding irrelevant tables, allowing models to concentrate on essential database elements. Schema linking improves alignment between questions and database schema, ensuring accurate column selection. To mitigate errors from linking and pruning, multi-path generation explores diverse query formulation strategies, enhancing robustness. Multi-candidate generation further improves the model’s executability and accuracy by enhancing the variety of generated SQL queries, thereby increasing the likelihood of producing correct candidates. The best candidate is then selected through execution validation and ranking. Complementing these components, we introduce extraction and simplification prompting strategies. Extraction selectively retrieves key information, while simplification removes extraneous prompt details to lower computational overhead. By integrating these techniques, Feather-SQL enables SLMs to generate SQL queries more reliably despite their inherent limitations. A common approach to enhancing SLMs is fine-tuning. However, while fine-tuned SLMs for SQL generation tasks (e.g., Prem-SQL ( Anindyadeep, 2024 ) , CodeS ( Li et al., 2024 ) ) outperform general-purpose chat models on core NL2SQL tasks, they suffer from catastrophic forgetting ( Luo et al., 2025 ; Kotha et al., 2024 ) on auxiliary tasks—where task-specific fine-tuning erodes their foundational reasoning abilities. To counter this, we propose 1+1 Model Collaboration Paradigm , in which a general-purpose chat model handles reasoning-intensive auxiliary tasks (e.g., schema linking and candidate selection), while a fine-tuned SQL specialist focuses on query generation. This collaboration leverages both models’ strengths: the general model provides broad reasoning ability, while the specialist delivers domain-specific precision. Experiments confirm that the paradigm improves overall performance. Our main contributions are as follows: • We introduce Feather-SQL, an NL2SQL framework for SLMs to address their unique challenges of low executability and incompatibility with existing LLM-based frameworks. • We propose a novel 1+1 Model Collaboration paradigm that mitigates catastrophic forgetting in fine-tuned SLMs by delegating reasoning-intensive tasks to a general-purpose chat model. • Extensive experiments on the Spider and BIRD datasets demonstrate that Feather-SQL consistently achieves strong performance with various SLMs, and when paired with the paradigm, it yields SOTA results on BIRD within the scope of SLMs. 2 Related Work 2.1 Conventional Methods Early NL2SQL systems were rule- or template-based ( Zelle & Mooney, 1996 ; Li & Jagadish, 2014 ; Saha et al., 2016 ) . Although effective on small, curated datasets, these approaches demanded extensive manual engineering and did not generalise well. The arrival of sequence-to-sequence (Seq2Seq) neural models marked a shift to data-driven methods. Models such as Seq2SQL ( Zhong et al., 2017 ) , SQLNet ( Xu & et al., 2017 ) , IRNet ( Jha et al., 2019 ) , RyanSQL ( Choi et al., 2021 ) , and RESDSQL ( Li et al., 2023a ) jointly encode the natural-language question and database schema before decoding the corresponding SQL query. Fine-tuning pretrained language models (PLMs)—for example, BERT ( Devlin et al., 2019 ) and T5 ( Raffel et al., 2023 ) , as used in Graphix-T5 ( Li & et al., 2023 ) —further improves robustness, yet still requires substantial annotated data and struggles with highly complex schemas. 2.2 LLM and SLM Approaches Instruction-tuned large language models (LLMs) now achieve state-of-the-art performance by decomposing NL2SQL into subtasks. Systems such as DIN-SQL ( Pourreza & Rafiei, 2023 ) , TASQL ( Qu et al., 2024 ) , MAC-SQL ( Wang et al., 2024 ) , and CHESS ( Talaei et al., 2024 ) exceed earlier accuracy, but their multi-stage prompting incurs significant computation, and potential privacy risks when queries leave the

Read the complete text