defog/sqlcoder-7b-2

Warm
Public
7B
FP8
4096
License: cc-by-sa-4.0
Hugging Face
Overview

Overview

defog/sqlcoder-7b-2 is a 7 billion parameter language model developed by Defog, Inc., specifically designed for natural language to SQL generation. It is fine-tuned from CodeLlama-7B and was updated in February 2024 for improved performance, especially concerning SQL joins.

Key Capabilities

  • Natural Language to SQL Conversion: Translates user questions into executable SQL queries.
  • Optimized for Joins: The latest model weights significantly enhance its ability to handle SQL queries involving joins.
  • Database Schema Awareness: Generates queries based on provided database schema DDL statements.
  • Evaluation Framework: Evaluated using SQL-Eval, a PostgreSQL-based framework developed by Defog.

Performance Highlights

On the SQL-Eval benchmark, sqlcoder-7b-2 demonstrates strong performance across various SQL categories:

  • Date: 96%
  • Group By: 91.4%
  • Order By: 94.3%
  • Ratio: 91.4%
  • Join: 94.3%
  • Where: 77.1%

Intended Use Cases

This model is primarily intended as an analytics tool for non-technical users to query data in SQL databases. It is crucial to note that it is designed for use with read-only access to databases, as it has not been trained to reject malicious requests from users with write access.