Downloads · 30 days
15
3% of all-time downloads
tdoehmen/t5-schemapile-fk
t5-schemapile-fk is a machine learning model from tdoehmen. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as cc-by-4.0.
In this repository we are introducing t5-schemapile-fk. It's a language model, based on google-t5/t5-base fine-tuned for predicting foreign key relationships in relational database schemas.
Downloads · 30 days
15
3% of all-time downloads
All-time downloads
587
Public
Repo size
2.7 GB
Likes
2
Public
Click a slice to open those files.
.bin892 MB · 100%
From the Hugging Face model README
In this repository we are introducing t5-schemapile-fk. It's a language model, based on google-t5/t5-base fine-tuned for predicting foreign key relationships in relational database schemas.
Forein key pairs extracted from SchemaPile-Perm, a large collection of relational database schemas.
We evaluate the foreign key detection accuracy of starcoder-schemapile-fk and t5-schemapile-fk on schemas from Spider, BIRD-SQL, and CTU PRLR.
<img src="https://cdn-uploads.huggingface.co/production/uploads/616ea71919594606318887e9/6ouh4u6PFQlY8prLrAm4l.png" alt="eval" width="400"/>The model was trained using the following hyperparamters:
See Training Code.
We recommend using the following prompt template:
Example Prompt:
You are given the following SQL database tables:
staff(staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff)
addresses(address_id, line_1_number_building, city, zip_postcode, state_province_county, country)
Output a json string with the following schema {table, column, referencedTable, referencedColumn} that contains the foreign key relationship between the two tables.
Example Output:
{'table': 'staff',
'column': 'staff_address_id',
'referencedTable': 'addresses',
'referencedColumn': 'address_id'}
To run the model locally, we recommend using our end-to-end Example Notebook.