sqlcoder 7b 2

defog

Introduction

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:

  1. Download the Model: Ensure you have the latest model weights updated on February 7, 2024, for optimal performance.
  2. Set Up Environment: Install the necessary libraries, primarily transformers.
  3. Inference Script: Use the provided inference script from Defog's GitHub.
  4. Prompt Usage: Use do_sample=False and num_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.

More Related APIs in Text Generation