xlangai/spider
Viewer β’ Updated β’ 8.03k β’ 10k β’ 176
LoRA adapter weights for Qwen/Qwen2.5-7B-Instruct, fine-tuned on the Spider text-to-SQL dataset using a from-scratch QLoRA implementation β no bitsandbytes, no peft, no black-box abstractions.
Full training code, implementation details, and loading instructions: github.com/dhruvkachhela/fine_tunning_QLORA
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen2.5-7B-Instruct |
| Dataset | Spider (7,000 train / 1,034 val) |
| Task | Natural language to SQL |
| Quantization | NF4 4-bit, block size 64, double quantization (8-bit scales) |
| LoRA rank | 8 |
| LoRA alpha | 16 |
| Target modules | q_proj, v_proj (all 28 layers) |
| Trainable params | 2,523,136 (0.036% of 7B) |
| Learning rate | 1e-4 with linear warmup + decay |
| Training steps | 1,000 |
| Batch size | 2 |
| Hardware | Kaggle T4 GPU (16GB VRAM) |
| File | Description |
|---|---|
best_qlora_checkpoint.pt |
LoRA adapter weights (lora_A + lora_B, all 28 layers) |
Base model weights are not included β load Qwen/Qwen2.5-7B-Instruct directly from HuggingFace.
Built from scratch in PyTorch: