GEMMA-SQL: A Novel Text-to-SQL Model Based on Large Language Models

📅 2025-11-05
📈 Citations: 0
Influential: 0
📄 PDF

career value

182K/year
🤖 AI Summary
Existing Text-to-SQL systems rely heavily on domain-specific programming knowledge, incur high computational costs for large language model deployment, and lack compatibility with resource-constrained hardware. Method: This paper introduces GEMMA-SQL Instruct—a lightweight instruction-tuning framework built upon the open-source Gemma-2B model. It innovatively integrates iterative fine-tuning, few-shot learning, and multi-strategy prompt engineering to enhance small models’ comprehension and generation of SQL semantic structures. Contribution/Results: On the Spider benchmark, GEMMA-SQL Instruct achieves 66.8% Test-Suite accuracy and 63.3% Exact Set Match accuracy, substantially outperforming established baselines including IRNet and RYANSQL. To our knowledge, this is the first high-performance Text-to-SQL model successfully deployed efficiently on edge-device–level hardware. The framework provides a reproducible, extensible, and open-source solution for programming-free, open-domain database interaction.

Technology Category

Application Category

📝 Abstract
Text-to-SQL systems enable users to interact with structured databases using natural language, eliminating the need for specialized programming knowledge. In this work, we introduce GEMMA-SQL, a lightweight and efficient text-to-SQL model built upon the open-source Gemma 2B architecture. Unlike many large language models (LLMs), GEMMA-SQL is fine-tuned in a resource-efficient, iterative manner and can be deployed on low-cost hardware. Leveraging the SPIDER benchmark for training and evaluation, GEMMA-SQL combines multiple prompting strategies, including few-shot learning, to enhance SQL query generation accuracy. The instruction-tuned variant, GEMMA-SQL Instruct, achieves 66.8% Test-Suite accuracy and 63.3% Exact Set Match accuracy, outperforming several state-of-the-art baselines such as IRNet, RYANSQL, and CodeXDavinci. The proposed approach demonstrates that effective prompt design and targeted instruction tuning can significantly boost performance while maintaining high scalability and adaptability. These results position GEMMA-SQL as a practical, open-source alternative for robust and accessible text-to-SQL systems.
Problem

Research questions and friction points this paper is trying to address.

Develops lightweight text-to-SQL model for database interaction
Enables SQL generation without specialized programming knowledge
Optimizes model for deployment on low-cost hardware systems
Innovation

Methods, ideas, or system contributions that make the work stand out.

Lightweight model based on Gemma 2B architecture
Resource-efficient iterative fine-tuning for deployment
Combines multiple prompting strategies for accuracy