File size: 3,194 Bytes
63f35be 3ba09b4 49b4de1 3ba09b4 0419616 0eead44 49b4de1 3ba09b4 d983693 3ba09b4 9fa1255 1c6adf4 9fa1255 3ba09b4 7bf9d54 3ba09b4 7bf9d54 3ba09b4 eab0a8c 3ba09b4 c274c80 3ba09b4 0419616 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
---
license: apache-2.0
tags:
- generated_from_trainer
- translation_to_sql
- sql
model-index:
- name: Ita2SqlModel
results: []
datasets:
- OMazzuzi90/Ita2Sql_data_train
language:
- it
- sql
pipeline_tag: translation
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# Ita2SqlModel
This model is a fine-tuned version of [t5-small](https://huggingface.co/t5-small) on [OMazzuzi90/Ita2Sql_data_train](https://huggingface.co/datasets/OMazzuzi90/Ita2Sql_data_train). dataset.
The following model is created with the aim of verifying if it is possible to translate the Italian language into SQL script.
The model is trained on a self-created dataset that associates various Italian sentences with a SQL script, in which synonyms are used.
For Example the script SELECT * FROM CLIENTI, in Italian it could be expressed by the following sentences:
- "MOSTRAMI TUTTI I CLIENTI"
- "VISUALIZZA TUTTI I CLIENTI"
- "SELEZIONA TUTTI I CLIENTI"
Clearly, with a much larger and more comprehensive dataset, for instance, one that includes all possible synonyms of an Italian verb, the model would be capable of being significantly more accurate. Currently, the dataset consists of about 21k rows.
## Model description
The model takes uppercase sentences as input, with the prefix "TRANSLATE ITA TO SQL: " followed by the phrase that you want to try to translate.
Here are some functional and usable examples:
TRANSLATE ITA TO SQL: MOSTRAMI TUTTI I [TABLE]
Ex:
TRANSLATE ITA TO SQL: MOSTRAMI TUTTI I CLIENTI
SELECT * FROM CLIENTI
TRANSLATE ITA TO SQL: MOSTRAMI [COLUMN] DEI [TABLE]
Ex:
TRANSLATE ITA TO SQL: MOSTRAMI NOME DEI CLIENTI
SELECT NOME FROM CLIENTI
TRANSLATE ITALIAN TO SQL: MOSTRAMI [COLUMN] DEI [TABLE] QUANDO [COLUMN] COMPRESA TRA [PARAM1] E [PARAM2]
Ex:
TRANSLATE ITALIAN TO SQL: MOSTRAMI NOME DEI CLIENTI QUANDO ETA COMPRESA TRA 18 E 23
SELECT NOME FROM CLIENTI WHERE ETA BETWEEN 18 AND 23
TRANSLATE ITALIAN TO SQL: MOSTRAMI [COLUMN1],[COLUMN2] DEI [TABLE] QUANDO [COLUMNI] UGUALE [PARAM]
Ex:
TRANSLATE ITALIAN TO SQL: MOSTRAMI NOME,COGNOME DEI GIOCATORI QUANDO SQUADRA UGUALE INTER
SELECT NOME,COGNOME FROM CLIENTI WHERE SQUADRA =’INTER’
TRANSLATE ITALIAN TO SQL: FAMMI VEDERE [COLUMN1],[COLUMN2],[COLUMNX] DEI [TABLE] QUANDO [COLUM] UGUALE [PARAM1] OPPURE [PARAM2]
Ex :
TRANSLATE ITALIAN TO SQL: MOSTRAMI NOME,COGNOME,ID,ETA DEI CLIENTI QUANDO NOME UGUALE ALESSIO OPPURE MARCO
SELECT NOME,COGNOME,ID,ETA FROM CLIENTI WHERE NOME =’ALESSIO’ OR NOME=’MARCO'
## Intended uses & limitations
More information needed
## Training and evaluation data
You can see https://huggingface.co/OMazzuzi90/Ita2SqlModel/tensorboard for more details.
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 11
### Framework versions
- Transformers 4.28.0
- Pytorch 2.0.1+cu118
- Datasets 2.12.0
- Tokenizers 0.13.3 |