Improve language tag
#2
by
lbourdois
- opened
README.md
CHANGED
|
@@ -1,314 +1,326 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
language:
|
| 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 |
-
### Model
|
| 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 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
`
|
| 160 |
-
`
|
| 161 |
-
`
|
| 162 |
-
`
|
| 163 |
-
`
|
| 164 |
-
`
|
| 165 |
-
`
|
| 166 |
-
`
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
`
|
| 172 |
-
`
|
| 173 |
-
`
|
| 174 |
-
`
|
| 175 |
-
`
|
| 176 |
-
`
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
`
|
| 183 |
-
`NAME` varchar(50) NOT NULL,
|
| 184 |
-
`
|
| 185 |
-
`
|
| 186 |
-
`
|
| 187 |
-
`
|
| 188 |
-
`
|
| 189 |
-
`
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
`
|
| 195 |
-
`
|
| 196 |
-
`
|
| 197 |
-
`
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
`
|
| 202 |
-
`
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
`
|
| 207 |
-
`
|
| 208 |
-
`
|
| 209 |
-
`
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
`
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
`
|
| 219 |
-
`
|
| 220 |
-
`
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
- **
|
| 251 |
-
-
|
| 252 |
-
-
|
| 253 |
-
-
|
| 254 |
-
-
|
| 255 |
-
-
|
| 256 |
-
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
-
|
| 284 |
-
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
- **
|
| 296 |
-
- **
|
| 297 |
-
|
| 298 |
-
##
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- zho
|
| 5 |
+
- eng
|
| 6 |
+
- fra
|
| 7 |
+
- spa
|
| 8 |
+
- por
|
| 9 |
+
- deu
|
| 10 |
+
- ita
|
| 11 |
+
- rus
|
| 12 |
+
- jpn
|
| 13 |
+
- kor
|
| 14 |
+
- vie
|
| 15 |
+
- tha
|
| 16 |
+
- ara
|
| 17 |
+
base_model:
|
| 18 |
+
- Qwen/Qwen2.5-1.5B-Instruct
|
| 19 |
+
pipeline_tag: text2text-generation
|
| 20 |
+
library_name: transformers
|
| 21 |
+
tags:
|
| 22 |
+
- Text-To-SQL
|
| 23 |
+
- Arabic
|
| 24 |
+
- Spider
|
| 25 |
+
- SQL
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
# Model Card for Arabic Text-To-SQL (OsamaMo)
|
| 29 |
+
|
| 30 |
+
## Model Details
|
| 31 |
+
|
| 32 |
+
### Model Description
|
| 33 |
+
|
| 34 |
+
This model is fine-tuned on the Spider dataset with Arabic-translated questions for the Text-To-SQL task. It is based on **Qwen/Qwen2.5-1.5B-Instruct** and trained using LoRA on Kaggle for 15 hours on a **P100 8GB GPU**.
|
| 35 |
+
|
| 36 |
+
- **Developed by:** Osama Mohamed ([OsamaMo](https://huggingface.co/OsamaMo))
|
| 37 |
+
- **Funded by:** Self-funded
|
| 38 |
+
- **Shared by:** Osama Mohamed
|
| 39 |
+
- **Model type:** Text-to-SQL fine-tuned model
|
| 40 |
+
- **Language(s):** Arabic (ar)
|
| 41 |
+
- **License:** MIT
|
| 42 |
+
- **Finetuned from:** Qwen/Qwen2.5-1.5B-Instruct
|
| 43 |
+
|
| 44 |
+
### Model Sources
|
| 45 |
+
|
| 46 |
+
- **Repository:** [Hugging Face Model Hub](https://huggingface.co/OsamaMo/Arabic_Text-To-SQL)
|
| 47 |
+
- **Dataset:** Spider (translated to Arabic)
|
| 48 |
+
- **Training Script:** [LLaMA-Factory](https://github.com/huggingface/transformers/tree/main/src/transformers/models/llama_factory)
|
| 49 |
+
|
| 50 |
+
## Uses
|
| 51 |
+
|
| 52 |
+
### Direct Use
|
| 53 |
+
|
| 54 |
+
This model is intended for converting **Arabic natural language questions** into SQL queries. It can be used for database querying in Arabic-speaking applications.
|
| 55 |
+
|
| 56 |
+
### Downstream Use
|
| 57 |
+
|
| 58 |
+
Can be fine-tuned further for specific databases or Arabic dialect adaptations.
|
| 59 |
+
|
| 60 |
+
### Out-of-Scope Use
|
| 61 |
+
|
| 62 |
+
- The model is **not** intended for direct execution of SQL queries.
|
| 63 |
+
- Not recommended for non-database-related NLP tasks.
|
| 64 |
+
|
| 65 |
+
## Bias, Risks, and Limitations
|
| 66 |
+
|
| 67 |
+
- The model might generate incorrect or non-optimized SQL queries.
|
| 68 |
+
- Bias may exist due to dataset translations and model pretraining data.
|
| 69 |
+
|
| 70 |
+
### Recommendations
|
| 71 |
+
|
| 72 |
+
- Validate generated SQL queries before execution.
|
| 73 |
+
- Ensure compatibility with specific database schemas.
|
| 74 |
+
|
| 75 |
+
## How to Get Started with the Model
|
| 76 |
+
### Load Model
|
| 77 |
+
```python
|
| 78 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 79 |
+
import torch
|
| 80 |
+
import re
|
| 81 |
+
|
| 82 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 83 |
+
base_model_id = "Qwen/Qwen2.5-1.5B-Instruct"
|
| 84 |
+
finetuned_model_id = "OsamaMo/Arabic_Text-To-SQL_using_Qwen2.5-1.5B"
|
| 85 |
+
|
| 86 |
+
# Load the base model and adapter for fine-tuning
|
| 87 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 88 |
+
base_model_id,
|
| 89 |
+
device_map="auto",
|
| 90 |
+
torch_dtype=torch.bfloat16
|
| 91 |
+
)
|
| 92 |
+
model.load_adapter(finetuned_model_id)
|
| 93 |
+
|
| 94 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
|
| 95 |
+
|
| 96 |
+
def generate_resp(messages):
|
| 97 |
+
text = tokenizer.apply_chat_template(
|
| 98 |
+
messages,
|
| 99 |
+
tokenize=False,
|
| 100 |
+
add_generation_prompt=True
|
| 101 |
+
)
|
| 102 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(device)
|
| 103 |
+
generated_ids = model.generate(
|
| 104 |
+
model_inputs.input_ids,
|
| 105 |
+
max_new_tokens=1024,
|
| 106 |
+
do_sample=False, temperature= False,
|
| 107 |
+
)
|
| 108 |
+
generated_ids = [
|
| 109 |
+
output_ids[len(input_ids):]
|
| 110 |
+
for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 111 |
+
]
|
| 112 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 113 |
+
return response
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
### Example Usage
|
| 119 |
+
```python
|
| 120 |
+
|
| 121 |
+
# Production-ready system message for SQL generation
|
| 122 |
+
system_message = (
|
| 123 |
+
"You are a highly advanced Arabic text-to-SQL converter. Your mission is to Understand first the db schema and reltions between it and then accurately transform Arabic "
|
| 124 |
+
"natural language queries into SQL queries with precision and clarity.\n"
|
| 125 |
+
)
|
| 126 |
+
|
| 127 |
+
def get_sql_query(db_schema, arabic_query):
|
| 128 |
+
# Construct the instruction message including the DB schema and the Arabic query
|
| 129 |
+
instruction_message = "\n".join([
|
| 130 |
+
"## DB-Schema:",
|
| 131 |
+
db_schema,
|
| 132 |
+
"",
|
| 133 |
+
"## User-Prompt:",
|
| 134 |
+
arabic_query,
|
| 135 |
+
"# Output SQL:",
|
| 136 |
+
"```SQL"
|
| 137 |
+
])
|
| 138 |
+
|
| 139 |
+
messages = [
|
| 140 |
+
{"role": "system", "content": system_message},
|
| 141 |
+
{"role": "user", "content": instruction_message}
|
| 142 |
+
]
|
| 143 |
+
|
| 144 |
+
response = generate_resp(messages)
|
| 145 |
+
|
| 146 |
+
# Extract the SQL query from the response using a regex to capture text within the ```sql markdown block
|
| 147 |
+
match = re.search(r"```sql\s*(.*?)\s*```", response, re.DOTALL | re.IGNORECASE)
|
| 148 |
+
if match:
|
| 149 |
+
sql_query = match.group(1).strip()
|
| 150 |
+
return sql_query
|
| 151 |
+
else:
|
| 152 |
+
return response.strip()
|
| 153 |
+
|
| 154 |
+
# Example usage:
|
| 155 |
+
example_db_schema = r'''{
|
| 156 |
+
'Pharmcy':
|
| 157 |
+
CREATE TABLE `purchase` (
|
| 158 |
+
`BARCODE` varchar(20) NOT NULL,
|
| 159 |
+
`NAME` varchar(50) NOT NULL,
|
| 160 |
+
`TYPE` varchar(20) NOT NULL,
|
| 161 |
+
`COMPANY_NAME` varchar(20) NOT NULL,
|
| 162 |
+
`QUANTITY` int NOT NULL,
|
| 163 |
+
`PRICE` double NOT NULL,
|
| 164 |
+
`AMOUNT` double NOT NULL,
|
| 165 |
+
PRIMARY KEY (`BARCODE`),
|
| 166 |
+
KEY `fkr3` (`COMPANY_NAME`),
|
| 167 |
+
CONSTRAINT `fkr3` FOREIGN KEY (`COMPANY_NAME`) REFERENCES `company` (`NAME`) ON DELETE CASCADE ON UPDATE CASCADE
|
| 168 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
| 169 |
+
|
| 170 |
+
CREATE TABLE `sales` (
|
| 171 |
+
`BARCODE` varchar(20) NOT NULL,
|
| 172 |
+
`NAME` varchar(50) NOT NULL,
|
| 173 |
+
`TYPE` varchar(10) NOT NULL,
|
| 174 |
+
`DOSE` varchar(10) NOT NULL,
|
| 175 |
+
`QUANTITY` int NOT NULL,
|
| 176 |
+
`PRICE` double NOT NULL,
|
| 177 |
+
`AMOUNT` double NOT NULL,
|
| 178 |
+
`DATE` varchar(15) NOT NULL
|
| 179 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
| 180 |
+
|
| 181 |
+
CREATE TABLE `users` (
|
| 182 |
+
`ID` int NOT NULL,
|
| 183 |
+
`NAME` varchar(50) NOT NULL,
|
| 184 |
+
`DOB` varchar(20) NOT NULL,
|
| 185 |
+
`ADDRESS` varchar(100) NOT NULL,
|
| 186 |
+
`PHONE` varchar(20) NOT NULL,
|
| 187 |
+
`SALARY` double NOT NULL,
|
| 188 |
+
`PASSWORD` varchar(20) NOT NULL,
|
| 189 |
+
PRIMARY KEY (`ID`)
|
| 190 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
| 191 |
+
|
| 192 |
+
CREATE TABLE `history_sales` (
|
| 193 |
+
`USER_NAME` varchar(20) NOT NULL,
|
| 194 |
+
`BARCODE` varchar(20) NOT NULL,
|
| 195 |
+
`NAME` varchar(50) NOT NULL,
|
| 196 |
+
`TYPE` varchar(10) NOT NULL,
|
| 197 |
+
`DOSE` varchar(10) NOT NULL,
|
| 198 |
+
`QUANTITY` int NOT NULL,
|
| 199 |
+
`PRICE` double NOT NULL,
|
| 200 |
+
`AMOUNT` double NOT NULL,
|
| 201 |
+
`DATE` varchar(15) NOT NULL,
|
| 202 |
+
`TIME` varchar(20) NOT NULL
|
| 203 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
| 204 |
+
|
| 205 |
+
CREATE TABLE `expiry` (
|
| 206 |
+
`PRODUCT_NAME` varchar(50) NOT NULL,
|
| 207 |
+
`PRODUCT_CODE` varchar(20) NOT NULL,
|
| 208 |
+
`DATE_OF_EXPIRY` varchar(10) NOT NULL,
|
| 209 |
+
`QUANTITY_REMAIN` int NOT NULL
|
| 210 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
| 211 |
+
|
| 212 |
+
CREATE TABLE `drugs` (
|
| 213 |
+
`NAME` varchar(50) NOT NULL,
|
| 214 |
+
`TYPE` varchar(20) NOT NULL,
|
| 215 |
+
`BARCODE` varchar(20) NOT NULL,
|
| 216 |
+
`DOSE` varchar(10) NOT NULL,
|
| 217 |
+
`CODE` varchar(10) NOT NULL,
|
| 218 |
+
`COST_PRICE` double NOT NULL,
|
| 219 |
+
`SELLING_PRICE` double NOT NULL,
|
| 220 |
+
`EXPIRY` varchar(20) NOT NULL,
|
| 221 |
+
`COMPANY_NAME` varchar(50) NOT NULL,
|
| 222 |
+
`PRODUCTION_DATE` date NOT NULL,
|
| 223 |
+
`EXPIRATION_DATE` date NOT NULL,
|
| 224 |
+
`PLACE` varchar(20) NOT NULL,
|
| 225 |
+
`QUANTITY` int NOT NULL,
|
| 226 |
+
PRIMARY KEY (`BARCODE`)
|
| 227 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
| 228 |
+
|
| 229 |
+
CREATE TABLE `company` (
|
| 230 |
+
`NAME` varchar(50) NOT NULL,
|
| 231 |
+
`ADDRESS` varchar(50) NOT NULL,
|
| 232 |
+
`PHONE` varchar(20) NOT NULL,
|
| 233 |
+
PRIMARY KEY (`NAME`)
|
| 234 |
+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
| 235 |
+
|
| 236 |
+
Answer the following questions about this schema:
|
| 237 |
+
}'''
|
| 238 |
+
|
| 239 |
+
example_arabic_query = "اريد الباركود الخاص بدواء يبداء اسمه بحرف 's'"
|
| 240 |
+
|
| 241 |
+
sql_result = get_sql_query(example_db_schema, example_arabic_query)
|
| 242 |
+
print("استعلام SQL الناتج:")
|
| 243 |
+
print(sql_result)
|
| 244 |
+
```
|
| 245 |
+
|
| 246 |
+
## Training Details
|
| 247 |
+
|
| 248 |
+
### Training Data
|
| 249 |
+
|
| 250 |
+
- Dataset: **Spider (translated into Arabic)**
|
| 251 |
+
- Preprocessing: Questions converted to Arabic while keeping SQL queries unchanged.
|
| 252 |
+
- Training format:
|
| 253 |
+
- System instruction guiding Arabic-to-SQL conversion.
|
| 254 |
+
- Database schema provided for context.
|
| 255 |
+
- Arabic user queries mapped to correct SQL output.
|
| 256 |
+
- Output is strictly formatted SQL queries enclosed in markdown code blocks.
|
| 257 |
+
|
| 258 |
+
### Training Procedure
|
| 259 |
+
|
| 260 |
+
#### Training Hyperparameters
|
| 261 |
+
|
| 262 |
+
- **Batch size:** 1 (per device)
|
| 263 |
+
- **Gradient accumulation:** 4 steps
|
| 264 |
+
- **Learning rate:** 1.0e-4
|
| 265 |
+
- **Epochs:** 3
|
| 266 |
+
- **Scheduler:** Cosine
|
| 267 |
+
- **Warmup ratio:** 0.1
|
| 268 |
+
- **Precision:** bf16
|
| 269 |
+
|
| 270 |
+
#### Speeds, Sizes, Times
|
| 271 |
+
|
| 272 |
+
- **Training time:** 15 hours on **NVIDIA P100 8GB**
|
| 273 |
+
- **Checkpointing every:** 500 steps
|
| 274 |
+
|
| 275 |
+
## Evaluation
|
| 276 |
+
|
| 277 |
+
### Testing Data
|
| 278 |
+
|
| 279 |
+
- Validation dataset: Spider validation set (translated to Arabic)
|
| 280 |
+
|
| 281 |
+
### Metrics
|
| 282 |
+
|
| 283 |
+
- Exact Match (EM) for SQL correctness
|
| 284 |
+
- Execution Accuracy (EX) on databases
|
| 285 |
+
|
| 286 |
+
### Results
|
| 287 |
+
|
| 288 |
+
- Model achieved **competitive SQL generation accuracy** for Arabic queries.
|
| 289 |
+
- Further testing required for robustness.
|
| 290 |
+
|
| 291 |
+
## Environmental Impact
|
| 292 |
+
|
| 293 |
+
- **Hardware Type:** NVIDIA Tesla P100 8GB
|
| 294 |
+
- **Hours used:** 15
|
| 295 |
+
- **Cloud Provider:** Kaggle
|
| 296 |
+
- **Carbon Emitted:** Estimated using [ML Impact Calculator](https://mlco2.github.io/impact#compute)
|
| 297 |
+
|
| 298 |
+
## Technical Specifications
|
| 299 |
+
|
| 300 |
+
### Model Architecture and Objective
|
| 301 |
+
|
| 302 |
+
- Transformer-based **Qwen2.5-1.5B** architecture.
|
| 303 |
+
- Fine-tuned for Text-to-SQL task using LoRA.
|
| 304 |
+
|
| 305 |
+
### Compute Infrastructure
|
| 306 |
+
|
| 307 |
+
- **Hardware:** Kaggle P100 GPU (8GB VRAM)
|
| 308 |
+
- **Software:** Python, Transformers, LLaMA-Factory, Hugging Face Hub
|
| 309 |
+
|
| 310 |
+
## Citation
|
| 311 |
+
|
| 312 |
+
If you use this model, please cite:
|
| 313 |
+
|
| 314 |
+
```bibtex
|
| 315 |
+
@misc{OsamaMo_ArabicSQL,
|
| 316 |
+
author = {Osama Mohamed},
|
| 317 |
+
title = {Arabic Text-To-SQL Model},
|
| 318 |
+
year = {2024},
|
| 319 |
+
howpublished = {\url{https://huggingface.co/OsamaMo/Arabic_Text-To-SQL}}
|
| 320 |
+
}
|
| 321 |
+
```
|
| 322 |
+
|
| 323 |
+
## Model Card Contact
|
| 324 |
+
|
| 325 |
+
For questions, contact **Osama Mohamed** via Hugging Face ([OsamaMo](https://huggingface.co/OsamaMo)).
|
| 326 |
+
|