Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| DuckDB-NSQL-7B-v0.1.Q2_K.gguf | Q2_K | 2.36GB |
| DuckDB-NSQL-7B-v0.1.IQ3_XS.gguf | IQ3_XS | 2.6GB |
| DuckDB-NSQL-7B-v0.1.IQ3_S.gguf | IQ3_S | 2.75GB |
| DuckDB-NSQL-7B-v0.1.Q3_K_S.gguf | Q3_K_S | 2.75GB |
| DuckDB-NSQL-7B-v0.1.IQ3_M.gguf | IQ3_M | 2.9GB |
| DuckDB-NSQL-7B-v0.1.Q3_K.gguf | Q3_K | 3.07GB |
| DuckDB-NSQL-7B-v0.1.Q3_K_M.gguf | Q3_K_M | 3.07GB |
| DuckDB-NSQL-7B-v0.1.Q3_K_L.gguf | Q3_K_L | 3.35GB |
| DuckDB-NSQL-7B-v0.1.IQ4_XS.gguf | IQ4_XS | 3.4GB |
| DuckDB-NSQL-7B-v0.1.Q4_0.gguf | Q4_0 | 3.56GB |
| DuckDB-NSQL-7B-v0.1.IQ4_NL.gguf | IQ4_NL | 3.58GB |
| DuckDB-NSQL-7B-v0.1.Q4_K_S.gguf | Q4_K_S | 3.59GB |
| DuckDB-NSQL-7B-v0.1.Q4_K.gguf | Q4_K | 3.8GB |
| DuckDB-NSQL-7B-v0.1.Q4_K_M.gguf | Q4_K_M | 3.8GB |
| DuckDB-NSQL-7B-v0.1.Q4_1.gguf | Q4_1 | 3.95GB |
| DuckDB-NSQL-7B-v0.1.Q5_0.gguf | Q5_0 | 4.33GB |
| DuckDB-NSQL-7B-v0.1.Q5_K_S.gguf | Q5_K_S | 4.33GB |
| DuckDB-NSQL-7B-v0.1.Q5_K.gguf | Q5_K | 4.45GB |
| DuckDB-NSQL-7B-v0.1.Q5_K_M.gguf | Q5_K_M | 4.45GB |
| DuckDB-NSQL-7B-v0.1.Q5_1.gguf | Q5_1 | 4.72GB |
| DuckDB-NSQL-7B-v0.1.Q6_K.gguf | Q6_K | 5.15GB |
| DuckDB-NSQL-7B-v0.1.Q8_0.gguf | Q8_0 | 6.67GB |
SELECT statements, but can generate any valid DuckDB SQL statement, including statements for official DuckDB extensions.1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3tokenizer = AutoTokenizer.from_pretrained("motherduckdb/DuckDB-NSQL-7B-v0.1")
4model = AutoModelForCausalLM.from_pretrained("motherduckdb/DuckDB-NSQL-7B-v0.1", torch_dtype=torch.bfloat16)
5
6text = """### Instruction:
7Your task is to generate valid duckdb SQL to answer the following question.
8
9### Input:
10
11### Question:
12create a new table called tmp from test.csv
13
14### Response (use duckdb shorthand if possible):
15"""
16
17input_ids = tokenizer(text, return_tensors="pt").input_ids
18
19generated_ids = model.generate(input_ids, max_length=500)
20print(tokenizer.decode(generated_ids[0], skip_special_tokens=True))1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3tokenizer = AutoTokenizer.from_pretrained("motherduckdb/DuckDB-NSQL-7B-v0.1")
4model = AutoModelForCausalLM.from_pretrained("motherduckdb/DuckDB-NSQL-7B-v0.1", torch_dtype=torch.bfloat16)
5
6text = """### Instruction:
7Your task is to generate valid duckdb SQL to answer the following question, given a duckdb database schema.
8
9### Input:
10Here is the database schema that the SQL query will run on:
11CREATE TABLE taxi (
12 VendorID bigint,
13 tpep_pickup_datetime timestamp,
14 tpep_dropoff_datetime timestamp,
15 passenger_count double,
16 trip_distance double,
17 fare_amount double,
18 extra double,
19 tip_amount double,
20 tolls_amount double,
21 improvement_surcharge double,
22 total_amount double,
23);
24
25### Question:
26get all columns ending with _amount from taxi table
27
28### Response (use duckdb shorthand if possible):"""
29
30input_ids = tokenizer(text, return_tensors="pt").input_ids
31
32generated_ids = model.generate(input_ids, max_length=500)
33print(tokenizer.decode(generated_ids[0], skip_special_tokens=True))1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3tokenizer = AutoTokenizer.from_pretrained("motherduckdb/DuckDB-NSQL-7B-v0.1")
4model = AutoModelForCausalLM.from_pretrained("motherduckdb/DuckDB-NSQL-7B-v0.1", torch_dtype=torch.bfloat16)
5
6text = """### Instruction:
7Your task is to generate valid duckdb SQL to answer the following question, given a duckdb database schema.
8
9### Input:
10Here is the database schema that the SQL query will run on:
11CREATE TABLE rideshare (
12 hvfhs_license_num varchar,
13 dispatching_base_num varchar,
14 originating_base_num varchar,
15 request_datetime timestamp,
16 on_scene_datetime timestamp,
17 pickup_datetime timestamp,
18 dropoff_datetime timestamp,
19 trip_miles double,
20 trip_time bigint,
21
22);
23
24### Question:
25get longest trip in december 2022
26
27### Response (use duckdb shorthand if possible):
28"""
29
30input_ids = tokenizer(text, return_tensors="pt").input_ids
31
32generated_ids = model.generate(input_ids, max_length=500)
33print(tokenizer.decode(generated_ids[0], skip_special_tokens=True))