Picard2 / README.md
SethCram's picture
copy picard space over
ca27738

A newer version of the Gradio SDK is available: 4.37.1

Upgrade
metadata
title: Picard
emoji: 🔥
colorFrom: indigo
colorTo: gray
sdk: gradio
sdk_version: 3.8.2
app_file: app.py
pinned: false

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

Training Data

The model has been fine-tuned on the 7000 training examples in the Spider text-to-SQL dataset. 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: \n [question] | [db_id] | [table] : [column] ( [content] , [content] ) , [column] ( ... ) , [...] | [table] : ... | ... \n The model outputs the database identifier and the SQL query that will be executed on the database to answer the user's question: \n [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.