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(惠州市大学)
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.
Exploring the Limits of Model Compression in LLMs: A Knowledge Distillation Study on QA Tasks
Fraunhofer Institute for Intelligent Analysis and Information Systems(弗劳恩霍夫智能分析与信息系统研究所);University of Southern Denmark(南丹麦大学);Fraunhofer Institute for Applied Information Technology(弗劳恩霍夫应用信息科技研究所);University Hospital of Cologne(科隆大学医院)
ZAS-SQL: Distilling Rules from Failures for Zero-Shot Text-to-SQL
Shanghai Research Institute for Intelligent Autonomous Systems, Tongji University(同济大学上海自主智能无人系统科学中心);College of Architecture and Urban Planning, Tongji University(同济大学建筑与城市规划学院);Behavioral and Spatial AI Lab, Peking University & Tongji University(北京大学与同济大学行为与空间人工智能实验室)
Distilling Knowledge from Pre-trained Language Models via Text Smoothing
Baidu Inc.(百度公司)
本文研究压缩预训练的语言模型,如BERT(Devlin et al.,2019),通过师生知识蒸馏。以前的工作通常迫使学生模型严格模仿教师BERT预测的平滑标签。作为替代方案,我们提出了一种新的BERT蒸馏方法,即,要求教师生成平滑的词ID而不是标签,用于在知识蒸馏中教授学生模型。我们称这种方法为文本平滑。实际上,我们使用BERT中的掩蔽语言模型(MLM)的softmax预测来生成给定文本的单词分布,并使用预测的软单词id来平滑这些输入文本。我们假设平滑后的标签和文本都可以隐式地扩充输入语料库,而文本平滑由于可以在一个神经网络前向步骤中生成更多的实例,因此直观上更有效,在GLUE和SQuAD上的实验结果表明,与现有的BERT提取方法相比,我们的解决方案可以获得有竞争力的结果。