Text to SQLCode

DuckDB-NSQL

A model for turning questions into SQL, built for the embedded analytics database DuckDB. Available in Ollama, convenient for working with CSV and Parquet locally.

The last open version came out in Jan 2024. The family has not been updated for a long time: the model still works, but do not expect fixes or new sizes.

Developer
MotherDuck and Numbers Station, USA
First release
Jan 2024
Latest release
Jan 2024
Sizes
7B
License
Commercial use with conditionsLlama 2 Community License
Russian
Not stated
Ready-made builds
GGUF
Running
Available in OllamaNeeds a GPU
Industries
Software development, Finance

What it does

  • Plain-language questions about CSV and Parquet exports
  • DuckDB queries inside analytics scripts
  • Quick analytics on a laptop without a server

Where it is used

Data analystsSoftware developmentFinancial reporting

Hardware requirements

LaptopLaptop or regular PC, up to 8 GB of VRAM — smaller versions
fits
1 GPUOne GPU with 16–80 GB — mid-size versions
fits
ClusterServer with several GPUs — flagship versions
no versions

Versions

  1. DuckDB-NSQL-7B v0.1

How to run it

With Ollama — the fastest wayInstall Ollama on your computer or server and find the model in its library by name. Good enough to try the model on your own tasks in one evening.Find it in the Ollama library
On your own serverWeights are downloaded from Hugging Face and served with vLLM (load and API) or llama.cpp (modest hardware). The model then runs in a closed network with no per-request fees.Hugging Face
How much hardware you needCalculate the VRAM for the model size, context length and number of concurrent requests.Open the hardware calculator

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 DuckDB-NSQL be used in a commercial project?

With conditions. License: Llama 2 Community License. Restrictions vary — region, company revenue, attribution requirements. Have a lawyer check the terms before a commercial launch.

What hardware does DuckDB-NSQL 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 DuckDB-NSQL support Russian?

The model card does not list languages, so Russian support cannot be promised — it has to be tested on your own examples.

Where can I download DuckDB-NSQL and what does it cost?

The DuckDB-NSQL 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

  1. SelectionI pick the model size for your task and hardware and test it on your examples.
  2. DeploymentI deploy it on your server or in a closed network and provide an API.
  3. Fine-tuningI fine-tune it on your data (LoRA) or connect a knowledge base — whichever is cheaper for the task.
  4. IntegrationI connect it to your CRM, ERP, bot, website or team chat and set up monitoring.

Similar models

Source: huggingface.co/motherduckdb/DuckDB-NSQL-7B-v0.1. Data checked against the model card on 22 Sep 2026. Have a lawyer review the license before commercial launch.