t5_wikisql_SQL2en / README.md
dbernsohn's picture
Update README.md
5ce0610
|
raw
history blame
864 Bytes

t5_wikisql_SQL2en

This is the checkpoint for t5_wikisql_SQL2en after being fine-tunedon the wikisql dataset on t5-small.

The model can be loaded like so:

from transformers import AutoModelWithLMHead, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("t5-small")
model = AutoModelWithLMHead.from_pretrained("/content/model")

You can then use this model to translate SQL queries into plain english.

input_text = f"translate English to SQL: {query} </s>"
features = tokenizer([input_text], return_tensors='pt')

output = model.generate(input_ids=features['input_ids'], 
                        attention_mask=features['attention_mask'])

tokenizer.decode(output[0])

The whole training process and hyperparameters are in my []GitHub repo] (https://github.com/DorBernsohn)