SandLogicTechnologies commited on
Commit
81ecf47
·
verified ·
1 Parent(s): 3f691e3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +150 -0
README.md ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ language:
4
+ - en
5
+ base_model:
6
+ - defog/sqlcoder-7b-2
7
+ tags:
8
+ - text-generation
9
+ - text-to-sql
10
+ - sql
11
+ - coding
12
+ - database
13
+ - instruction-following
14
+ - efficient-model
15
+ ---
16
+
17
+ ## SQLCoder-7B-2
18
+
19
+ SQLCoder-7B-2 is a specialized code generation model developed by Defog and optimized for Text-to-SQL generation, database querying, and structured data analysis workflows. This repository contains GGUF quantized variants of the model optimized for efficient local inference using llama.cpp.
20
+
21
+ The model is designed to translate natural language questions into syntactically correct SQL queries across a variety of database schemas. The quantized formats significantly reduce memory requirements while preserving strong SQL generation capability, enabling practical deployment on consumer hardware and edge environments.
22
+
23
+ ---
24
+
25
+ ## Model Overview
26
+
27
+ - **Model Name**: SQLCoder-7B-2
28
+ - **Base Model**: defog/sqlcoder-7b-2
29
+ - **Architecture**: Decoder-only Transformer
30
+ - **Parameter Count**: 7 Billion
31
+ - **Modalities**: Text
32
+ - **Primary Languages**: English
33
+ - **Developer**: Defog
34
+ - **License**: CC BY-SA 4.0
35
+
36
+ ---
37
+
38
+ ## Quantization Formats
39
+
40
+ This repository provides various GGUF quantized versions of the SQLCoder-7B-2 model, optimized for efficient local inference using `llama.cpp`. Below are the details of the available I-Matrix (IQ) formats.
41
+
42
+ ### IQ3_M
43
+
44
+ - Size reduction of approx 76.89% (2.90 GB) compared to 16-bit (12.55 GB)
45
+ - Aggressive 3-bit quantization optimized for maximum memory reduction
46
+ - Suitable for low-memory systems and CPU-based inference
47
+ - Enables lightweight deployment of Text-to-SQL workflows on constrained hardware
48
+ - SQL generation quality may degrade on highly complex schemas, multi-table joins, and advanced analytical queries
49
+
50
+ ### IQ4_NL
51
+
52
+ - Size reduction of approx 71.47% (3.58 GB) compared to 16-bit (12.55 GB)
53
+ - Advanced 4-bit non-linear quantization designed to better preserve SQL generation quality
54
+ - More suitable for structured query generation, schema understanding, and analytical database workflows
55
+ - Typically provides stronger consistency and reduced quantization loss compared to lower-bit formats
56
+ - Slightly increased computational overhead during inference
57
+
58
+ ### IQ4_XS
59
+
60
+ - Size reduction of approx 72.91% (3.40 GB) compared to 16-bit (12.55 GB)
61
+ - Balanced 4-bit quantization focused on efficiency and stable SQL generation performance
62
+ - Good trade-off between model size, inference speed, and query quality
63
+ - Suitable for general-purpose Text-to-SQL applications and local database assistants
64
+ - Maintains reliable query generation behavior across most practical workloads
65
+
66
+ ---
67
+
68
+ ## Training Background (Original Model)
69
+
70
+ SQLCoder-7B-2 is trained with a focus on natural language to SQL translation, database reasoning, schema understanding, and structured query generation.
71
+
72
+ ### Pretraining
73
+
74
+ - Large-scale language model pretraining across diverse textual and code datasets
75
+ - Focus on programming, structured reasoning, and database-related knowledge
76
+ - Optimized for downstream SQL generation and analytical workflows
77
+
78
+ ### Instruction Tuning
79
+
80
+ - Refined using Text-to-SQL datasets and schema-aware instruction tuning
81
+ - Enhanced for generating syntactically correct SQL queries
82
+ - Improved consistency for database querying, filtering, aggregation, and analytical operations
83
+
84
+ ---
85
+
86
+ ## Key Capabilities
87
+
88
+ - **Text-to-SQL Generation**
89
+ Converts natural language requests into executable SQL queries.
90
+
91
+ - **Database Schema Understanding**
92
+ Interprets table structures, relationships, and schema context effectively.
93
+
94
+ - **SQL Query Construction**
95
+ Supports filtering, joins, aggregations, grouping, ordering, and analytical operations.
96
+
97
+ - **Efficient Local Deployment**
98
+ Quantized variants enable practical offline inference on consumer hardware.
99
+
100
+ - **Structured Data Analysis**
101
+ Assists with database exploration and business intelligence workflows.
102
+
103
+ ---
104
+
105
+ ## Usage Example
106
+
107
+ ### Using llama.cpp
108
+
109
+ ```bash
110
+ ./llama-cli \
111
+ -m SandlogicTechnologies/sqlcoder-7b-2_IQ4_NL.gguf \
112
+ -p "Generate a SQL query to find the top 10 customers by total revenue."
113
+ ```
114
+
115
+ ---
116
+
117
+ ## Recommended Usecases
118
+
119
+ - **Text-to-SQL Applications**
120
+ Build natural language interfaces for relational databases.
121
+
122
+ - **Database Assistants**
123
+ Generate and explain SQL queries from user requests.
124
+
125
+ - **Business Intelligence Workflows**
126
+ Assist with reporting, aggregation, and analytical query generation.
127
+
128
+ - **Data Exploration**
129
+ Simplify interaction with structured databases through natural language.
130
+
131
+ - **Research and Experimentation**
132
+ Evaluate Text-to-SQL performance and database reasoning workflows.
133
+
134
+ ---
135
+
136
+ ## Acknowledgments
137
+
138
+ These quantized models are based on the original work by the **Defog** development team.
139
+
140
+ Special thanks to:
141
+
142
+ - The Defog team for developing and releasing the SQLCoder-7B-2 model.
143
+
144
+ - **Georgi Gerganov** and the `llama.cpp` open-source community for enabling efficient quantization and inference via the GGUF format.
145
+
146
+ ---
147
+
148
+ ## Contact
149
+
150
+ For questions, feedback, or support, please reach out at [support@sandlogic.com](mailto:support@sandlogic.com) or visit [https://www.sandlogic.com/](https://www.sandlogic.com/)