Content area

Abstract

In supervised fine-tuning (SFT) for Text2SQL tasks, particularly for databases with numerous tables, encoding schema features requires excessive tokens, escalating GPU resource requirements during fine-tuning. To bridge this gap, we propose LR-SQL, a general dual-model SFT framework comprising a schema linking model and an SQL generation model. At the core of our framework lies the schema linking model, which is trained on a novel downstream task termed slice-based related table filtering. This task dynamically partitions a database into adjustable slices of tables and sequentially evaluates the relevance of each slice to the input query, thereby reducing token consumption per iteration. However, slicing fragments destroys database information, impairing the model’s ability to comprehend the complete database. Thus, we integrate Chain of Thought (CoT) in training, enabling the model to reconstruct the full database context from discrete slices, thereby enhancing inference fidelity. Ultimately, the SQL generation model uses the result from the schema linking model to generate the final SQL. Extensive experiments demonstrate that our proposed LR-SQL reduces total GPU memory usage by 40% compared to baseline SFT methods, with only a 2% drop in table prediction accuracy for the schema linking task and a negligible 0.6% decrease in overall Text2SQL Execution Accuracy.

Details

1009240
Title
LR-SQL: A Supervised Fine-Tuning Method for Text2SQL Tasks Under Low-Resource Scenarios
Author
Wen Wuzhenghong 1   VIAFID ORCID Logo  ; Zhang Yongpan 2 ; Pan, Su 1   VIAFID ORCID Logo  ; Sun, Yuwei 1 ; Lu Pengwei 2 ; Cheng, Ding 2 

 School of Internet of Things, Nanjing University of Posts and Telecommunications, New Model Road, Nanjing 210003, China; [email protected] (W.W.); [email protected] (Y.S.) 
 China Telecom Co., Ltd., Jiangsu Branch, Yun Jin Road, Nanjing 210019, China; [email protected] (Y.Z.); [email protected] (P.L.); [email protected] (C.D.) 
Publication title
Volume
14
Issue
17
First page
3489
Number of pages
21
Publication year
2025
Publication date
2025
Publisher
MDPI AG
Place of publication
Basel
Country of publication
Switzerland
Publication subject
e-ISSN
20799292
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Online publication date
2025-08-31
Milestone dates
2025-07-04 (Received); 2025-08-26 (Accepted)
Publication history
 
 
   First posting date
31 Aug 2025
ProQuest document ID
3249685151
Document URL
https://www.proquest.com/scholarly-journals/lr-sql-supervised-fine-tuning-method-text2sql/docview/3249685151/se-2?accountid=208611
Copyright
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Last updated
2025-11-26
Database
2 databases
  • ProQuest One Academic
  • ProQuest One Academic