ByteForge commited on
Commit
b0751c5
1 Parent(s): bcb09f3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -2
README.md CHANGED
@@ -61,7 +61,7 @@ The following hyperparameters were used during training:
61
  from transformers import AutoTokenizer, AutoModelForCausalLM
62
  import torch
63
 
64
- model_id = "SagarKrishna/Llama_3_8b_Instruct_Text2Sql_FullPrecision_Finetuned"
65
 
66
  tokenizer = AutoTokenizer.from_pretrained(model_id)
67
 
@@ -71,10 +71,50 @@ model = AutoModelForCausalLM.from_pretrained(
71
  device_map="auto",
72
  )
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
  messages = [
76
  {"role": "system", "content": "You are an text to SQL query translator. Users will ask you questions in English and you will generate a SQL query based on the provided SCHEMA.\nSCHEMA:\nCREATE TABLE match_season (College VARCHAR, POSITION VARCHAR)"},
77
- {"role": "user", "content": "Which college have both players with position midfielder and players with position defender?"},
78
  ]
79
 
80
  input_ids = tokenizer.apply_chat_template(
 
61
  from transformers import AutoTokenizer, AutoModelForCausalLM
62
  import torch
63
 
64
+ model_id = "ByteForge/Llama_3_8b_Instruct_Text2Sql_FullPrecision_Finetuned"
65
 
66
  tokenizer = AutoTokenizer.from_pretrained(model_id)
67
 
 
71
  device_map="auto",
72
  )
73
 
74
+ prompt="""
75
+ CREATE TABLE stadium (
76
+ stadium_id number,
77
+ location text,
78
+ name text,
79
+ capacity number,
80
+ highest number,
81
+ lowest number,
82
+ average number
83
+ )
84
+
85
+ CREATE TABLE singer (
86
+ singer_id number,
87
+ name text,
88
+ country text,
89
+ song_name text,
90
+ song_release_year text,
91
+ age number,
92
+ is_male others
93
+ )
94
+
95
+ CREATE TABLE concert (
96
+ concert_id number,
97
+ concert_name text,
98
+ theme text,
99
+ stadium_id text,
100
+ year text
101
+ )
102
+
103
+ CREATE TABLE singer_in_concert (
104
+ concert_id number,
105
+ singer_id text
106
+ )
107
+
108
+ -- Using valid SQLite, answer the following questions for the tables provided above.
109
+
110
+ -- What is the maximum, the average, and the minimum capacity of stadiums ? (Generate 1 Sql query. No explaination needed)
111
+
112
+ answer:
113
+ """
114
 
115
  messages = [
116
  {"role": "system", "content": "You are an text to SQL query translator. Users will ask you questions in English and you will generate a SQL query based on the provided SCHEMA.\nSCHEMA:\nCREATE TABLE match_season (College VARCHAR, POSITION VARCHAR)"},
117
+ {"role": "user", "content": prompt},
118
  ]
119
 
120
  input_ids = tokenizer.apply_chat_template(