Downloads · 30 days
12
32% of all-time downloads
mehmet1899/qwen35-9b-nl2sql-lora
qwen35-9b-nl2sql-lora is a text generation model from mehmet1899. Use it when you need the model to write or continue text. It is set up for peft.
This repository contains the final LoRA adapter for the Qwen 3.5 9B model line used in a master's thesis project on local large language models for NL2SQL generation.
Downloads · 30 days
12
32% of all-time downloads
All-time downloads
37
Public
Repo size
107 MB
Likes
0
Public
Click a slice to open those files.
.safetensors86.6 MB · 81%
From the Hugging Face model README
This repository contains the final LoRA adapter for the Qwen 3.5 9B model line used in a master's thesis project on local large language models for NL2SQL generation.
The adapter generates SQLite queries from natural-language questions and a relational database schema. It must be loaded together with the corresponding base model.
Qwen/Qwen3.5-9B-Base68c46c4b3498877f3ef123c856ecfde50c39f404checkpoint-502SHA-256 of adapter_model.safetensors:
dddf120df0703be5b9106ba17a628f2a9664e6ab5d1cc3ec1311c0a4a2b000f0
1e-4Spider Dev was not used for training, validation, early stopping, or checkpoint selection.
The final adapter was evaluated on all 1,032 Spider Dev cases.
Zero-shot evaluation:
These values correspond to the authoritative evaluation run documented in the accompanying GitHub repository.
The model is instructed to return only a valid SQLite query:
SELECT or WITH queriesThe exact prompt construction and evaluation pipeline are documented in the project repository.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model_id = "Qwen/Qwen3.5-9B-Base"
adapter_id = "mehmet1899/qwen35-9b-nl2sql-lora"
adapter_revision = "e136b9c25ede3ee82210875d0db774089509b676"
tokenizer = AutoTokenizer.from_pretrained(
base_model_id,
revision="68c46c4b3498877f3ef123c856ecfde50c39f404",
)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
revision="68c46c4b3498877f3ef123c856ecfde50c39f404",
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(
model,
adapter_id,
revision=adapter_revision,
)
model.eval()
Code, training and evaluation configurations, environment information, run manifests, and result summaries are available at:
https://github.com/md181099/nl2sql-masterthesis
The files training_metadata.json, training_history.csv, and training_history.jsonl provide additional training provenance.