SQLCoder
One of the first open models that turn a plain-language question into an SQL query against a database. Available in Ollama, but newer competitors are already stronger.
The last open version came out in May 2024. The family has not been updated for a long time: the model still works, but do not expect fixes or new sizes.
- Developer
- Defog, USA
- First release
- Aug 2023
- Latest release
- May 2024
- Sizes
- 7B – 70B
- License
- Commercial use with conditionsCC-BY-SA 4.0 (early versions with OpenRAIL-M caveats): commercial use is allowed, but fine-tuned weights must be released under the same license
- Russian
- Not supported
- Ready-made builds
- GGUF
- Running
- Available in OllamaNeeds a GPU
- Industries
- Finance, Retail and marketplaces, Software development
What it does
- Answering managers' questions from the sales database without an analyst
- Drafting SQL queries for reports
- An assistant inside a BI system
Where it is used
Hardware requirements
Versions
- Llama-3-SQLCoder-8B
- SQLCoder-7B-2
- SQLCoder-70B alpha
- SQLCoder-34B alpha
- SQLCoder2 15B и SQLCoder-7B
- SQLCoder 15B
How to run it
I can set this up end to end: pick the model size, deploy it on your server and connect it to your systems. Quantization compresses a model so it takes less video memory and runs on more modest hardware. Answers change slightly, so quality is checked on your own examples.
Frequently asked questions
Can SQLCoder be used in a commercial project?
With conditions. License: CC-BY-SA 4.0 (early versions with OpenRAIL-M caveats): commercial use is allowed, but fine-tuned weights must be released under the same license. Restrictions vary — region, company revenue, attribution requirements. Have a lawyer check the terms before a commercial launch.
What hardware does SQLCoder need?
At minimum: Laptop or regular PC, up to 8 GB of VRAM — smaller versions. Without a GPU the model is not practical. You can calculate the exact VRAM for your model size and context in the hardware calculator.
Does SQLCoder support Russian?
No. The model card lists its languages and Russian is not among them.
Where can I download SQLCoder and what does it cost?
The SQLCoder weights are open and free to download. You only pay for the hardware it runs on and for the setup. Source links are at the bottom of this page.
How I deploy it for clients
- SelectionI pick the model size for your task and hardware and test it on your examples.
- DeploymentI deploy it on your server or in a closed network and provide an API.
- Fine-tuningI fine-tune it on your data (LoRA) or connect a knowledge base — whichever is cheaper for the task.
- IntegrationI connect it to your CRM, ERP, bot, website or team chat and set up monitoring.
Similar models
Models for turning questions into SQL, trained on millions of synthetic query examples across different databases. Three sizes for different hardware.
DetailsText to SQLXiYanSQL-QwenCoderAlibaba · ChinaCommercial use allowedAlibaba models for turning questions into SQL, based on Qwen2.5-Coder. They work with different SQL dialects; a small 3B version suits modest hardware.
DetailsCodeQwen CoderAlibaba (Qwen team) · ChinaCommercial use allowedThe broadest open coding family: from 0.5B for autocompletion to 480B for agents. Qwen3-Coder-Next (80B, 3B active) works as a developer agent on a single GPU.
DetailsSource: huggingface.co/defog/llama-3-sqlcoder-8b. Data checked against the model card on 22 Sep 2026. Have a lawyer review the license before commercial launch.


