Downloads · 30 days
18
19% of all-time downloads
Piyush026/Qwen2.5-Coder-3B-sql-finetuned
Qwen2.5-Coder-3B-sql-finetuned is a text generation model from Piyush026. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
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…
Downloads · 30 days
18
19% of all-time downloads
All-time downloads
96
Public
Parameters
3.1B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
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. Usage To use the model for SQL query generation: from transformers import AutoModelForCausalLM, AutoTokenizer import torch
model_name = "Piyush026/Qwen2.5-Coder-3B-sql-finetuned" # Replace with your repo ID tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype=torch.float16, device_map="auto", trust_remote_code=True )
prompt = """ Database: university Schema:
Base Model: Qwen/Qwen2.5-Coder-3B-Instruct Fine-Tuning: LoRA (r=16, lora_alpha=32, lora_dropout=0.05) on a 1000-sample subset of the Spider dataset. Environment: Lightning AI Studio with Tesla T4 GPU. Merged Model: The LoRA adapters were merged into the base model using merge_and_unload for standalone inference.