đ tscholak/cxmefzzi
Fine-tuned weights for PICARD - Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models based on T5-3B, aiming to solve the text-to-SQL translation task.
đ Quick Start
This model is fine - tuned based on T5 - 3B to handle the text - to - SQL translation task. It can generalize to unseen SQL databases, solving Spider's zero - shot text - to - SQL translation problem.
⨠Features
- Generalization: Capable of generalizing to unseen SQL databases, solving Spider's zero - shot text - to - SQL translation task.
- High Performance: Achieves high exact - set match accuracy and execution accuracy on both the development and test sets of the Spider dataset.
- Improvement with PICARD: Performance can be further improved using the PICARD constrained decoding method.
đĻ Installation
No specific installation steps are provided in the original README. So, this section is skipped.
đģ Usage Examples
No code examples are provided in the original README. So, this section is skipped.
đ Documentation
Training Data
The model has been fine - tuned on the 7000 training examples in the [Spider text - to - SQL dataset](https://yale - lily.github.io/spider). The model solves Spider's zero - shot text - to - SQL translation task, and that means that it can generalize to unseen SQL databases.
Training Objective
This model was initialized with T5 - 3B and fine - tuned with the text - to - text generation objective.
Questions are always grounded in a database schema, and the model is trained to predict the SQL query that would be used to answer the question. The input to the model is composed of the user's natural language question, the database identifier, and a list of tables and their columns:
[question] | [db_id] | [table] : [column] ( [content] , [content] ) , [column] ( ... ) , [...] | [table] : ... | ...
The model outputs the database identifier and the SQL query that will be executed on the database to answer the user's question:
[db_id] | [sql]
Performance
Out of the box, this model achieves 71.5 % exact - set match accuracy and 74.4 % execution accuracy on the Spider development set. On the test set, the model achieves 68.0 % exact - set match accuracy and 70.1 % execution accuracy.
Using the PICARD constrained decoding method (see the official PICARD implementation), the model's performance can be improved to 75.5 % exact - set match accuracy and 79.3 % execution accuracy on the Spider development set. On the test set and with PICARD, the model achieves 71.9 % exact - set match accuracy and 75.1 % execution accuracy.
Usage
Please see the official repository for scripts and docker images that support evaluation and serving of this model.
References
- PICARD - Parsing Incrementally for Constrained Auto - Regressive Decoding from Language Models
- Official PICARD code
Citation
@inproceedings{Scholak2021:PICARD,
author = {Torsten Scholak and Nathan Schucher and Dzmitry Bahdanau},
title = "{PICARD}: Parsing Incrementally for Constrained Auto - Regressive Decoding from Language Models",
booktitle = "Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing",
month = nov,
year = "2021",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2021.emnlp - main.779",
pages = "9895--9901",
}
đ License
This project is licensed under the [Apache - 2.0](https://www.apache.org/licenses/LICENSE - 2.0) license.