[GH-ISSUE #2193] 🦆 Publish DuckDB-NSQL-7B on ollama #63291

Closed
opened 2026-05-03 12:52:55 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @adriens on GitHub (Jan 25, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2193

About

DuckDB-NSQL-7B, A LLM for duckdb has been released.

It would be very useful to add it to ollama so anyone could build new experiences on top if it.

🔖 Resources

Originally created by @adriens on GitHub (Jan 25, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2193 # :grey_question: About [`DuckDB-NSQL-7B`](https://motherduck.com/blog/duckdb-text2sql-llm/), A LLM for [duckdb](https://github.com/duckdb/duckdb) has been released. It would be very useful to add it to `ollama` so anyone could build new experiences on top if it. # :bookmark: Resources - [AI That Quacks: Introducing DuckDB-NSQL-7B, A LLM for DuckDB](https://motherduck.com/blog/duckdb-text2sql-llm/) - [Demo on HuggingFace](https://huggingface.co/spaces/motherduckdb/DuckDB-NSQL-7B) - [`motherduckdb/DuckDB-NSQL-7B-v0.1-GGUF`](https://huggingface.co/motherduckdb/DuckDB-NSQL-7B-v0.1-GGUF) - [:octocat: `github.com/NumbersStationAI/DuckDB-NSQL`](https://github.com/NumbersStationAI/DuckDB-NSQL)
Author
Owner

@adriens commented on GitHub (Jan 25, 2024):

💡 Pushed it on MotherDuch roadmap

<!-- gh-comment-id:1910943850 --> @adriens commented on GitHub (Jan 25, 2024): :bulb: Pushed it on [MotherDuch roadmap](https://motherduck.canny.io/feature-requests/p/publish-duckdb-nsql-7b-on-ollama)
Author
Owner

@mxyng commented on GitHub (Jan 25, 2024):

duckdb-nsql is available here

<!-- gh-comment-id:1911118285 --> @mxyng commented on GitHub (Jan 25, 2024): duckdb-nsql is available [here](https://ollama.ai/library/duckdb-nsql)
Author
Owner

@adriens commented on GitHub (Jan 26, 2024):

https://ollama.ai/library/duckdb-nsql
image

<!-- gh-comment-id:1911253005 --> @adriens commented on GitHub (Jan 26, 2024): https://ollama.ai/library/duckdb-nsql ![image](https://github.com/ollama/ollama/assets/5235127/94475c94-53d6-41bf-88c3-596793472c6c)
Author
Owner

@adriens commented on GitHub (Jan 26, 2024):

👏 Awesome to have also dropped code samples

pip install ollama
import ollama

r = ollama.generate(
    model='duckdb-nsql:7b-q4_0',
    system='''Here is the database schema that the SQL query will run on:
CREATE TABLE taxi (
    VendorID bigint,
    tpep_pickup_datetime timestamp,
    tpep_dropoff_datetime timestamp,
    passenger_count double,
    trip_distance double,
    fare_amount double,
    extra double,
    tip_amount double,
    tolls_amount double,
    improvement_surcharge double,
    total_amount double,
);''',
    prompt='get all columns ending with _amount from taxi table',
)

print(r['response'])

... it should make a lot more things easier to implement 🚀 🦥

<!-- gh-comment-id:1911253952 --> @adriens commented on GitHub (Jan 26, 2024): :clap: Awesome to have also dropped code samples ```sh pip install ollama ``` ```python import ollama r = ollama.generate( model='duckdb-nsql:7b-q4_0', system='''Here is the database schema that the SQL query will run on: CREATE TABLE taxi ( VendorID bigint, tpep_pickup_datetime timestamp, tpep_dropoff_datetime timestamp, passenger_count double, trip_distance double, fare_amount double, extra double, tip_amount double, tolls_amount double, improvement_surcharge double, total_amount double, );''', prompt='get all columns ending with _amount from taxi table', ) print(r['response']) ``` ... it should make a lot more things easier to implement :rocket: :sloth:
Author
Owner

@adriens commented on GitHub (Jan 26, 2024):

image

<!-- gh-comment-id:1912794734 --> @adriens commented on GitHub (Jan 26, 2024): ![image](https://github.com/ollama/ollama/assets/5235127/d0daf0a5-6e19-415b-bf08-d65c17791719)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63291