初始化项目,由ModelHub XC社区提供模型

Model: llmware/slim-sql-1b-v0
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-01 20:04:57 +08:00
commit f7c6a2a687
11 changed files with 93878 additions and 0 deletions

35
.gitattributes vendored Normal file
View File

@@ -0,0 +1,35 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text

93
README.md Normal file
View File

@@ -0,0 +1,93 @@
---
license: apache-2.0
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
slim-sql-1b-v0 is the first model in the SLIM (Specialized Language Instruct Model) series.
### Benchmark Tests
Evaluated against 100 test SQL queries with under 100 characters. 1 point given for exact string match, 0 given for incorrect answer.
--**Accuracy Score**: **86** correct out of 100
- 8 incorrect answers attributed to query structure ordering or naming convention differences
- 6 incorrect answers attributed to incorrect variable selection or aggregate function use
### Model Description
<!-- Provide a longer summary of what this model is. -->
- **Developed by:** llmware
- **Model type:** TinyLlama
- **Language(s) (NLP):** English
- **License:** apache-2.0
- **Finetuned from model:** [TinyLlama-1.1b - 2.5T checkpoint](https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-1195k-token-2.5T)
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
slim-sql-1b-v0 is designed to generate accurate SQL queries for data retrieval on simple table structures given a natural language prompt.
For best results, prompts should be structured as a question to retrieve information and perform aggregate functions on one or several variables.
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
Any model can provide inaccurate or incomplete information, and should be used in conjunction with appropriate safeguards and fact-checking mechanisms.
## How to Get Started with the Model
The fastest way to get started with slim is through direct import in transformers:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("slim-sql-1b-v0")
model = AutoModelForCausalLM.from_pretrained("slim-sql-1b-v0")
Please refer to the generation_test.py files in the Files repository, which includes 100 samples and script to test the model.
The sql-slim model was fine-tuned with a simple "\<human> and \<bot> wrapper", so to get the best results, wrap inference entries as:
full_prompt = "<human>: " + my_prompt + "\n" + "<bot>:"
The prompt consists of two sub-parts:
1. Table creation prompt providing table name, variables, and variable type.
2. Specific question or instruction based on the text passage
Test sample example: {"context": "CREATE TABLE table_name_34 (season VARCHAR, lost VARCHAR, points VARCHAR)", "question": "Which season did the Minnesota Kicks lose 13 games and score 156 points?", "answer": "SELECT COUNT(season) FROM table_name_34 WHERE lost = 13 AND points = 156"}
A subset of test samples are provided in this repo ("sql_test_100_simple_s").
For use in training, the "\<human>" tag would be associated with "context" and "question" statements, while the "\<bot>" tag will be associated with the model's output.
If you are using a HuggingFace generation script:
# prepare prompt packaging used in fine-tuning process
new_prompt = "<human>: " + entries["context"] + "\n" + entries["query"] + "\n" + "<bot>:"
inputs = tokenizer(new_prompt, return_tensors="pt")
start_of_output = len(inputs.input_ids[0])
# temperature: set at 0.3 for consistency of output
# max_new_tokens: set at 100 - may prematurely stop a few of the summaries
outputs = model.generate(
inputs.input_ids.to(device),
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.eos_token_id,
do_sample=True,
temperature=0.3,
max_new_tokens=100,
)
output_only = tokenizer.decode(outputs[0][start_of_output:],skip_special_tokens=True)
## Model Card Contact
Dylan Oberst & llmware team

86
config.json Normal file
View File

@@ -0,0 +1,86 @@
{
"aib_version": "",
"training_dataset": "",
"training_timestamp": "Mon Jan 1 00:46:42 2024",
"training_comments": "shared_LLaMa-1.3B",
"vocab_size": 32000,
"max_position_embeddings": 2048,
"hidden_size": 2048,
"intermediate_size": 5632,
"num_hidden_layers": 22,
"num_attention_heads": 32,
"num_key_value_heads": 4,
"hidden_act": "silu",
"initializer_range": 0.02,
"rms_norm_eps": 1e-05,
"pretraining_tp": 1,
"use_cache": true,
"rope_theta": 10000.0,
"rope_scaling": null,
"attention_bias": false,
"return_dict": true,
"output_hidden_states": false,
"output_attentions": false,
"torchscript": false,
"torch_dtype": "float32",
"use_bfloat16": false,
"tf_legacy_loss": false,
"pruned_heads": {},
"tie_word_embeddings": false,
"is_encoder_decoder": false,
"is_decoder": false,
"cross_attention_hidden_size": null,
"add_cross_attention": false,
"tie_encoder_decoder": false,
"max_length": 20,
"min_length": 0,
"do_sample": false,
"early_stopping": false,
"num_beams": 1,
"num_beam_groups": 1,
"diversity_penalty": 0.0,
"temperature": 1.0,
"top_k": 50,
"top_p": 1.0,
"typical_p": 1.0,
"repetition_penalty": 1.0,
"length_penalty": 1.0,
"no_repeat_ngram_size": 0,
"encoder_no_repeat_ngram_size": 0,
"bad_words_ids": null,
"num_return_sequences": 1,
"chunk_size_feed_forward": 0,
"output_scores": false,
"return_dict_in_generate": false,
"forced_bos_token_id": null,
"forced_eos_token_id": null,
"remove_invalid_values": false,
"exponential_decay_length_penalty": null,
"suppress_tokens": null,
"begin_suppress_tokens": null,
"architectures": [
"LlamaForCausalLM"
],
"finetuning_task": null,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"tokenizer_class": null,
"prefix": null,
"bos_token_id": 1,
"pad_token_id": null,
"eos_token_id": 2,
"sep_token_id": null,
"decoder_start_token_id": null,
"task_specific_params": null,
"problem_type": null,
"_name_or_path": "TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T",
"transformers_version": "4.35.2",
"model_type": "llama",
"trained": "custom training"
}

7
generation_config.json Normal file
View File

@@ -0,0 +1,7 @@
{
"bos_token_id": 1,
"eos_token_id": 2,
"pad_token_id": 0,
"max_length": 2048,
"transformers_version": "4.31.0.dev0"
}

View File

@@ -0,0 +1,102 @@
import time
import os
import json
from werkzeug.utils import secure_filename
import re
import ast
import sqlite3
import random
from transformers import AutoModelForCausalLM, AutoTokenizer
from llmware.models import ModelCatalog
from llmware.prompts import Prompt
def model_test_run_general():
t0 = time.time()
model_name = "llmware/slim-sql-1b-v0"
print("update: model_name - ", model_name)
custom_hf_model = AutoModelForCausalLM.from_pretrained(model_name,trust_remote_code=True)
hf_tokenizer = AutoTokenizer.from_pretrained(model_name)
# now, we have 'imported' our own custom 'instruct' model into llmware
model = ModelCatalog().load_hf_generative_model(custom_hf_model, hf_tokenizer, instruction_following=False,
prompt_wrapper="human_bot")
model.temperature = 0.3
# run direct inference on model
print("\nupdate: Starting Generative Instruct Custom Fine-tuned Test")
t1 = time.time()
print("update: time loading model - ", t1 - t0)
fp = ""
fn = "sql_test_100_simple_s.jsonl"
opened_file = open(os.path.join(fp, fn), "r")
prompt_list = []
for i, rows in enumerate(opened_file):
# print("update: ", i, rows)
rows = json.loads(rows)
new_entry = {"question": rows["question"],
"answer": rows["answer"],
"context": rows["context"]}
prompt_list.append(new_entry)
random.shuffle(prompt_list)
total_response_output = []
perfect_match = 0
for i, entries in enumerate(prompt_list):
prompt = entries["question"]
context = re.sub("[\n\r]","", entries["context"])
context = re.sub("\s+", " ", context)
context = re.sub("\"", "", context)
answer = ""
if "answer" in entries:
answer = entries["answer"]
output = model.inference(prompt, add_context=context, add_prompt_engineering=True)
print("\nupdate: model question - ", prompt)
llm_response = re.sub("['\"]", "", output["llm_response"])
answer = re.sub("['\"]", "", answer)
print("update: model response - ", i, llm_response)
print("update: model gold answer - ", answer)
if llm_response.strip().lower() == answer.strip().lower():
perfect_match += 1
print("update: 100% MATCH")
print("update: perfect match accuracy - ", perfect_match / (i+1))
core_output = {"number": i,
"llm_response": output["llm_response"],
"gold_answer": answer,
"prompt": prompt,
"usage": output["usage"]}
total_response_output.append(core_output)
t2 = time.time()
print("update: total processing time: ", t2-t1)
return total_response_output
output = model_test_run_general()

3
pytorch_model.bin Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:445d369ff039384b01fd0508aa5051c9e385d2c704bb28f480e4a697778f9586
size 2200181102

23
special_tokens_map.json Normal file
View File

@@ -0,0 +1,23 @@
{
"bos_token": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"eos_token": {
"content": "</s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"unk_token": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}

100
sql_test_100_simple_s.jsonl Normal file
View File

@@ -0,0 +1,100 @@
{"context": "CREATE TABLE table_25572068_1 ( location VARCHAR, winning_driver VARCHAR )", "question": "What was the location when the winning driver was Nathana l Berthon?", "answer": "SELECT location FROM table_25572068_1 WHERE winning_driver = \"Nathana\u00ebl Berthon\""}
{"context": "CREATE TABLE table_20297668_1 (standard_yarn_weight_system VARCHAR, wraps_per_inch__wpi_ VARCHAR)", "question": "Name the standard yarn weight system for 7 wpi", "answer": "SELECT standard_yarn_weight_system FROM table_20297668_1 WHERE wraps_per_inch__wpi_ = \"7 wpi\""}
{"context": "CREATE TABLE table_1805191_50 (district VARCHAR, party VARCHAR, first_elected VARCHAR)", "question": "What district first elected a Democratic incumbent in 1998?", "answer": "SELECT district FROM table_1805191_50 WHERE party = \"Democratic\" AND first_elected = 1998"}
{"context": "CREATE TABLE table_name_60 (avg_g INTEGER, name VARCHAR, gain VARCHAR)", "question": "Which Avg/G has a Name of david allen, and a Gain larger than 371?", "answer": "SELECT AVG(avg_g) FROM table_name_60 WHERE name = \"david allen\" AND gain > 371"}
{"context": "CREATE TABLE table_name_57 ( position INTEGER, points VARCHAR, drawn VARCHAR )", "question": "How many positions have 15 for the points, with a drawn less than 3?", "answer": "SELECT SUM(position) FROM table_name_57 WHERE points = 15 AND drawn < 3"}
{"context": "CREATE TABLE table_name_4 ( home VARCHAR, attendance VARCHAR, away VARCHAR )", "question": "Who was the home team when real juventud was the away team when there were more than 1189 in attendance?", "answer": "SELECT home FROM table_name_4 WHERE attendance > 1189 AND away = \"real juventud\""}
{"context": "CREATE TABLE table_1952065_4 ( teams_with_division_titles VARCHAR, division_championships VARCHAR )", "question": "How many division title teams were in the division championships 9 times?", "answer": "SELECT COUNT(teams_with_division_titles) FROM table_1952065_4 WHERE division_championships = 9"}
{"context": "CREATE TABLE table_29728596_2 ( away_team VARCHAR, competition VARCHAR, home_team VARCHAR )", "question": "Who were the away teams when the competition was the 1st republic of srpska football day and the home team was u 14 republic of srpska?", "answer": "SELECT away_team FROM table_29728596_2 WHERE competition = \"1st ``Republic of Srpska Football Day``\" AND home_team = \"U 14 Republic of Srpska\""}
{"context": "CREATE TABLE table_2104176_1 ( distinguished_service_cross VARCHAR, navy_cross VARCHAR )", "question": "What is the distinguished service cross when the navy cross is Coast Guard commendation medal?", "answer": "SELECT distinguished_service_cross FROM table_2104176_1 WHERE navy_cross = \"Coast Guard Commendation Medal\""}
{"context": "CREATE TABLE table_name_9 ( tckl VARCHAR, year VARCHAR, p_ko_ret VARCHAR )", "question": "What is the total of TCKL in 2000 with a P/KO RET less than 14?", "answer": "SELECT COUNT(tckl) FROM table_name_9 WHERE year = \"2000\" AND p_ko_ret < 14"}
{"context": "CREATE TABLE table_14312471_4 (ground VARCHAR, crowd VARCHAR)", "question": "What are the ground where the crowd totals 19929?", "answer": "SELECT ground FROM table_14312471_4 WHERE crowd = 19929"}
{"context": "CREATE TABLE table_name_38 ( population INTEGER, name_of_city VARCHAR )", "question": "What is the population of Chimbote?", "answer": "SELECT SUM(population) FROM table_name_38 WHERE name_of_city = \"chimbote\""}
{"context": "CREATE TABLE table_13762472_7 ( score VARCHAR, location_attendance VARCHAR )", "question": "What was the score when the heat played at charlotte arena?", "answer": "SELECT score FROM table_13762472_7 WHERE location_attendance = \"Charlotte Arena\""}
{"context": "CREATE TABLE table_25058269_1 (runner_up VARCHAR, season VARCHAR)", "question": "In season 2007\u201308 who is the runner-up?", "answer": "SELECT runner_up FROM table_25058269_1 WHERE season = \"2007\u201308\""}
{"context": "CREATE TABLE table_name_32 (transmission VARCHAR, trim VARCHAR)", "question": "What is the Removal that has a Trim of xe (2009)?", "answer": "SELECT transmission FROM table_name_32 WHERE trim = \"xe (2009)\""}
{"context": "CREATE TABLE table_2343740_1 (title VARCHAR, original_air_date VARCHAR)", "question": "What was the title of the episode that aired February 9, 1979?", "answer": "SELECT title FROM table_2343740_1 WHERE original_air_date = \"February 9, 1979\""}
{"context": "CREATE TABLE table_1876825_2 ( no_in_series VARCHAR, original_air_date VARCHAR )", "question": "Name the total number of series for march 19, 2000", "answer": "SELECT COUNT(no_in_series) FROM table_1876825_2 WHERE original_air_date = \"March 19, 2000\""}
{"context": "CREATE TABLE table_name_83 ( class VARCHAR, year VARCHAR, stages_won VARCHAR, vehicle VARCHAR )", "question": "What class is associated with 0 stages won, a hummer, and before 2009?", "answer": "SELECT class FROM table_name_83 WHERE stages_won = \"0\" AND vehicle = \"hummer\" AND year < 2009"}
{"context": "CREATE TABLE table_25920798_2 ( leader_battle VARCHAR, eliminated VARCHAR )", "question": "Name the leader battle for plamen", "answer": "SELECT leader_battle FROM table_25920798_2 WHERE eliminated = \"Plamen\""}
{"context": "CREATE TABLE table_name_51 (attendance INTEGER, game_site VARCHAR, date VARCHAR)", "question": "What is the largest attendance at Memorial Stadium on December 12, 1965?", "answer": "SELECT MAX(attendance) FROM table_name_51 WHERE game_site = \"memorial stadium\" AND date = \"december 12, 1965\""}
{"context": "CREATE TABLE table_name_95 ( colour_commentator_s_ VARCHAR, play_by_play VARCHAR )", "question": "Were the color commentators who worked with Bill Hewitt doing the play-by-play?", "answer": "SELECT colour_commentator_s_ FROM table_name_95 WHERE play_by_play = \"bill hewitt\""}
{"context": "CREATE TABLE table_26555737_1 (result VARCHAR, director VARCHAR)", "question": "When hany abu-assad category:articles with hcards is the director what is the result?", "answer": "SELECT result FROM table_26555737_1 WHERE director = \"Hany Abu-Assad Category:Articles with hCards\""}
{"context": "CREATE TABLE table_name_96 ( entered VARCHAR, finished VARCHAR )", "question": "What day did the celebrity who finished 4th enter?", "answer": "SELECT entered FROM table_name_96 WHERE finished = \"4th\""}
{"context": "CREATE TABLE table_27723228_8 (high_rebounds VARCHAR, game VARCHAR)", "question": "How many people are listed for high rebounds on game 30?", "answer": "SELECT COUNT(high_rebounds) FROM table_27723228_8 WHERE game = 30"}
{"context": "CREATE TABLE table_name_13 (australian_marquee VARCHAR, captain VARCHAR)", "question": "What Australian Marquee team is Michael Beauchamp a captain of?", "answer": "SELECT australian_marquee FROM table_name_13 WHERE captain = \"michael beauchamp\""}
{"context": "CREATE TABLE table_17257687_1 ( event_2 VARCHAR, event_1 VARCHAR )", "question": "What was event 2 when event 1 was Atlasphere?", "answer": "SELECT event_2 FROM table_17257687_1 WHERE event_1 = \"Atlasphere\""}
{"context": "CREATE TABLE table_name_87 ( d_48_\u221a VARCHAR, d_46_\u221a VARCHAR )", "question": "What is the D 48 with a D 46 with r 33 o?", "answer": "SELECT d_48_\u221a FROM table_name_87 WHERE d_46_\u221a = \"r 33 o\""}
{"context": "CREATE TABLE table_name_59 (party VARCHAR, name VARCHAR)", "question": "What is the party of Richard Simpson?", "answer": "SELECT party FROM table_name_59 WHERE name = \"richard simpson\""}
{"context": "CREATE TABLE table_name_15 ( city_of_license VARCHAR, frequency VARCHAR )", "question": "What is the city of license for the frequency 90.1 FM?", "answer": "SELECT city_of_license FROM table_name_15 WHERE frequency = \"90.1 fm\""}
{"context": "CREATE TABLE table_name_45 ( engine VARCHAR, chassis VARCHAR, rank VARCHAR )", "question": "What engine was used by the teams that used a Lola b02/00 chassis and ranked 1st?", "answer": "SELECT engine FROM table_name_45 WHERE chassis = \"lola b02/00\" AND rank = \"1st\""}
{"context": "CREATE TABLE table_name_93 (attendance INTEGER, round VARCHAR)", "question": "What is the highest attendance among Group E games?", "answer": "SELECT MAX(attendance) FROM table_name_93 WHERE round = \"group e\""}
{"context": "CREATE TABLE table_name_53 (gold VARCHAR, year VARCHAR, location VARCHAR)", "question": "Who got the gold in seoul before 2002?", "answer": "SELECT gold FROM table_name_53 WHERE year < 2002 AND location = \"seoul\""}
{"context": "CREATE TABLE table_name_3 ( margin INTEGER, round VARCHAR )", "question": "What is the average Margin that has a Round of 13. (h)?", "answer": "SELECT AVG(margin) FROM table_name_3 WHERE round = \"13. (h)\""}
{"context": "CREATE TABLE table_name_39 (fastest_lap VARCHAR, constructor VARCHAR, location VARCHAR)", "question": "Who ran the fastest lap in the team that competed in Zolder, in which Ferrari was the Constructor?", "answer": "SELECT fastest_lap FROM table_name_39 WHERE constructor = \"ferrari\" AND location = \"zolder\""}
{"context": "CREATE TABLE settlements (settlement_amount INTEGER)", "question": "What are the maximum and minimum settlement amount on record?", "answer": "SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements"}
{"context": "CREATE TABLE table_name_50 (quantity INTEGER, type VARCHAR, retired VARCHAR)", "question": "What is the lowest quantity of the 1b n2 type, which was retired in 1907-12?", "answer": "SELECT MIN(quantity) FROM table_name_50 WHERE type = \"1b n2\" AND retired = \"1907-12\""}
{"context": "CREATE TABLE Rooms (roomName VARCHAR, bedType VARCHAR, decor VARCHAR)", "question": "List the type of bed and name of all traditional rooms.", "answer": "SELECT roomName, bedType FROM Rooms WHERE decor = \"traditional\""}
{"context": "CREATE TABLE table_25740774_1 (f_laps VARCHAR, team VARCHAR)", "question": "How many flaps are there for the team march 3 racing (1-4) top speed racing team (5-12)?", "answer": "SELECT COUNT(f_laps) FROM table_25740774_1 WHERE team = \"March 3 Racing (1-4) Top Speed Racing team (5-12)\""}
{"context": "CREATE TABLE table_name_18 (frequency VARCHAR, format VARCHAR)", "question": "What is the frequency for the active rock format?", "answer": "SELECT frequency FROM table_name_18 WHERE format = \"active rock\""}
{"context": "CREATE TABLE table_11665016_2 (title VARCHAR, written_by VARCHAR)", "question": "Which episode was written by anthony e. zuiker & ken solarz", "answer": "SELECT title FROM table_11665016_2 WHERE written_by = \"Anthony E. Zuiker & Ken Solarz\""}
{"context": "CREATE TABLE table_name_36 ( score_in_the_final VARCHAR, date VARCHAR )", "question": "What was the score in the final on 14 august 1994?", "answer": "SELECT score_in_the_final FROM table_name_36 WHERE date = \"14 august 1994\""}
{"context": "CREATE TABLE table_name_98 ( sodium VARCHAR, rubidium VARCHAR )", "question": "what is the properties of sodium when rubidium is nacl (2.1)?", "answer": "SELECT sodium FROM table_name_98 WHERE rubidium = \"nacl (2.1)\""}
{"context": "CREATE TABLE table_name_16 ( opponent VARCHAR, result VARCHAR )", "question": "Which Opponent has a Result of l 24 3?", "answer": "SELECT opponent FROM table_name_16 WHERE result = \"l 24\u20133\""}
{"context": "CREATE TABLE table_name_59 (Id VARCHAR)", "question": "What is the 2003 value with 2r in 2008 and 1r in 2011?", "answer": "SELECT 2003 FROM table_name_59 WHERE 2008 = \"2r\" AND 2011 = \"1r\""}
{"context": "CREATE TABLE table_26914076_4 (directed_by VARCHAR, us_viewers__millions_ VARCHAR)", "question": "Who directed the episode that had 0.54 million U.S. viewers? ", "answer": "SELECT directed_by FROM table_26914076_4 WHERE us_viewers__millions_ = \"0.54\""}
{"context": "CREATE TABLE table_name_57 (team VARCHAR, points VARCHAR)", "question": "How much 1991-1992 has a Team of gimnasia de la plata, and more than 113 points?", "answer": "SELECT COUNT(1991 AS _1992) FROM table_name_57 WHERE team = \"gimnasia de la plata\" AND points > 113"}
{"context": "CREATE TABLE table_name_62 (size__steps_ INTEGER, interval_name VARCHAR)", "question": "Tell me the average size for minor third", "answer": "SELECT AVG(size__steps_) FROM table_name_62 WHERE interval_name = \"minor third\""}
{"context": "CREATE TABLE table_2417340_4 (successor VARCHAR, vacator VARCHAR, district VARCHAR)", "question": "What was the successor for vacant alabama 3rd?", "answer": "SELECT successor FROM table_2417340_4 WHERE vacator = \"Vacant\" AND district = \"Alabama 3rd\""}
{"context": "CREATE TABLE table_name_92 (winner VARCHAR, finalist VARCHAR)", "question": "Who was the winner against finalist Lina Krasnoroutskaya?", "answer": "SELECT winner FROM table_name_92 WHERE finalist = \"lina krasnoroutskaya\""}
{"context": "CREATE TABLE table_name_74 ( car__number VARCHAR, make VARCHAR, driver VARCHAR )", "question": "What is Mike Skinner's Chevrolet's Car #?", "answer": "SELECT COUNT(car__number) FROM table_name_74 WHERE make = \"chevrolet\" AND driver = \"mike skinner\""}
{"context": "CREATE TABLE table_name_73 ( school VARCHAR, indoor_track VARCHAR, soccer VARCHAR, tennis VARCHAR )", "question": "Which school has yes for soccer, tennis and indoor track.", "answer": "SELECT school FROM table_name_73 WHERE soccer = \"yes\" AND tennis = \"yes\" AND indoor_track = \"yes\""}
{"context": "CREATE TABLE table_name_63 (chip VARCHAR, frequency_ VARCHAR, mhz VARCHAR)", "question": "Tell me the chip with frequency larger than 10", "answer": "SELECT chip FROM table_name_63 WHERE frequency_[mhz] > 10"}
{"context": "CREATE TABLE table_25662434_1 (title VARCHAR, production_code VARCHAR)", "question": "How many titles had production code 1040?", "answer": "SELECT COUNT(title) FROM table_25662434_1 WHERE production_code = 1040"}
{"context": "CREATE TABLE table_14342210_14 ( touchdowns__5_points_ INTEGER, player VARCHAR )", "question": "How many touchdowns did Bruce Shorts make?", "answer": "SELECT MAX(touchdowns__5_points_) FROM table_14342210_14 WHERE player = \"Bruce Shorts\""}
{"context": "CREATE TABLE table_name_28 ( home_team VARCHAR, venue VARCHAR )", "question": "What team plays at home at Windy Hill?", "answer": "SELECT home_team FROM table_name_28 WHERE venue = \"windy hill\""}
{"context": "CREATE TABLE table_27986200_3 ( match_points VARCHAR, eliminated_from_competition VARCHAR )", "question": "What were the match points when Bordeaux-B gles was eliminated from competition?", "answer": "SELECT match_points FROM table_27986200_3 WHERE eliminated_from_competition = \"Bordeaux-B\u00e8gles\""}
{"context": "CREATE TABLE table_name_89 ( bronze INTEGER, total VARCHAR, rank VARCHAR, nation VARCHAR )", "question": "Which is the highest bronze at Chinese Taipei when the rank was higher than 5 and total was smaller than 1?", "answer": "SELECT MAX(bronze) FROM table_name_89 WHERE rank > 5 AND nation = \"chinese taipei\" AND total < 1"}
{"context": "CREATE TABLE entrepreneur ( Investor VARCHAR )", "question": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?", "answer": "SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor"}
{"context": "CREATE TABLE table_22319599_1 (team_name VARCHAR, school VARCHAR)", "question": "If the school is Rend Lake College, what is the team name?", "answer": "SELECT team_name FROM table_22319599_1 WHERE school = \"Rend Lake College\""}
{"context": "CREATE TABLE table_17058116_6 (record VARCHAR, team VARCHAR)", "question": "How many times did the team play charlotte?", "answer": "SELECT COUNT(record) FROM table_17058116_6 WHERE team = \"Charlotte\""}
{"context": "CREATE TABLE table_name_56 ( game VARCHAR, series VARCHAR )", "question": "What is the game number for series 4-2?", "answer": "SELECT COUNT(game) FROM table_name_56 WHERE series = \"4-2\""}
{"context": "CREATE TABLE table_name_11 (name VARCHAR, points VARCHAR, games VARCHAR, rank VARCHAR)", "question": "What is Name, when Games are less than 38, when Rank is less than 4, and when Points are 357?", "answer": "SELECT name FROM table_name_11 WHERE games < 38 AND rank < 4 AND points = 357"}
{"context": "CREATE TABLE entrepreneur (Id VARCHAR)", "question": "How many entrepreneurs are there?", "answer": "SELECT COUNT(*) FROM entrepreneur"}
{"context": "CREATE TABLE table_name_15 (year VARCHAR, label VARCHAR, type VARCHAR)", "question": "Name the Year which has a Label of atco records and a Type of album? Question 2", "answer": "SELECT year FROM table_name_15 WHERE label = \"atco records\" AND type = \"album\""}
{"context": "CREATE TABLE table_2468961_7 ( production_code VARCHAR, no_in_series VARCHAR )", "question": "When 137 is the number in series what is the production code?", "answer": "SELECT production_code FROM table_2468961_7 WHERE no_in_series = 137"}
{"context": "CREATE TABLE table_name_80 (no_result INTEGER, lost VARCHAR, _percentage_win_ VARCHAR, a_ VARCHAR)", "question": "What is the low no result with more than 5 loss and a win ration lesser than 58.06?", "answer": "SELECT MIN(no_result) FROM table_name_80 WHERE lost > 5 AND _percentage_win_[a_] < 58.06"}
{"context": "CREATE TABLE table_name_13 ( winning_driver VARCHAR, circuit VARCHAR )", "question": "Which Driver won the Circuit of Rio de Janeiro?", "answer": "SELECT winning_driver FROM table_name_13 WHERE circuit = \"rio de janeiro\""}
{"context": "CREATE TABLE table_1353096_2 ( station VARCHAR, city_of_license_market VARCHAR )", "question": "Which station has a license in Fort Collins, Colorado?", "answer": "SELECT station FROM table_1353096_2 WHERE city_of_license_market = \"Fort Collins, Colorado\""}
{"context": "CREATE TABLE table_name_64 ( writer_s_ VARCHAR, recorded_at VARCHAR, time VARCHAR )", "question": "Who wrote the album recorded at funhouse studios with a time of 3:27?", "answer": "SELECT writer_s_ FROM table_name_64 WHERE recorded_at = \"funhouse studios\" AND time = \"3:27\""}
{"context": "CREATE TABLE table_name_26 (home_team VARCHAR, away_team VARCHAR)", "question": "Who was North Melbourne's home opponent?", "answer": "SELECT home_team FROM table_name_26 WHERE away_team = \"north melbourne\""}
{"context": "CREATE TABLE table_1140082_2 (constructor VARCHAR, race VARCHAR)", "question": "What is the constructor of the Swedish Grand Prix?", "answer": "SELECT constructor FROM table_1140082_2 WHERE race = \"Swedish Grand Prix\""}
{"context": "CREATE TABLE table_name_74 (player VARCHAR, position VARCHAR, school_club_team VARCHAR)", "question": "What Utah Jazz Forward played for Southern Methodist?", "answer": "SELECT player FROM table_name_74 WHERE position = \"forward\" AND school_club_team = \"southern methodist\""}
{"context": "CREATE TABLE table_name_42 (martin VARCHAR, lanier VARCHAR)", "question": "What martin has a lanier of 6%?", "answer": "SELECT martin FROM table_name_42 WHERE lanier = \"6%\""}
{"context": "CREATE TABLE table_name_34 (venue VARCHAR, date VARCHAR)", "question": "WHAT IS THE VENUE ON MARCH 28, 2008?", "answer": "SELECT venue FROM table_name_34 WHERE date = \"march 28, 2008\""}
{"context": "CREATE TABLE table_name_30 (order__number VARCHAR, result VARCHAR, original_artist VARCHAR)", "question": "In what order were the Bee Gees as the artist when it was a result of bottom 3?", "answer": "SELECT order__number FROM table_name_30 WHERE result = \"bottom 3\" AND original_artist = \"bee gees\""}
{"context": "CREATE TABLE Cartoon (Written_by VARCHAR)", "question": "How many cartoons were written by \"Joseph Kuhr\"?", "answer": "SELECT COUNT(*) FROM Cartoon WHERE Written_by = \"Joseph Kuhr\""}
{"context": "CREATE TABLE table_15887683_6 ( country VARCHAR, television_service VARCHAR )", "question": "Name the country for sky primafila 7 hd", "answer": "SELECT country FROM table_15887683_6 WHERE television_service = \"Sky Primafila 7 HD\""}
{"context": "CREATE TABLE table_name_35 (surface VARCHAR, partner VARCHAR)", "question": "What was the surface for the game that was played with partner Tiya Rolle?", "answer": "SELECT surface FROM table_name_35 WHERE partner = \"tiya rolle\""}
{"context": "CREATE TABLE table_name_13 ( opponent VARCHAR, res VARCHAR, time VARCHAR )", "question": "Who is the opponent of the match with a win result and a time of 3:02?", "answer": "SELECT opponent FROM table_name_13 WHERE res = \"win\" AND time = \"3:02\""}
{"context": "CREATE TABLE table_name_18 (affiliation VARCHAR, district VARCHAR)", "question": "What is the affiliation for the Cuddalore District?", "answer": "SELECT affiliation FROM table_name_18 WHERE district = \"cuddalore district\""}
{"context": "CREATE TABLE table_name_77 ( wickets VARCHAR, average VARCHAR, runs VARCHAR, matches VARCHAR )", "question": "How many wickets have runs under 7531, matches over 44, and an average of 22.17?", "answer": "SELECT wickets FROM table_name_77 WHERE runs < 7531 AND matches > 44 AND average = 22.17"}
{"context": "CREATE TABLE table_1243601_1 (playoffs VARCHAR, year VARCHAR)", "question": "What was the playoff result in 2002?", "answer": "SELECT playoffs FROM table_1243601_1 WHERE year = \"2002\""}
{"context": "CREATE TABLE table_22043925_1 (school VARCHAR, location VARCHAR)", "question": "What is every school for the Adelaide location?", "answer": "SELECT school FROM table_22043925_1 WHERE location = \"Adelaide\""}
{"context": "CREATE TABLE table_name_34 ( club VARCHAR, stadium VARCHAR )", "question": "What club does the stadium stc krymteplitsia belong to?", "answer": "SELECT club FROM table_name_34 WHERE stadium = \"stc krymteplitsia\""}
{"context": "CREATE TABLE table_23696862_6 ( wsop_bracelets INTEGER )", "question": "What is the smallest amount of WSOP bracelets anyone had?", "answer": "SELECT MIN(wsop_bracelets) FROM table_23696862_6"}
{"context": "CREATE TABLE table_name_5 ( date VARCHAR, opponent VARCHAR )", "question": "What is the Date of the game against Christo Van Rensburg?", "answer": "SELECT date FROM table_name_5 WHERE opponent = \"christo van rensburg\""}
{"context": "CREATE TABLE table_name_75 (insurgents VARCHAR, civilians VARCHAR)", "question": "Name the insurgents for civilians being 49", "answer": "SELECT insurgents FROM table_name_75 WHERE civilians = \"49\""}
{"context": "CREATE TABLE table_59552 ( \"Rider\" text, \"Bike\" text, \"Laps\" real, \"Time\" text, \"Grid\" real )", "question": "What is the highest Laps, when Bike is 'Yamaha YZF-R1', when Rider is 'David Checa', and when Grid is greater than 18?", "answer": "SELECT MAX(\"Laps\") FROM table_59552 WHERE \"Bike\" = 'yamaha yzf-r1' AND \"Rider\" = 'david checa' AND \"Grid\" > '18'"}
{"context": "CREATE TABLE table_28014096_1 ( no_in_season INTEGER, production_code VARCHAR )", "question": "What is the number of this season's episode that had the production code 2t6206?", "answer": "SELECT MIN(no_in_season) FROM table_28014096_1 WHERE production_code = \"2T6206\""}
{"context": "CREATE TABLE table_name_11 ( lane INTEGER, rank INTEGER )", "question": "What are the total lanes that have a rank larger than 22?", "answer": "SELECT SUM(lane) FROM table_name_11 WHERE rank > 22"}
{"context": "CREATE TABLE table_name_10 (date VARCHAR, visitor VARCHAR)", "question": "What date was the game where the visiting team was philadelphia?", "answer": "SELECT date FROM table_name_10 WHERE visitor = \"philadelphia\""}
{"context": "CREATE TABLE table_name_95 (height VARCHAR, name VARCHAR)", "question": "What is Height, when Name is \"Manuela Zanchi\"?", "answer": "SELECT height FROM table_name_95 WHERE name = \"manuela zanchi\""}
{"context": "CREATE TABLE table_18042409_1 ( player VARCHAR, national_lacrosse_league VARCHAR )", "question": "List all of the NLL Toronto Rock players.", "answer": "SELECT player FROM table_18042409_1 WHERE national_lacrosse_league = \"Toronto Rock\""}
{"context": "CREATE TABLE table_name_34 ( incumbent VARCHAR, first_elected VARCHAR, district VARCHAR )", "question": "Who is the incumbent for the Oregon 5 District that was elected in 1996?", "answer": "SELECT incumbent FROM table_name_34 WHERE first_elected = 1996 AND district = \"oregon 5\""}
{"context": "CREATE TABLE table_1350350_2 ( rank INTEGER, per_capita_income VARCHAR )", "question": "what is the maximum rank with per capita income being $17,013", "answer": "SELECT MAX(rank) FROM table_1350350_2 WHERE per_capita_income = \"$17,013\""}
{"context": "CREATE TABLE table_name_70 (rank INTEGER, gold INTEGER)", "question": "What is the rank where the gold is 0?", "answer": "SELECT AVG(rank) FROM table_name_70 WHERE gold < 0"}
{"context": "CREATE TABLE table_name_56 (catalog VARCHAR, region VARCHAR)", "question": "What is the Catalog with a Region that is europe?", "answer": "SELECT catalog FROM table_name_56 WHERE region = \"europe\""}
{"context": "CREATE TABLE table_name_23 (crowd INTEGER, home_team VARCHAR)", "question": "What was the crowd number when the home team was Carlton?", "answer": "SELECT MIN(crowd) FROM table_name_23 WHERE home_team = \"carlton\""}
{"context": "CREATE TABLE table_name_15 (high_rebounds VARCHAR, date VARCHAR)", "question": "Who had the highest rebounds of the game on April 7?", "answer": "SELECT high_rebounds FROM table_name_15 WHERE date = \"april 7\""}
{"context": "CREATE TABLE table_name_60 (win_loss VARCHAR, win__percentage VARCHAR)", "question": "What is Win-Loss, when Win % is .456?", "answer": "SELECT win_loss FROM table_name_60 WHERE win__percentage = \".456\""}

93391
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

BIN
tokenizer.model (Stored with Git LFS) Normal file

Binary file not shown.

35
tokenizer_config.json Normal file
View File

@@ -0,0 +1,35 @@
{
"add_bos_token": true,
"add_eos_token": false,
"bos_token": {
"__type": "AddedToken",
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"clean_up_tokenization_spaces": false,
"eos_token": {
"__type": "AddedToken",
"content": "</s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
},
"legacy": false,
"model_max_length": 1000000000000000019884624838656,
"pad_token": null,
"padding_side": "right",
"sp_model_kwargs": {},
"tokenizer_class": "LlamaTokenizer",
"unk_token": {
"__type": "AddedToken",
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false
}
}