Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- text2text-generation
|
| 7 |
+
- sql
|
| 8 |
+
- text-to-sql
|
| 9 |
+
- gemma
|
| 10 |
+
- fine-tuned
|
| 11 |
+
- database
|
| 12 |
+
- nlp
|
| 13 |
+
base_model: google/gemma-7b
|
| 14 |
+
datasets:
|
| 15 |
+
- estu-research/sql-training-dataset
|
| 16 |
+
metrics:
|
| 17 |
+
- accuracy
|
| 18 |
+
- exact_match
|
| 19 |
+
library_name: transformers
|
| 20 |
+
pipeline_tag: text2text-generation
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# Gemma-7B SQL Expert (Fine-Tuned)
|
| 24 |
+
|
| 25 |
+
Fine-tuned version of Google's Gemma-7B model for converting natural language questions to SQL queries.
|
| 26 |
+
|
| 27 |
+
## Model Details
|
| 28 |
+
|
| 29 |
+
- **Base Model**: [google/gemma-7b](https://huggingface.co/google/gemma-7b)
|
| 30 |
+
- **Fine-tuned by**: ESTU Research Team (Kulalı, Aydın, Alhan, Fidan)
|
| 31 |
+
- **Institution**: Eskisehir Technical University
|
| 32 |
+
- **Project**: TÜBİTAK 2209-A Research
|
| 33 |
+
- **License**: MIT
|
| 34 |
+
- **Language**: English
|
| 35 |
+
- **Task**: Natural Language to SQL Translation
|
| 36 |
+
|
| 37 |
+
## Performance
|
| 38 |
+
|
| 39 |
+
- **Execution Accuracy**: 76.0%
|
| 40 |
+
- **Exact Match**: 65.4%
|
| 41 |
+
- **Average Latency**: 500ms
|
| 42 |
+
- **Model Size**: 14.1 GB (full) / 183 MB (LoRA adapters)
|
| 43 |
+
|
| 44 |
+
## Training Details
|
| 45 |
+
|
| 46 |
+
### Training Data
|
| 47 |
+
- **Dataset**: [estu-research/sql-training-dataset](https://huggingface.co/datasets/estu-research/sql-training-dataset)
|
| 48 |
+
- **Examples**: 1,000+ natural language to SQL pairs
|
| 49 |
+
- **Domain**: Sales database queries (customers, orders, products, employees)
|
| 50 |
+
|
| 51 |
+
### Training Configuration
|
| 52 |
+
```python
|
| 53 |
+
{
|
| 54 |
+
"base_model": "google/gemma-7b",
|
| 55 |
+
"method": "LoRA",
|
| 56 |
+
"rank": 16,
|
| 57 |
+
"alpha": 32,
|
| 58 |
+
"dropout": 0.05,
|
| 59 |
+
"target_modules": ["q_proj", "k_proj", "v_proj", "o_proj"],
|
| 60 |
+
"epochs": 3,
|
| 61 |
+
"batch_size": 8,
|
| 62 |
+
"learning_rate": 1.5e-4,
|
| 63 |
+
"training_time": "10.8 hours (A100 GPU)"
|
| 64 |
+
}
|