Shizu0n/phi3-mini-sql-generator-merged

TEXT GENERATIONConcurrency Cost:1Model Size:4BQuant:BF16Ctx Length:4kPublished:May 5, 2026License:mitArchitecture:Transformer Open Weights Cold

Shizu0n/phi3-mini-sql-generator-merged is a fine-tuned version of Microsoft's Phi-3-mini-4k-instruct model, specifically optimized for generating SQL queries. This merged model, with its LoRA adapter weights fused into the base model, excels at converting natural language questions into SQL, achieving a 73.5% exact match on SQL generation tasks. It is designed for efficient inference without requiring PEFT dependencies, making it suitable for deployment in applications needing SQL generation capabilities.

Loading preview...

SQL Generation with Phi-3 Mini

This model, Shizu0n/phi3-mini-sql-generator-merged, is a specialized version of Microsoft's Phi-3-mini-4k-instruct that has been fine-tuned for SQL query generation. Unlike its base model, which achieved only 2.0% exact match on SQL tasks, this fine-tuned variant demonstrates significantly improved performance, reaching 73.5% exact match on a held-out evaluation set from the b-mc2/sql-create-context dataset.

Key Capabilities

  • Natural Language to SQL: Translates natural language questions into SQL SELECT queries.
  • Efficient Inference: Merged LoRA adapter weights directly into the base model, eliminating the need for PEFT dependencies during inference.
  • Compact Size: Built upon the Phi-3 Mini architecture, offering a capable solution in a smaller footprint.

Training Details

The model was trained using QLoRA on 1,000 examples from the b-mc2/sql-create-context dataset, taking approximately 21 minutes on an NVIDIA T4 GPU.

Limitations

  • Complexity: Best suited for simple to medium complexity SELECT queries.
  • SQL Dialects: Not extensively tested on dialect-specific SQL (e.g., PostgreSQL, MySQL).
  • Advanced Queries: May struggle with multi-table JOINs and nested subqueries due to the limited training data size (1,000 examples).