HridaAI/Hrida-T2SQL-3B-V0.1

Warm
Public
4B
BF16
4096
Jun 1, 2024
License: apache-2.0
Hugging Face
Overview

Hrida-T2SQL-3B-V0.1: Text-to-SQL SLM

Hrida-T2SQL-3B-V0.1 is a 4 billion parameter Small Language Model (SLM) developed by HridaAI, specifically fine-tuned for Text-to-SQL tasks. It is based on the Microsoft/Phi-3-mini-4k-instruct architecture, leveraging its compact size and efficiency for specialized applications.

Key Capabilities

  • Natural Language to SQL Conversion: Translates user queries in natural language into executable SQL statements.
  • Dialect Specification: Supports specifying various SQL dialects (e.g., MySQL, PostgreSQL, SQL Server) to ensure syntax conformity.
  • Schema-Aware Generation: Utilizes provided database schemas (table names, column names, data types) to generate accurate and contextually relevant SQL queries.
  • Instruction-Guided Output: Employs a structured prompt template including system instructions, dialect, context, and input to guide SQL generation.

Prompt Template Structure

The model uses a specific prompt format to optimize performance, including:

  • ### Instruction: System prompt to guide the model.
  • ### Dialect: Optional SQL variant specification.
  • ### Context: Database schema details.
  • ### Input: User's natural language query.
  • ### Response: Expected SQL query output.

Good For

  • Automating database query generation from user input.
  • Integrating natural language interfaces with SQL databases.
  • Applications requiring efficient and accurate SQL code generation from text.