Blar-SQL: Faster, Stronger, Smaller NL2SQL
Jos\'e Manuel Dom\'inguez, Benjam\'in Err\'azuriz, Patricio Daher

TL;DR
Blar-SQL introduces a task decomposition approach with fine-tuned open-source models and schema chunking, achieving high accuracy in NL2SQL tasks while being significantly smaller, faster, and cheaper than GPT-4.
Contribution
The paper presents a novel framework combining task decomposition, model fine-tuning, and schema chunking to improve NL2SQL performance with open-source models.
Findings
Comparable accuracy to GPT-4
135 times smaller model size
90 times faster and over 100 times cheaper
Abstract
Large Language Models (LLMs) have gained considerable notoriety in the field of natural language to SQL tasks (NL2SQL). In this study, we show how task decomposition can greatly benefit LLMs in database understanding and query generation in order to answer human questions with an SQL query. We fined-tuned open source models, specifically Llama-2 and Code Llama, by combining 2 different models each designated to focus on one of two tasks in order to leverage each model's core competency to further increase the accuracy of the final SQL query. We propose a new framework to divide the schema into chunks in order to fit more information into a limited context. Our results are comparable with those obtained by GPT-4 at the same time being 135 times smaller, 90 times faster and more than 100 times cheaper than GPT-4.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsData Quality and Management · Topic Modeling · Semantic Web and Ontologies
MethodsMulti-Head Attention · Attention Is All You Need · Linear Layer · Softmax · Adam · Layer Normalization · Residual Connection · Absolute Position Encodings · Dropout · Dense Connections
