arxiv:2305.07372 license:mit region:us
---
license: mit
---
We train a **text-to-clause** model for SQL generation. 
Given a natural language description as input, the model outputs the SQL clause (e.g., WHERE student.age > 18) instead of the entire SQL query.

**modelS.tar.gz** includes our best checkpoint. Please refer below information for more details.

| Type | Examples |
| -------- | ------- |
| Application | Microsoft SQL Server, PostgreSQL, SQLite |
| Language | C++, Java, Python, Rust |
| Library | PyTorch, AllenNLP |
| License | MIT License |
| Decoding Architecture | Transformer + RAT-SQL + rule-based |
| Layers | 24 Transformer layers + 8 RAT-SQL layers|
| Tree representation | 8 heads & dimensionality 256 |
| Dataset | 83K synthetic dataset |
| Optimizer | Adam |
| Learning rate | 1.8e-4 |
| Dropout rate | 0.1 |
| Operating System | Linux, macOS, Windows |


# Model Details

Paper: [https://arxiv.org/abs/2305.07372](https://arxiv.org/abs/2305.07372)

Code: [https://github.com/magic-YuanTian/STEPS](https://github.com/magic-YuanTian/STEPS)

Dataset: [https://drive.google.com/file/d/1f1fnJK2vGuRpaQOeMlBD10tQMDH3dR83/view?pli=1](https://drive.google.com/file/d/1f1fnJK2vGuRpaQOeMlBD10tQMDH3dR83/view?pli=1)


