MRNH commited on
Commit
21f47c6
1 Parent(s): 6931cf1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pipeline_tag: text2text-generation
5
+ metrics:
6
+ - f1
7
+ tags:
8
+ - SQL
9
+ - plSQL
10
+ - english
11
+ ---
12
+
13
+ This is a fine-tuned version of T5 FLAN LARGE (783M) on English in particular on the public dataset spider for text-toSQL.
14
+
15
+ To initialize the model:
16
+
17
+
18
+ from transformers import T5ForConditionalGeneration
19
+ model = T5ForConditionalGeneration.from_pretrained("MRNH/flan-t5-large-PLsql")
20
+
21
+
22
+ Use the tokenizer:
23
+
24
+
25
+ tokenizer = T5ForConditionalGeneration.from_pretrained("MRNH/flan-t5-large-PLsql")
26
+
27
+ input = tokenizer("<question> "+sentence["db_id"]+" </question> "+sentence["question"],
28
+ text_target=sentence["query"], return_tensors='pt')
29
+
30
+ To generate text using the model:
31
+
32
+ output = model.generate(input["input_ids"],attention_mask=input["attention_mask"])
33
+
34
+ Training of the model is performed using the following loss computation based on the hidden state output h:
35
+
36
+ h.logits, h.loss = model(input_ids=input["input_ids"],
37
+ attention_mask=input["attention_mask"],
38
+ labels=input["labels"])