Description: SQL generation given a table and question
Original dataset: https://huggingface.co/datasets/wikisql
---
Try querying this adapter for free in Lora Land at https://predibase.com/lora-land!
The adapter_category is Reasoning and the name is WikiSQL (SQL Generation)
---
Sample input: Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query.\n### Database Schema: {'header': ['Game', 'Date', 'Opponent', 'Score', 'Decision', 'Location/Attendance', 'Record'], 'types': ['real', 'real', 'text', 'text', 'text', 'text', 'text'], 'rows': [array(['77', '1', 'Pittsburgh Penguins', '1-6', 'Brodeur',
'Mellon Arena - 17,132', '47-26-4'], dtype=object), array(['78', '3', 'Tampa Bay Lightning', '4-5 (OT)', 'Brodeur',
'Prudential Center - 17,625', '48-26-4'], dtype=object), array(['79', '4', 'Buffalo Sabres', '3-2', 'Brodeur',
'HSBC Arena - 18,690', '49-26-4'], dtype=object), array(['80', '7', 'Toronto Maple Leafs', '4-1', 'Brodeur',
'Prudential Center - 15,046', '49-27-4'], dtype=object), array(['81', '9', 'Ottawa Senators', '3-2 (SO)', 'Brodeur',
'Scotiabank Place - 20,151', '50-27-4'], dtype=object), array(['82', '11', 'Carolina Hurricanes', '2-3', 'Brodeur',
'Prudential Center - 17,625', '51-27-4'], dtype=object)]}\n### Query: What is Score, when Game is greater than 78, and when Date is "4"?\n### SQL:
---
Sample output: SELECT Score FROM table WHERE Game > 78 AND Date = 4
---
Try using this adapter yourself!
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "mistralai/Mistral-7B-v0.1"
peft_model_id = "predibase/wikisql"
model = AutoModelForCausalLM.from_pretrained(model_id)
model.load_adapter(peft_model_id)
- Downloads last month
- 763
Model tree for predibase/wikisql
Base model
mistralai/Mistral-7B-v0.1