Skip to content

Code to implemnent a transformer model that converts natural text into SQL queries

Notifications You must be signed in to change notification settings

louisc-s/Text-to-SQL-Converter-with-Transformer-Architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text-to-SQL-Converter-with-Transformer-Architecture

Code to implemnent a transformer model that converts natural text into SQL queries

Overview

This code implements a complete transformer model (encoder + decoder) with a multihead attention mechanism. This model was trained using the "Clinton Text-to-SQL v1." dataset and produces a generative SQL query that corresponds to the natural text query, with SQL context, that was input.

Project Structure

  1. tokeniser.py - creates and trains sentencepiece tokeniser

  2. dataset.py - implements tokenised dataset

  3. decoder.py - implements transformer architecture

  4. train.py - trains the transformer using Clinton Text-to-SQL v1 dataset

  5. inference.py - generates output SQL query from input text and context

  6. constants.py - lists all the constants used across the modules

Author

Louis Chapo-Saunders

About

Code to implemnent a transformer model that converts natural text into SQL queries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages