arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.17811cs.CLcs.AIcs.DB
收藏

Feather-SQL:面向小语言模型的双模型协作范式轻量级NL2SQL框架

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

National University of Singapore(新加坡国立大学);Paradigm(第四范式)

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

AI总结:

Feather-SQL通过模式剪枝、多路径生成和1+1双模型协作范式,在BIRD上将小语言模型的NL2SQL准确率上限提升至54.76%。

摘要:

自然语言转SQL(NL2SQL)在大语言模型(LLMs)的推动下取得了显著进展。然而,这些模型通常依赖闭源系统和高计算资源,在数据隐私和部署方面带来挑战。相比之下,小语言模型(SLMs)在NL2SQL任务上表现不佳,且与现有框架不兼容。为解决这些问题,我们提出了Feather-SQL,一个专为SLMs量身定制的新型轻量级框架。Feather-SQL通过1)模式剪枝与链接、2)多路径与多候选生成来提升SQL的可执行性和准确性。此外,我们引入了1+1模型协作范式,将强大的通用对话模型与微调后的SQL专家模型配对,结合了强大的分析推理能力与高精度的SQL生成能力。在BIRD上的实验结果表明,Feather-SQL提升了SLMs在NL2SQL上的性能,对未微调模型约有10%的提升。所提出的范式将SLMs的准确率上限提高到54.76%,凸显了其有效性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑