SQLCoder icon

SQLCoder

SQLCoder is an open-source family of LLMs fine-tuned specifically for text-to-SQL generation, developed by Defog.

Visit Website Text-to-SQL Open Source
SQLCoder Defog SQL model open source SQL LLM SQLCoder-34B fine-tuned SQL model

SQLCoder is an open-source family of LLMs fine-tuned specifically for text-to-SQL generation, developed by Defog. The SQLCoder-34B model notably outperforms GPT-4 on proprietary benchmarks, achieving this through training on 20,000+ human-curated SQL examples spanning diverse schemas and query patterns. Available in multiple sizes (7B, 15B, 34B parameters) for different hardware constraints. Models can run locally via Ollama, vLLM, or Hugging Face Transformers, providing complete data privacy without API calls. The training methodology emphasizes real-world query patterns rather than synthetic benchmarks. Defog also offers a hosted API for teams not wanting to manage infrastructure. Page should cover: model size selection guide, local deployment options (Ollama, vLLM, Docker), fine-tuning on custom data, benchmark comparisons with GPT-4 and Claude, inference optimization, and integration with Vanna.ai and other frameworks.