Updated Readme
Browse files
README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
| 1 |
-
|
| 2 |
-
license: apache-2.
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
This is a fine-tuned version of Qwen/Qwen2.5-Coder-3B-Instruct for generating SQL queries from natural language questions. The model was fine-tuned using LoRA (r=16) on a subset of the Spider dataset and merged into a standalone model, eliminating the need for the peft library during inference.
|
| 5 |
Usage
|
| 6 |
To use the model for SQL query generation:
|
|
@@ -8,7 +16,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
| 8 |
import torch
|
| 9 |
|
| 10 |
# Load model and tokenizer
|
| 11 |
-
model_name = "
|
| 12 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 13 |
model = AutoModelForCausalLM.from_pretrained(
|
| 14 |
model_name,
|
|
@@ -33,9 +41,9 @@ outputs = model.generate(**inputs, max_length=200)
|
|
| 33 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 34 |
|
| 35 |
|
| 36 |
-
Training Details
|
| 37 |
|
| 38 |
Base Model: Qwen/Qwen2.5-Coder-3B-Instruct
|
| 39 |
Fine-Tuning: LoRA (r=16, lora_alpha=32, lora_dropout=0.05) on a 1000-sample subset of the Spider dataset.
|
| 40 |
Environment: Lightning AI Studio with Tesla T4 GPU.
|
| 41 |
-
Merged Model: The LoRA adapters were merged into the base model using merge_and_unload for standalone inference.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- Qwen/Qwen2.5-Coder-3B-Instruct
|
| 7 |
+
tags:
|
| 8 |
+
- text-to-sql
|
| 9 |
+
- fine-tuned
|
| 10 |
+
- qwen
|
| 11 |
+
---
|
| 12 |
This is a fine-tuned version of Qwen/Qwen2.5-Coder-3B-Instruct for generating SQL queries from natural language questions. The model was fine-tuned using LoRA (r=16) on a subset of the Spider dataset and merged into a standalone model, eliminating the need for the peft library during inference.
|
| 13 |
Usage
|
| 14 |
To use the model for SQL query generation:
|
|
|
|
| 16 |
import torch
|
| 17 |
|
| 18 |
# Load model and tokenizer
|
| 19 |
+
model_name = "Piyush026/Qwen2.5-Coder-3B-sql-finetuned" # Replace with your repo ID
|
| 20 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 21 |
model = AutoModelForCausalLM.from_pretrained(
|
| 22 |
model_name,
|
|
|
|
| 41 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 42 |
|
| 43 |
|
| 44 |
+
## Training Details
|
| 45 |
|
| 46 |
Base Model: Qwen/Qwen2.5-Coder-3B-Instruct
|
| 47 |
Fine-Tuning: LoRA (r=16, lora_alpha=32, lora_dropout=0.05) on a 1000-sample subset of the Spider dataset.
|
| 48 |
Environment: Lightning AI Studio with Tesla T4 GPU.
|
| 49 |
+
Merged Model: The LoRA adapters were merged into the base model using merge_and_unload for standalone inference.
|