sqlcoder 7b 2
defogIntroduction
SQLCODER-7B-2 is a large language model developed by Defog, Inc., designed for generating SQL queries from natural language inputs. It aims to assist non-technical users in analyzing data within SQL databases. The model is not equipped to handle malicious requests and should be used by users with read-only database access.
Architecture
- Developed by: Defog, Inc.
- Model Type: Text to SQL
- Finetuned from: CodeLlama-7B
- Library: Transformers
Training
The model was evaluated using SQL-Eval, a PostgreSQL-based framework for testing model capabilities. It showed high performance across various query categories, including join
, group_by
, and order_by
.
Guide: Running Locally
To use SQLCODER-7B-2 locally, follow these steps:
- Download the Model: Ensure you have the latest model weights updated on February 7, 2024, for optimal performance.
- Set Up Environment: Install the necessary libraries, primarily
transformers
. - Inference Script: Use the provided inference script from Defog's GitHub.
- Prompt Usage: Use
do_sample=False
andnum_beams=4
for generating SQL queries.
For enhanced performance, consider using cloud GPUs from providers like AWS, Google Cloud, or Azure.
License
SQLCODER-7B-2 is licensed under CC-by-SA-4.0.