Update README.md
Browse files
README.md
CHANGED
|
@@ -4,4 +4,46 @@ datasets:
|
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
- llama
|
| 7 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
tags:
|
| 6 |
- llama
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
Sure, here's an updated version of the model card with the inclusion of hypothetical performance metrics for the fine-tuned Llama 2 model:
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Model Card: Fine-tuning Llama 2 for AI2SQL Query Generation
|
| 14 |
+
|
| 15 |
+
This model card outlines the fine-tuning of the Llama 2 model to generate SQL queries for AI2SQL tasks.
|
| 16 |
+
|
| 17 |
+
## Model Details
|
| 18 |
+
- **Original Model:** NousResearch/Llama-2-7b-chat-hf
|
| 19 |
+
- **Model Type:** Large Language Model
|
| 20 |
+
- **Fine-tuning Task:** AI2SQL (SQL Query Generation)
|
| 21 |
+
- **Fine-tuned Model Name:** llama-2-7b-miniguanaco
|
| 22 |
+
|
| 23 |
+
## Implementation
|
| 24 |
+
- **Environment Requirement:** GPU-supported platform with minimum 20GB RAM.
|
| 25 |
+
- **Dependencies:** accelerate==0.21.0, peft==0.4.0, bitsandbytes==0.40.2, transformers==4.31.0, trl==0.4.7
|
| 26 |
+
- **GPU Specification:** T4 or equivalent (as of 24 Aug 2023)
|
| 27 |
+
|
| 28 |
+
## Training Details
|
| 29 |
+
- **Dataset:** WikiSQL
|
| 30 |
+
- **Method:** Supervised Fine-Tuning (SFT)
|
| 31 |
+
- **Epochs:** 1
|
| 32 |
+
- **Batch Size:** 4 per GPU
|
| 33 |
+
- **Optimization:** AdamW with cosine learning rate schedule
|
| 34 |
+
- **Learning Rate:** 2e-4
|
| 35 |
+
- **Special Features:**
|
| 36 |
+
- LoRA for efficient parameter adjustment.
|
| 37 |
+
- 4-bit precision model loading with BitsAndBytes.
|
| 38 |
+
- Gradient checkpointing and clipping.
|
| 39 |
+
|
| 40 |
+
## Performance Metrics
|
| 41 |
+
- **Accuracy:** 85% (on a held-out test set from WikiSQL)
|
| 42 |
+
- **Query Generation Time:** Average of 0.5 seconds per query
|
| 43 |
+
- **Resource Efficiency:** Demonstrates 30% reduced memory usage compared to the base model
|
| 44 |
+
|
| 45 |
+
## Usage and Applications
|
| 46 |
+
TBD
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
Note: The performance metrics provided here are hypothetical and for illustrative purposes only. Actual performance would depend on various factors, including the specifics of the dataset and training regimen.
|