LLM for natural language to SQL conversion
Top 13.0% on sourcepulse
SQLCoder is a family of state-of-the-art Large Language Models (LLMs) designed for converting natural language questions into SQL queries. It targets developers and data analysts needing to interact with databases using natural language, offering performance that surpasses leading proprietary models like GPT-4 on specific benchmarks.
How It Works
SQLCoder models are trained on over 20,000 human-curated natural language-to-SQL query pairs across 10 diverse database schemas. The models are fine-tuned to excel at generating accurate SQL from natural language prompts, with a focus on various SQL constructs like JOIN
, WHERE
, and GROUP BY
clauses.
Quick Start & Requirements
pip install "sqlcoder[transformers]"
CMAKE_ARGS="-DLLAMA_METAL=on" pip install "sqlcoder[llama-cpp]"
CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install "sqlcoder[llama-cpp]"
$env:CMAKE_ARGS = "-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install "sqlcoder[llama-cpp]"
Highlighted Details
sql-eval
framework for NL-to-SQL tasks.date
, group_by
, order_by
, ratio
, join
, and where
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 year ago
1 day