arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.08161cs.CLcs.CV
收藏

SQuaD-SQL:通过大语言模型引导的知识蒸馏,利用小语言模型实现高效的文本到SQL转换

SQuaD-SQL: Efficient Text-to-SQL with Small Language Models via LLM-Guided Knowledge Distillation

The University of Liverpool(利物浦大学);University of Macau(澳门大学);University of Chinese Academy of Sciences(中国科学院大学);Tsinghua University(清华大学);Microsoft(微软);Shanghai University of International Business and Economics(上海国际经贸管理大学);Huizhou University(惠州市大学)

Wangyu Wu, Xiaojian Lin, Rong Fu, Zaiyang Yu, Xuhang Chen, Wenjun Yu, Zhenhong Chen

AI总结:

研究如何让小语言模型在文本到SQL任务中接近大语言模型性能。核心方法是通过知识蒸馏和合成数据生成,包含基于大语言模型的合成数据生成、参数高效微调和领域自适应微调三个关键组件。主要贡献是在WikiSQL数据集上执行准确率达86.9%,推理更快、内存使用更低。

摘要:

文本到SQL是自然语言处理中的一项基础任务,能让用户用自然语言与结构化数据库交互。大语言模型虽在此任务中表现出色,但计算需求大阻碍了在资源受限环境中的部署。本文介绍了SQuaD-SQL,一种让小语言模型在文本到SQL任务中接近大语言模型性能,同时通过知识蒸馏和合成数据生成显著提高效率的新方法。该方法包含基于大语言模型的合成数据生成、参数高效微调、领域自适应微调三个关键组件。在WikiSQL数据集上的实验表明,SQuaD-SQL在测试集上执行准确率达86.9%,接近大语言模型性能,且推理更快、内存使用更低。结果表明,通过适当训练策略,小语言模型可成为资源受限环境中实用高效的文本到SQL应用替代方案。

英文摘要:

Text-to-SQL is a fundamental task in natural language processing that enables users to interact with structured databases using natural language. While large language models (LLMs) have demonstrated remarkable performance on this task, their substantial computational requirements hinder deployment in resource-constrained settings. In this paper, we introduce SQuaD-SQL (Small-Qualified and Distilled for SQL), a novel approach that empowers small language models (SLMs) to approach the performance of LLMs on the Text-to-SQL task while significantly improving efficiency through knowledge distillation and synthetic data generation. Our method comprises three key components: (1) LLM-based synthetic data generation, where structured knowledge is extracted from LLMs via carefully designed prompting strategies; (2) parameter-efficient fine-tuning, enabling full model training on a single consumer-grade GPU; and (3) domain-adaptive fine-tuning, where domain-specific synthetic data further enhances performance in targeted domains. Experiments on the WikiSQL dataset demonstrate that SQuaD-SQL achieves an execution accuracy of 86.9% on the test set, approaching the performance of LLMs while offering faster inference and lower memory usage. These results suggest that, with proper training strategies, SLMs can serve as practical and efficient alternatives for Text-to-SQL applications in resource-limited environments.

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

↑