Instructions to use RajGMore/tinyforge-qwen2.5-3b-titanic-sql-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RajGMore/tinyforge-qwen2.5-3b-titanic-sql-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B-Instruct") model = PeftModel.from_pretrained(base_model, "RajGMore/tinyforge-qwen2.5-3b-titanic-sql-lora") - Notebooks
- Google Colab
- Kaggle
tinyforge: Qwen2.5-3B-Instruct LoRA for text-to-SQL on the Titanic table
A small LoRA adapter (r=16, q_proj/v_proj, 7 MB) trained with tinyforge
on a 4 GB RTX 3050 Ti laptop GPU: 100 steps, about 2 minutes, NF4 base with layer streaming. Training data: 1,126
question/SQL pairs generated from the public titanic.csv (891 rows) and verified by executing the SQL.
It answers questions about a table named titanic with a single SQLite query.
Results (read the caveats)
60 held-out questions, greedy decoding, one run. Execution accuracy compares result sets on the real table.
| Model | Execution accuracy | Exact match |
|---|---|---|
| This adapter | 98.3% | 98.3% |
| Base told to "reply with exactly one SQLite query" | 70.0% | 58.3% |
| Base with no format instruction | 0% (answers in prose) | 0% |
Caveats: the questions are templated and come from the same table and templates as the training data, so this shows the
adapter learned a narrow task, not general SQL skill. A harder-shape test on a different table with the 8B model gave
98% vs 97% (no real gain over a well-prompted base). Raw numbers: eval_results.json.
Use
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B-Instruct", device_map="auto")
model = PeftModel.from_pretrained(base, "RajGMore/tinyforge-qwen2.5-3b-titanic-sql-lora")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-3B-Instruct")
Reproduce the whole pipeline: pip install tinyforge, then see the repo README ("Verified results").
- Downloads last month
- 19