ashishsahu2008/qwen2.5-3b-text2sql

TEXT GENERATIONConcurrent Unit Cost:1Model Size:3.1BQuant:BF16Context Size:32kTool Calling:SupportedPublished:Jul 7, 2026License:apache-2.0Architecture:Transformer0.0K Open Weights Featherless Exclusive Cold

ashishsahu2008/qwen2.5-3b-text2sql is a 3.1 billion parameter Qwen2.5-3B-Instruct model fine-tuned by ashishsahu2008. This model specializes in converting natural language questions into SQL queries, given a database schema. It achieves 72.5% exact-match accuracy on a held-out test set, significantly outperforming its base model for text-to-SQL tasks. Optimized for generating clean, runnable SQL, it is ideal for applications requiring direct SQL query generation from user input.

Loading preview...

Overview

This model, developed by ashishsahu2008, is a fine-tuned version of the Qwen2.5-3B-Instruct base model, specifically designed for text-to-SQL conversion. It takes a CREATE TABLE schema and a natural language question, then outputs only the corresponding SQL query, without additional prose or markdown.

Key Capabilities & Performance

  • SQL Generation: Converts plain English questions into executable SQL queries based on a provided database schema.
  • High Accuracy: Achieves an exact-match accuracy of 72.5% on a held-out test set (n=200) for SQL generation, a substantial improvement over the base model's 41.5%.
  • Efficiency: The fine-tuning process utilized LoRA/QLoRA, training only 0.96% of the model's 3.1 billion parameters, demonstrating significant gains with minimal parameter updates.
  • Direct Output: Designed to return only the SQL query, making it suitable for direct integration into applications.

Training Details

The model was fine-tuned using supervised fine-tuning (SFT) with LoRA on a 4-bit quantized base model (QLoRA). It was trained on a 3,000-row subset of the b-mc2/sql-create-context dataset, focusing on single-table CREATE TABLE schemas.

Limitations

  • Primarily trained on single-table schemas; performance on complex multi-join databases may vary.
  • Requires the schema to be explicitly provided in the prompt; it does not infer tables.
  • SQL dialect aligns with the training data, which is broadly SQLite-compatible, and does not target specific engine extensions.

Good for

  • Developers building applications that require converting natural language into SQL queries.
  • Automating database interactions where the schema is known and provided.
  • Use cases where a compact, efficient model for text-to-SQL is preferred.