xlangai/spider
Viewer β’ Updated β’ 8.03k β’ 15.1k β’ 178
Qwen/Qwen3-4B-Instruct-2507 This model is a LoRA adapter fine-tuned to convert natural language questions into SQL queries given an explicit database schema.
It follows the Spider dataset prompt style and is optimized for structured NL β SQL tasks rather than general chat.
Training was accelerated using Unsloth, enabling faster and memory-efficient fine-tuning.
This model can be reproduced by fine-tuning Qwen/Qwen3-4B-Instruct-2507 on the Spider dataset using Hugging Face TRL and Unsloth. Training was performed with a learning rate of 2e-4, max sequence length 2048, 4-bit quantization, and instruction-based prompting including schema context.
prompt = """
### Instruction:
Convert the question into an SQL query.
### Database Schema:
CREATE TABLE students(id INT, name TEXT, age INT);
### Question:
List the names of all students.
### SQL:
"""
Base model
Qwen/Qwen3-4B-Instruct-2507