Granite-3.3-8B-Instruct: Text-to-SQL (Divide and Conquer)
Model Overview
Granite-3.3-8B-Instruct-BIRD-D&C is a highly specialized large language model fine-tuned for complex enterprise Text-to-SQL tasks. It is built upon the ibm-granite/granite-3.3-8b-instruct base model and has been fine-tuned using a novel "Divide and Conquer" reasoning strategy.
This model is designed to navigate massive database schemas, effectively filter out context noise, and break down complex natural language questions into smaller, manageable SQL sub-queries before aggregating them into a final, highly optimized SQL execution statement.
Training Dataset & Methodology
This model serves as the official Proof of Concept (PoC) for the heavily engineered dataset: 👉 BDanial/Instruct_bird_to_divide_and_conquer
The model was fine-tuned to internalize the following structural innovations introduced in the dataset:
- JSON-Based Schema Linking: The model expects and understands a rich JSON representation of the database schema, including data types, primary keys, and random row samples.
- Lexical LSH Matches: It utilizes contextual hints provided via Local Sensitive Hashing (LSH) that map user keywords to actual database values.
- Divide & Conquer Reasoning: Instead of generating the final SQL directly (which is prone to errors in small-to-medium models), it generates step-by-step reasoning traces, solving sub-problems before formulating the final query.
- Structural Tagging: This model trained on the dataset without tags. But if you train the model on the tagged version of the dataset (BDanial/Instruct_bird_to_divide_and_conquer_tagged) It will recognizes special reserved tokens (
<TABLE>and<COLUMN>) to explicitly separate database entities from natural language instructions.
Training Details
Remarkably, this model achieved its performance gains using only a single-epoch LoRA (Low-Rank Adaptation) fine-tuning pass. This demonstrates both the extreme density/quality of the instructional dataset and the strong baseline reasoning capabilities of the Granite 3.3 8B architecture.
Evaluation & Performance
The model was rigorously tested on an isolated, zero-shot sub-sample of the official BIRD dev set. The evaluation metric used is Execution Accuracy (EX), which validates if the generated SQL returns the exact same execution output as the gold-standard reference query.
| Model | Size | Epochs / Tuning | Zero-Shot EX (Base) | Zero-Shot EX (Fine-Tuned) |
|---|---|---|---|---|
| Granite 3.3 Instruct | 8B | 1-Epoch LoRA | 25.0% | 33.5% |
By leveraging our Divide and Conquer dataset, the model achieved an impressive +8.5% absolute improvement in execution accuracy just in 1 epoch and LORA method!, showcasing its enhanced capability in handling complex database relations.
Model tree for BDanial/Granite-3.3-8b-instruct-bird-d-and-c
Base model
ibm-granite/granite-3.3-8b-base