yasserrmd/Text2SQL-1.5B
yasserrmd/Text2SQL-1.5B is a 1.5 billion parameter Qwen2-based natural language to SQL model developed by yasserrmd. Fine-tuned from unsloth/qwen2.5-coder-1.5b-instruct-bnb-4bit, it excels at converting user queries into structured SQL statements, supporting complex multi-table queries with high accuracy. This model is optimized for text-to-SQL conversion, providing both the SQL code and an explanation, and has a context length of 131072 tokens.
Loading preview...
Overview
yasserrmd/Text2SQL-1.5B is a 1.5 billion parameter model specifically designed for natural language to SQL (Text2SQL) conversion. Developed by yasserrmd and fine-tuned from unsloth/qwen2.5-coder-1.5b-instruct-bnb-4bit, this model is optimized to translate user queries into accurate and structured SQL statements, including support for complex multi-table queries.
Key Capabilities
- High Accuracy Text2SQL: Converts natural language questions into precise SQL queries.
- Multi-Table Query Support: Capable of generating SQL for queries involving multiple database tables.
- Structured Output: Provides both the generated SQL code and a plain-text explanation, formatted in separate blocks.
- Flexible Output Formats: Supports markdown triple backticks for SQL code or a JSON format with 'query' and 'explanation' keys.
- Context Length: Features a notable context length of 131072 tokens.
Usage Guidelines
To ensure consistent and accurate outputs, users must provide a specific system instruction and include the database schema using CREATE TABLE statements within the prompt. The model was trained 2x faster using Unsloth and Huggingface's TRL library, making it an efficient solution for integrating natural language interfaces with databases.